LOGGING
The LOGGING (LOG) service controls the logging system.
The logging system provides the ability to periodically execute a set of services with the output directed to a data set that you specified.
Syntax
The parameters are defined as follows:
Parameter | Description |
---|---|
xx | suffix of the $$INLGxx member used to start logging The $$INLGxx member contains control statements that define the services to be executed and control the logging process, including the output data set. This parameter also implies start. |
dsname | name of the partitioned data set that contains the $$INLGxx member If this parameter is omitted, the name you last specified is used. If you did not previously specify a dsname, the data set allocated to DDNAME BBPARM is used. |
STOP | indicates that logging is to be stopped |
FREE | indicates that the logging output data set is to be freed; FREE implies stop |
STATUS | indicates that the status of the logging system is to be displayed |
$$INLGxx control statements
The verb (statement type) must begin in column 1. One or more blanks are allowed between the verb and the operand. Operands cannot extend beyond column 72.
Statement | Description |
---|---|
CLASS c | indicates that the logging output is to be written to a SYSOUT data set of the specified class; CLASS is mutually exclusive with the DSN statement |
CMD command | command that is to be periodically executed Use multiple CMD statements for multiple commands. Commands are executed in the order that they appear. |
CNT n | specifies that logging is to be terminated when n number of cycles have been executed; also, see also STOP hhmm |
DSN dsname | specifies that logging output is to be written to the preallocated data set dsname If no CLASS or DSN statement is provided, and a data set has been allocated to DDNAME LOG, the output will be written to that data set. Otherwise, it will be written to SYSOUT=A. |
EJC | indicates the output produced by the command that follows should start on a new page; the EJC statement should be followed by one or more CMD statements |
INCR n | indicates the number (n) of seconds (increment) in an interval; default is 30 seconds; the product of INCR and INT determines the number of seconds between logging cycles |
INT n | indicates the number (n) of intervals in a logging cycle; default interval is one; the product of INCR and INT determines the number of seconds between logging cycles |
START hhmm | indicates the time (hhmm) that logging is to start; specify 1300 for 1:00 P.M. Logging starts immediately if you do not provide a START statement. |
STOP hhmm | indicates the time (hhmm) that logging is to terminate; specify 1200 for 12:00 P.M. (noon) and 2400 for 12:00 A.M. (midnight) If you provide both CNT and STOP statements, logging will terminate when the first condition is reached. |
HOLD | indicates that the SYSOUT output is to be held If neither HOLD nor NOHOLD are specified, the default for the SYSOUT class will prevail. The HOLD statement is ignored if logging output is not written to a SYSOUT data set. |
NOHOLD | indicates that the SYSOUT output is not to be held If neither HOLD nor NOHOLD are specified, the default for the SYSOUT class will prevail. The NOHOLD statement is ignored if logging output is not written to a SYSOUT data set. |
MAXOUT n | indicates the maximum number (n) of lines that will be written to a SYSOUT data set Logging will be terminated when n lines have been written to SYSOUT. You can specify up to eight digits. The default is to write an infinite number of lines. MAXOUT is only applicable to SYSOUT data sets. |
Examples
Member $$INLG01
INT 5
DSN VAM3.LOG
START 2200
STOP 2259
CMD CSA,MAP
Member $$INLG01 will cause the command CSA,MAP to be executed once every five minutes between 10:00 P.M. and 10:59 P.M. The output will be written to data set VAM3.LOG.
Member $$INLG02
INT 2
CNT 60
HOLD
CLASS A
CMD MTP
CMD ENQ
CMD CPU 5
Member $$INLG02 causes the commands MTP, ENQ, and CPU 5 to be executed once a minute for a total of 60 times. The output will be written to SYSOUT Class A and placed on the HOLD queue.
Related topic