Sort Exit Routines

The product Batch Report Writer IQL requests that specify the INTERVAL parameter require the sorting of Db2 trace records in time ascending sequence. If you are concatenating multiple SMF files, the data must be sorted. Exit routines NSIGHT15 and NSIGHT35 are provided to sort the SMF Db2 trace records according to the store clock (STCK) value in QWHSSTCK.
caidb219
The 
CA SYSVIEW for DB2
 Batch Report Writer IQL requests that specify the INTERVAL parameter require the sorting of Db2 trace records in time ascending sequence. If you are concatenating multiple SMF files, the data 
must
 be sorted. Exit routines NSIGHT15 and NSIGHT35 are provided to sort the SMF Db2 trace records according to the store clock (STCK) value in QWHSSTCK.
Sample JCL is provided in the SMFSORT member in the 
CA SYSVIEW for DB2
 common SOURCE data set.
The following sections describe the processing of each exit routine:
  • E15 sort exit routine (NSIGHT15)
    Processes each SMF record before the record is sorted.
    For Db2 trace records (SMF record types 100, 101, and 102), NSIGHT15 swaps the values in QWHSSTCK and SMF time and SMF date (8 bytes).
    For all other records, NSIGHT15 uses the CONVTOD system macro to convert the SMF date and SMF time to a store clock value (STCK). Results are provided in the SMF time and SMF date fields (8 bytes).
    The SORT FIELDS parameter specifies a starting position of 7 and a length of 8 to sort on the store clock value.
    If errors are detected, 
    CA SYSVIEW for DB2
     issues a message and the SORT terminates with a return code of 16.
  • E35 sort exit routine (NSIGHT35)
    Processes each SMF record after the record is sorted.
    For Db2 trace records (SMF record types 100, 101, and 102), NSIGHT35 swaps the values in QWHSSTCK and SMF time and SMF date (8 bytes), restoring them to their original value.
    For all other records, NSIGHT35 uses the STCKCONV system macro to convert the store clock value (STCK) in SMF time and SMF date (8 bytes) back to their original values.
    If errors are detected, 
    CA SYSVIEW for DB2
     issues a message and the SORT terminates with a return code of 16.
The E15 and E35 sort exits 
must
 be used together.