Printing CQS log records
To print the CQS log records from the z/OS® system log, use the IMS File Select and Formatting Print utility (DFSERA10) with exit routine CQSERA30.
Example JCL to print CQS log records
The following example shows the required JCL to print the log records from a z/OS system log. This JCL causes the z/OS logger to invoke the default log stream subsystem exit routine, IXGSEXIT, to copy the log records. The exit routine returns a maximum of 32 760 bytes of data for each log record even though CQS supports larger log records. You can specify the name of a different exit routine, if necessary.
Use the following JCL to print the CQS log records:
//CQSERA10 JOB MSGLEVEL=1,MSGCLASS=A,CLASS=K
//STEP1 EXEC PGM=DFSERA10
//STEPLIB DD DISP=SHR,DSN=IMS.SDFSRESL
//SYSPRINT DD SYSOUT=A
//TRPUNCH DD SYSOUT=A,DCB=BLKSIZE=80
//SYSUT1 DD DSN=SYSLOG.MSGQ01.LOG,
// SUBSYS=(LOGR,IXGSEXIT),
// DCB=(BLKSIZE=32760)
//SYSIN DD *
CONTROL CNTL H=EOF
OPTION PRINT EXITR=CQSERA30
END
//
- DD statements
-
- STEPLIB
- DSN= points to IMS.SDFSRESL, which contains the IMS File Select and Formatting Print utility (DFSERA10).
- SYSUT1
- DSN= points to the CQS log stream name that was specified in the LOGNAME= parameter in the CQSSGxxx PROCLIB member.
- Control Statements
-
- H=
- Specifies the number of log records to print. H=EOF prints all log records.
- EXITR=CQSERA30
- The CQS log record routine that is called to format each log record. This routine prints the record type and time-stamp information for each record, and dumps the contents of the record (up to a maximum of 32 760 bytes (X'7FF8')).
- Limiting Log Data to a Specified Time Range
- You can limit the log records you print to those in a particular
interval of time by using the FROM and TO parameters on the SUBSYS
statement. For example, the following DD card:
//SYSUT1 DD DSN=SYSLOG.MSGQ01.LOG, // SUBSYS=(LOGR,IXGSEXIT, // 'FROM=(2001/042,11:00:00),TO=(2001/042,12:00:00)'), // DCB=(BLKSIZE=32760)
would pass log records only from 11:00 to 12:00 on day 42 of the year 2001 to the DFSERA10 program. Dates and times specified in this manner are in GMT, and the seconds field of the time values is optional. If you want to use local dates and times, add the LOCAL keyword to the statement://SYSUT1 DD DSN=SYSLOG.MSGQ01.LOG, // SUBSYS=(LOGR,IXGSEXIT, // 'FROM=(2001/042,11:00:00),TO=(2001/042,12:00:00),LOCAL'), // DCB=(BLKSIZE=32760)