Go to Home Page
Questions?
Call 1-800-572-5517
 
  Go to Home Page  
  See all products
  See price schedules
  See manuals, tutorials, articles
  Download a free 30-day trial
  See user testimonials
  About Pacific Systems Group
 
 
SMF Tools
  See SMF Record Layouts
  See Sample SMF Reports
  Learn How to Export SMF Data
  Download Free SMF Reporting Software (30 days)
 
One of the greatest SMF record parsing programming languages I've ever seen. Chief, Large Systems Services Branch, NIH
  Choose Spectrum Writer to add 4GL to your product
  Free 60-Page Book (PDF) - How to Make an SMF Report
Spectrum DCOLLECT Reporter - the 4GL DCOLLECT Report Writer.

Spectrum SMF Writer - the 4GL SMF Report Writer.

SMF Type 102 Record

This table shows the record layout for type 102 SMF records
(DATABASE 2 Performance, Audit, and Monitor).

List of other SMF record layouts available.
List of sample SMF reports.

Purpose: DATABASE 2 (DB2) writes record type 102 to record performance information.


It's easy to report on SMF 102 data! (Jump to sample reports)

SMF Spectrum Writer
We have a low-cost 4GL report writer especially for SMF files. It's called Spectrum SMF Writer.

Spectrum SMF Writer handles the difficult SMF record parsing for you automatically. You just specify which fields you want to see.

Spectrum SMF Writer also converts the arcane date and time fields and reformats them into an attractive report.

Plus, Spectrum SMF Writer can export SMF data as comma delimited files to use on your PC.
 
Try It FREE Now!

The Spectrum Writer definitions for the SMF type 102 record below are based on the description provided by IBM in its "MVS Systems Management Facilities (SMF)" manual and/or DSECTs mapped by its Assembler macros.

 

Spectrum SMF Writer
File Definition for Type 102 SMF Records
DATABASE 2 Performance, Audit, and Monitor

***********************************************************************
*          SPECTRUM SMF WRITER -- FILE DEFINITION STATEMENTS          *
* SMF TYPE 102 RECORD - "DATABASE 2 PERFORMANCE, AUDIT, AND MONITOR"  *
***********************************************************************
OPTION: MISSOFFSET /* TREAT OFFSET ERRORS (99999) LIKE MISSING DATA */
OPTION: STCKADJ(0) /* NO GMT TO LOCAL CONVERSION - DURATIONS*/

**********************************************************************
* SMF  102 DB2 PERFORMANCE/SERVICEABILITY RECORD SECTION MAPPING
*(SEE SYSTEM PLANNING AND ADMINISTRATION GUIDE FOR ADDITIONAL DETAIL)*
**********************************************************************
*                                                                    *
* ------------- NOTE TO SPECTRUM SMF WRITER CUSTOMERS. ------------- *
*                                                                    *
* SM102Bnn contains some additional IFCIDs not defined in SMF102nn.  *
* Use this "102B" module in place of the regular "102" module    *
* to report on the IFCIDs defined here.                              *
*                                                                    *
* THIS RECORD LAYOUT DEFINES ALL OF THE HEADERS PLUS THE DATA        *
* SECTIONS OF THE MOST COMMONLY USED IFCIDS. THERE ARE HUNDREDS      *
* OF OTHER IFCIDS WHICH WE HAVE NOT DEFINED HERE, IN ORDER TO KEEP   *
* THE RECORD LAYOUT MANAGEABLE.                                      *
*                                                                    *
* IF YOU NEED DATA FROM A DIFFERENT IFCID, CONSIDER USING THIS       *
* LAYOUT AS A GUIDE AND DEFINING IT YOURSELF. YOU CAN ALSO           *
* CONTACT US AND AS OUR SCHEDULE PERMITS, WE WILL TRY TO DEFINE IT.  *
*                                                                    *
**********************************************************************
*   DSECT   MACRO      *  DESCRIPTION OF SECTIONS IN RECORD          *
*                                                                    *
*  NOTE: FIELDS DEFINED AS CHARACTER MAY CONTAIN HEX DATA            *
*--------------------------------------------------------------------*
*   SM102   DSNDQWSP   *  SMF HEADER SECTION                         *
*--------------------------------------------------------------------*
*                      * INDIVIDUAL IFCID FOLLOWS
*                      *
*   QWT0    DSNDQWT0   *  SELF DEFINING SECTION - NOTE: USE OFFSETS
*                      *   IN QWT0 TO GET TO THE FOLLOWING SECTIONS
*                      *   BECAUSE THEIR EXACT POSITION VARIES
*--------------------------------------------------------------------
*                      * FOLLOWING SECTIONS BEGIN ON A WORD BOUNDARY
*                      * PRODUCT SECTION. THIS SECTION NORMALLY
*                      * APPEARS AT THE END OF RECORD.
*   QWHS    DSNDQWHS   *   STANDARD HEADER ALWAYS APPEARS
*    QWHC   DSNDQWHC   *    CORRELATION HEADER MAY APPEAR
*    QWHT   DSNDQWHT   *    TRACE HEADER MAY APPEAR
*    QWHU   DSNDQWHU   *    CPU  HEADER MAY APPEAR
*    QWHD   DSNDQWHD   *    DISTRIBUTED HEADER MAY APPEAR
*    QWHA   DSNDQWHA   *    DATA SHARING HEADER MAY APPEAR
*                      *
********************************************************************
*
FLD: QWSP     LEN(4) TYPE(BIN) DISP(0)
*/*****************************************************************/
*/*       SMF COMMON HEADER MAPPING MACRO FOR PERFORMANCE SMF 102 */
*/*****************************************************************/
FLD: SM102LEN LEN(2) DISP(0)      /*SM102 TOTAL LENGTH*/
FLD: SM102SGD LEN(2) DISP(2)      /*ZZ BYTES*/
FLD: SM102FLG LEN(1) DISP(4)      /*SYSTEM INDICATOR*/
FLD: SM102RTY LEN(1) TYPE(BU) DISP(5)             /*RECORD TYPE X'66'*/
FLD: SM102TME LEN(4) TYPE(B-SECS) DISP(6) DEC(2)
                                  /*TIME SMF MOVED RECORD*/
FLD: SM102DTE TYPE(P-CYYDDD) DISP(10)         /*DATE SMF MOVED RECORD*/
FLD: SM102SID LEN(4) DISP(14)     /*SYSTEM ID (SID)*/
FLD: SM102SSI LEN(4) DISP(18)     /*SUBSYSTEM ID*/
FLD: SM102STF LEN(1) DISP(22)     /*RESERVED*/
FLD: SM102RI  LEN(1) DISP(23)     /*RESERVED*/
FLD: SM102SEQ LEN(4) DISP(24)     /*RESERVED*/
FLD: SM102BUF LEN(4) DISP(24)     /*TEMPORARY POINTER TO BUFFER AREA*/
FLD: SM102END LEN(1) DISP(28)    /*START OF THE SELF DEFINING SECTION*/
*
***********************************************************************
**** QWT0     DSECT                                                     
***********************************************************************

FLD: QWT0     DISP(0) LEN(1) OFFSET(28)
*
* /*             TRACE SELF DEFING SECTION MACRO                     */
*
* /*  PRODUCT SECTION FOR DATA BASE STATISTICS CONTAINS THE
*       STANDARD HEADER MAPPED BY DSNDQWHS
*
*    THE NUMBER OF DATA SECTIONS IS VARIABLE AND INDICATED IN
*       THE STANDARD HEADER (QWHSNSDA)                               */
*
*/**IMPORTANT PARSING INFORMATION*****IMPORTANT PARSING INFORMATION****
*                                                                     *
* The length field for any (offset,length,number of data sections)    *
* triplet can legally be zero with a non-zero offset.  This indicates *
* this section is a varying length repeating group. A varying         *
* length repeating group is a series of related data blocks with      *
* differing lengths. This is typically, if not always, the result of  *
* varying length long name fields in the data block.                  *
*                                                                     *
*                                                                     *
FLD: QWT02PSO LEN(4) TYPE(BIN) DISP(0)
                                  /*OFFSET TO THE PRODUCT SECTION*/
FLD: QWT02PSL LEN(2) TYPE(BIN) DISP(4)
                                  /*LENGTH OF THE PRODUCT SECTION*/
FLD: QWT02PSN LEN(2) TYPE(BIN) DISP(6)   /*NUMBER OF PRODUCT SECTIONS*/
FLD: QWT02R1O LEN(4) TYPE(BIN) DISP(8)   /*OFFSET TO THE DATA SECTION*/
FLD: QWT02R1L LEN(2) TYPE(BIN) DISP(12)  /*LENGTH OF THE DATA SECTION*/
FLD: QWT02R1N LEN(2) TYPE(BIN) DISP(14)     /*NUMBER OF DATA SECTIONS*/
FLD: QWT02R2O LEN(4) TYPE(BIN) DISP(16)  /*OFFSET TO THE DATA SECTION*/
FLD: QWT02R2L LEN(2) TYPE(BIN) DISP(20)  /*LENGTH OF THE DATA SECTION*/
FLD: QWT02R2N LEN(2) TYPE(BIN) DISP(22)     /*NUMBER OF DATA SECTIONS*/
FLD: QWT02R3O LEN(4) TYPE(BIN) DISP(24)  /*OFFSET TO THE DATA SECTION*/
FLD: QWT02R3L LEN(2) TYPE(BIN) DISP(28)  /*LENGTH OF THE DATA SECTION*/
FLD: QWT02R3N LEN(2) TYPE(BIN) DISP(30)     /*NUMBER OF DATA SECTIONS*/
FLD: QWT02R4O LEN(4) TYPE(BIN) DISP(32)  /*OFFSET TO THE DATA SECTION*/
FLD: QWT02R4L LEN(2) TYPE(BIN) DISP(36)  /*LENGTH OF THE DATA SECTION*/
FLD: QWT02R4N LEN(2) TYPE(BIN) DISP(38)     /*NUMBER OF DATA SECTIONS*/
FLD: QWT02R5O LEN(4) TYPE(BIN) DISP(40)  /*OFFSET TO THE DATA SECTION*/
FLD: QWT02R5L LEN(2) TYPE(BIN) DISP(44)  /*LENGTH OF THE DATA SECTION*/
FLD: QWT02R5N LEN(2) TYPE(BIN) DISP(46)     /*NUMBER OF DATA SECTIONS*/
FLD: QWT02R6O LEN(4) TYPE(BIN) DISP(48)  /*OFFSET TO THE DATA SECTION*/
FLD: QWT02R6L LEN(2) TYPE(BIN) DISP(52)  /*LENGTH OF THE DATA SECTION*/
FLD: QWT02R6N LEN(2) TYPE(BIN) DISP(54)     /*NUMBER OF DATA SECTIONS*/
FLD: QWT02R7O LEN(4) TYPE(BIN) DISP(56)  /*OFFSET TO THE DATA SECTION*/
FLD: QWT02R7L LEN(2) TYPE(BIN) DISP(60)  /*LENGTH OF THE DATA SECTION*/
FLD: QWT02R7N LEN(2) TYPE(BIN) DISP(62)     /*NUMBER OF DATA SECTIONS*/
FLD: QWT02R8O LEN(4) TYPE(BIN) DISP(64)  /*OFFSET TO THE DATA SECTION*/
FLD: QWT02R8L LEN(2) TYPE(BIN) DISP(68)  /*LENGTH OF THE DATA SECTION*/
FLD: QWT02R8N LEN(2) TYPE(BIN) DISP(70)     /*NUMBER OF DATA SECTIONS*/
FLD: QWT02R9O LEN(4) TYPE(BIN) DISP(72)  /*OFFSET TO THE DATA SECTION*/
FLD: QWT02R9L LEN(2) TYPE(BIN) DISP(76)  /*LENGTH OF THE DATA SECTION*/
FLD: QWT02R9N LEN(2) TYPE(BIN) DISP(78)     /*NUMBER OF DATA SECTIONS*/
FLD: QWT02RAO LEN(4) TYPE(BIN) DISP(80)  /*OFFSET TO THE DATA SECTION*/
FLD: QWT02RAL LEN(2) TYPE(BIN) DISP(84)  /*LENGTH OF THE DATA SECTION*/
FLD: QWT02RAN LEN(2) TYPE(BIN) DISP(86)     /*NUMBER OF DATA SECTIONS*/
FLD: QWT02RBO LEN(4) TYPE(BIN) DISP(88)  /*OFFSET TO THE DATA SECTION*/
FLD: QWT02RBL LEN(2) TYPE(BIN) DISP(92)  /*LENGTH OF THE DATA SECTION*/
FLD: QWT02RBN LEN(2) TYPE(BIN) DISP(94)     /*NUMBER OF DATA SECTIONS*/
FLD: QWT02RCO LEN(4) TYPE(BIN) DISP(96)  /*OFFSET TO THE DATA SECTION*/
FLD: QWT02RCL LEN(2) TYPE(BIN) DISP(100) /*LENGTH OF THE DATA SECTION*/
FLD: QWT02RCN LEN(2) TYPE(BIN) DISP(102)    /*NUMBER OF DATA SECTIONS*/
FLD: QWT02RDO LEN(4) TYPE(BIN) DISP(104) /*OFFSET TO THE DATA SECTION*/
FLD: QWT02RDL LEN(2) TYPE(BIN) DISP(108) /*LENGTH OF THE DATA SECTION*/
FLD: QWT02RDN LEN(2) TYPE(BIN) DISP(110)    /*NUMBER OF DATA SECTIONS*/
FLD: QWT02REO LEN(4) TYPE(BIN) DISP(112) /*OFFSET TO THE DATA SECTION*/
FLD: QWT02REL LEN(2) TYPE(BIN) DISP(116) /*LENGTH OF THE DATA SECTION*/
FLD: QWT02REN LEN(2) TYPE(BIN) DISP(118)    /*NUMBER OF DATA SECTIONS*/
FLD: QWT02RFO LEN(4) TYPE(BIN) DISP(120)
                                /*OFFSET TO THE DATA SECTION TU3100IF*/
FLD: QWT02RFL LEN(2) TYPE(BIN) DISP(124)
                                /*LENGTH OF THE DATA SECTION TU3100IF*/
FLD: QWT02RFN LEN(2) TYPE(BIN) DISP(126)
                                  /*NUMBER OF DATA SECTIONS TU3100IF*/
FLD: QWT02RGO LEN(4) TYPE(BIN) DISP(128) /*OFFSET TO THE DATA SECTION*/
FLD: QWT02RGL LEN(2) TYPE(BIN) DISP(132) /*LENGTH OF THE DATA SECTION*/
FLD: QWT02RGN LEN(2) TYPE(BIN) DISP(134)    /*NUMBER OF DATA SECTIONS*/
FLD: QWT02RHO LEN(4) TYPE(BIN) DISP(136)
                                 /*OFFSET TO THE DATA SECTION PM10989*/
FLD: QWT02RHL LEN(2) TYPE(BIN) DISP(140)
                                 /*LENGTH OF THE DATA SECTION PM10989*/
FLD: QWT02RHN LEN(2) TYPE(BIN) DISP(142)
                                  /*NUMBER OF DATA SECTIONS PM10989*/
FLD: QWT02END LEN(1) DISP(144)    /*END OF THE SELF DEFINING SECTION*/
*

***********************************************************************
**** QWHS     DSECT                                                     
***********************************************************************

COMP: QWHS_OFFSET =
           WHEN(SM102RTY=102 AND QWT02PSN > 0) ASSIGN(QWT02PSO)
           ELSE                                ASSIGN(99999)
FLD: QWHS     DISP(0) LEN(1) OFFSET(QWHS_OFFSET)
***********************************************************************
***                                                                  **
*** INSTRUMENTATION STANDARD HEADER DATA IN PRODUCT SECTION          **
***                                                                  **
***********************************************************************
FLD: QWHSLEN  LEN(2) TYPE(BIN) DISP(0)
                                  /*LENGTH OF THE STANDARD HEADER*/
FLD: QWHSTYP  LEN(1) DISP(2)      /*HEADER TYPE*/
*
*  **              HEADER TYPE CONSTANTS                             **
COMP: QWHSHS01 = 1                /*..STANDARD HEADER*/
COMP: QWHSHC02 = 2                /*..CORRELATION HEADER*/
COMP: QWHSHT04 = 4                /*..TRACE HEADER*/
COMP: QWHSHU08 = 8                /*..CPU HEADER*/
COMP: QWHSHD16 = 16               /*..DISTRIBUTED HEADER*/
COMP: QWHSHA32 = 32               /*..DATA SHARING HEADER*/
FLD: QWHSRMID LEN(1) DISP(3)      /*RESOURCE MANAGER ID*/
FLD: QWHSIID  TYPE(HALF) DISP(4)  /*IFCID*/
FLD: QWHSRELN LEN(2) DISP(6)      /*RELEASE NUMBER AREA*/
FLD: QWHSNSDA LEN(1) TYPE(BIN) DISP(6)
                                  /*NUMBER OF SELF DEFINING AREAS*/
*
FLD: QWHSRN   LEN(1) DISP(7)      /*RELEASE INDICATOR NUMBER HEX*/
*
FLD: QWHSACE  LEN(4) TYPE(BIN) DISP(8)
                                  /*ACE ADDRESS DISPATCH UNIT ADDRESS*/
FLD: QWHSSSID LEN(4) DISP(12)     /*SUBSYSTEM NAME*/
FLD: QWHSSTCK TYPE(STCKTIME) DISP(16)   /*STORE CLOCK VALUE OF HEADER*/
*                                 For data sharing, this is the sysplex
*                                 timer value.
*
* *********************************************************************
* * NOTE- THE FOLLOWING SEQUENCE NUMBERS ARE UNIQUE WITHIN A SINGLE   *
* * SUBSYSTEM INSTANCE AND ARE INITIALIZED TO ZERO ON RESTART.        *
* * BECAUSE OF MP CONSIDERATIONS THE NUMBERS MAY NOT ALWAYS BE        *
* * IN ASCENDING ORDER.                                               *
* *********************************************************************
*
FLD: QWHSISEQ LEN(4) DISP(24)     /*SEQUENCE NUMBER FOR IFCID*/
FLD: QWHSWSEQ LEN(4) DISP(28)     /*SEQUENCE NUMBER FOR DESTINATION*/
FLD: QWHSMTN  LEN(4) DISP(32)     /*ACTIVE TRACE NUMBER MASK*/
FLD: QWHSLOCN LEN(16) DISP(36)    /*%U LOCAL LOCATION NAME*/
*                                   Truncated if QWHSLOCN_Offª=0
FLD: QWHSLWID LEN(24) DISP(52)    /*LUWID*/
FLD: QWHSNID  LEN(8) DISP(52)     /*NETWORK ID*/
FLD: QWHSLUNM LEN(8) DISP(60)     /*LUNAME*/
FLD: QWHSLUUV LEN(6) DISP(68)     /*UNIQUENESS VALUE*/
FLD: QWHSLUCC LEN(2) TYPE(BIN) DISP(74)                /*COMMIT COUNT*/
FLD: QWHSFLAG LEN(1) DISP(76)     /*Flags*/
COMP: QWHS_UNICODE = X'80'        /*%U fields contain Unicode (UTF 8)*/
FLD: QWHSLOCN_OFF TYPE(HALF) DISP(78)           /*Offset from QWHS to*/
*                                   LOCAL LOCATION NAME
*                                   If QWHSLOCN truncated
FLD: QWHSSUBV TYPE(HALF) DISP(80)
                                /*THE SUBVERSION FOR THE BASE RELEASE*/
FLD: QWHSEND  LEN(1) DISP(82)     /*END OF STANDARD HEADER*/
*
*

***********************************************************************
**** QWHSLOCN_D   DSECT           Use if QWHSLOCN_Offª=0                
***********************************************************************

COMP: QWHSLOCN_D_OFFSET =
           WHEN(QWHS_OFFSET <> 99999 AND QWHSLOCN_Off <> 0)
                          ASSIGN(QWHS_OFFSET + QWHSLOCN_Off)
           ELSE           ASSIGN(99999)
FLD: QWHSLOCN_D DISP(0) LEN(1) OFFSET(QWHSLOCN_D_OFFSET)
                                  /*Use if QWHSLOCN_Offª 0*/
*
FLD: QWHSLOCN_LEN TYPE(HALF) DISP(0)  /*Length of the following field*/
FLD: QWHSLOCN_VAR LEN(128) DISP(2)/*%U LOCAL LOCATION NAME*/
COMPUTE: EDIT_QWHSLOCN = #LEFT(QWHSLOCN_VAR,QWHSLOCN_LEN) 
*
***THE FOLLOWING VALUES DEFINE THE IFCID IN QWHSIID                  **
***                          RMID: DESCRIPTION:                      **
COMP: QWHS0000 = 0                /*..DEFAULT NORMAL TRACE RECORDS*/
COMP: QWHS0001 = 1                /*26 ..SYSTEM STATISTICS*/
COMP: QWHS0002 = 2                /*26 ..DATA BASE STATISTICS*/
COMP: QWHS0003 = 3                /*26 ..ACCOUNTING*/
*
***********************************************************************
*    SOME OR ALL OF THESE HEADERS MAY NOW FOLLOW THE STD HEADER:
*    QWHC    DSNDQWHC  *  CORRELATION HEADER PRESENT ON ACCOUNTING
*    QWHT    DSNDQWHT  *  TRACE HEADER MAY APPEAR
*    QWHU    DSNDQWHU  *  CPU HEADER MAY APPEAR
*    QWHD    DSNDQWHD  *  DISTRIBUTED HEADER PRESENT ON ACCOUNTING
*    QWHA    DSNDQWHA  *  DATA SHARING HEADER
***********************************************************************
COMPUTE: PSHDR_MAX_OFFSET = QWT02PSO + QWT02PSL /* -> PAST ALL HDRS*/
*
***********************************************************************
* DEFINE JUST THE LENGTH AND TYPE OF THE 2ND HEADER SECTION PRESENT   *
***********************************************************************
COMPUTE: PSHDR_2_TEST_OFFSET = QWT02PSO + QWHSLEN  
COMPUTE: PSHDR_2_OFFSET =
  WHEN(PSHDR_2_TEST_OFFSET >= PSHDR_MAX_OFFSET) ASSIGN(99999)
  ELSE  ASSIGN(PSHDR_2_TEST_OFFSET)
FIELD:   PSHDR_2_LEN DISP(0) LEN(2) TYPE(BIN) OFFSET(PSHDR_2_OFFSET)
FIELD:   PSHDR_2_TYP DISP(2) LEN(1) TYPE(BIN)
*

***********************************************************************
* DEFINE JUST THE LENGTH AND TYPE OF THE 3RD SECTION PRESENT          *
***********************************************************************
COMPUTE: PSHDR_3_TEST_OFFSET = PSHDR_2_OFFSET + PSHDR_2_LEN
COMPUTE: PSHDR_3_OFFSET =
  WHEN(PSHDR_3_TEST_OFFSET >= PSHDR_MAX_OFFSET) ASSIGN(99999)
  ELSE  ASSIGN(PSHDR_3_TEST_OFFSET)
*
FIELD:   PSHDR_3_LEN DISP(0) LEN(2) TYPE(BIN) OFFSET(PSHDR_3_OFFSET)
FIELD:   PSHDR_3_TYP DISP(2) LEN(1) TYPE(BIN)
*
***********************************************************************
* DEFINE JUST THE LENGTH AND TYPE OF THE 4TH SECTION PRESENT          *
***********************************************************************
COMPUTE: PSHDR_4_TEST_OFFSET = PSHDR_3_OFFSET + PSHDR_3_LEN
COMPUTE: PSHDR_4_OFFSET =
  WHEN(PSHDR_4_TEST_OFFSET >= PSHDR_MAX_OFFSET) ASSIGN(99999)
  ELSE  ASSIGN(PSHDR_4_TEST_OFFSET)
*
FIELD:   PSHDR_4_LEN DISP(0) LEN(2) TYPE(BIN) OFFSET(PSHDR_4_OFFSET)
FIELD:   PSHDR_4_TYP DISP(2) LEN(1) TYPE(BIN)
*
*
***********************************************************************
* DEFINE JUST THE LENGTH AND TYPE OF THE 5TH SECTION PRESENT          *
***********************************************************************
COMPUTE: PSHDR_5_TEST_OFFSET = PSHDR_4_OFFSET + PSHDR_4_LEN
COMPUTE: PSHDR_5_OFFSET =
  WHEN(PSHDR_5_TEST_OFFSET >= PSHDR_MAX_OFFSET) ASSIGN(99999)
  ELSE  ASSIGN(PSHDR_5_TEST_OFFSET)
*
FIELD:   PSHDR_5_LEN DISP(0) LEN(2) TYPE(BIN) OFFSET(PSHDR_5_OFFSET)
FIELD:   PSHDR_5_TYP DISP(2) LEN(1) TYPE(BIN)
*
************************************************************************
* DEFINE JUST THE LENGTH AND TYPE OF THE 6TH SECTION PRESENT          *
***********************************************************************
COMPUTE: PSHDR_6_TEST_OFFSET = PSHDR_5_OFFSET + PSHDR_5_LEN
COMPUTE: PSHDR_6_OFFSET =
  WHEN(PSHDR_6_TEST_OFFSET >= PSHDR_MAX_OFFSET) ASSIGN(99999)
  ELSE  ASSIGN(PSHDR_6_TEST_OFFSET)
*
FIELD:   PSHDR_6_LEN DISP(0) LEN(2) TYPE(BIN) OFFSET(PSHDR_6_OFFSET)
FIELD:   PSHDR_6_TYP DISP(2) LEN(1) TYPE(BIN)
*
*


***********************************************************************
**** QWHA     DSECT                                                     
***********************************************************************

COMP: QWHA_OFFSET =
           WHEN(PSHDR_2_TYP = QWHSHA32)  ASSIGN(PSHDR_2_OFFSET)
           WHEN(PSHDR_3_TYP = QWHSHA32)  ASSIGN(PSHDR_3_OFFSET)
           WHEN(PSHDR_4_TYP = QWHSHA32)  ASSIGN(PSHDR_4_OFFSET)
           WHEN(PSHDR_5_TYP = QWHSHA32)  ASSIGN(PSHDR_5_OFFSET)
           WHEN(PSHDR_6_TYP = QWHSHA32)  ASSIGN(PSHDR_6_OFFSET)
           ELSE                          ASSIGN(99999)
FLD: QWHA     DISP(0) LEN(1) OFFSET(QWHA_OFFSET)
*     /**************************************/
*     /*INSTRUMENTATION DATA SHARING HEADER */
*     /**************************************/
FLD: QWHALEN  LEN(2) TYPE(BIN) DISP(0)             /*LENGTH OF HEADER*/
FLD: QWHATYP  LEN(1) DISP(2)      /*TYPE OF HEADER DATA SHARING*/
*                         /*   NAME - QWHSHA32                       */
FLD: QWHAMEMN LEN(8) DISP(4)      /*DB2 MEMBER NAME*/
*                         /*   WITHIN A DB2 DATA SHARING GROUP, EACH */
*                         /*   MEMBER DB2 HAS A NAME.                */
FLD: QWHADSGN LEN(8) DISP(12)     /*DB2 DATA SHARING GROUP NAME*/
FLD: QWHAEND  LEN(1) DISP(20)


***********************************************************************
**** QWHC     DSECT                                                     
***********************************************************************

COMP: QWHC_OFFSET =
           WHEN(PSHDR_2_TYP = QWHSHC02)  ASSIGN(PSHDR_2_OFFSET)
           WHEN(PSHDR_3_TYP = QWHSHC02)  ASSIGN(PSHDR_3_OFFSET)
           WHEN(PSHDR_4_TYP = QWHSHC02)  ASSIGN(PSHDR_4_OFFSET)
           WHEN(PSHDR_5_TYP = QWHSHC02)  ASSIGN(PSHDR_5_OFFSET)
           WHEN(PSHDR_6_TYP = QWHSHC02)  ASSIGN(PSHDR_6_OFFSET)
           ELSE                          ASSIGN(99999)
FLD: QWHC     DISP(0) LEN(1) OFFSET(QWHC_OFFSET)
*/*****************************************************************/
*/*                                                               */
*/*             INSTRUMENTATION CORRELATION DATA                  */
*/*                                                               */
*/*****************************************************************/
FLD: QWHCLEN  LEN(2) TYPE(BIN) DISP(0)
                                  /*LENGTH OF THE CORRELATION HEADER*/
FLD: QWHCTYP  LEN(1) DISP(2)      /*TYPE OF HEADER CORRELATION 2*/
FLD: QWHCAID  LEN(8) DISP(4)      /*%U AUTHORIZATION ID*/
*                                  /*   Truncated if QWHCAID_Offª=0  */
FLD: QWHCCV   LEN(12) DISP(12)    /*CORRELATION ID VALUE*/
FLD: QWHCCN   LEN(8) DISP(24)
                      /*CONNECTION NAME (NOT VALID ON END OF MEMORY &*/
*                        REFLECTS THE MVS HOME ASID CONNECTION NAME) */
FLD: QWHCPLAN LEN(8) DISP(32)     /*PLAN NAME*/
FLD: QWHCOPID LEN(8) DISP(40)     /*%U ORIGINAL OPERATOR ID*/
*                                  /*   Truncated if QWHCOPID_Offª=0 */
FLD: QWHCATYP LEN(4) TYPE(BIN) DISP(48) /*CONNECTING SYSTEM TYPE CODE*/
FLD: QWHCTOKN LEN(22) DISP(52)    /*ACCOUNTING TOKEN*/
FLD: QWHCRES2 LEN(2) DISP(74)     /*RESERVED*/
FLD: QWHCEUID LEN(16) DISP(76)    /*THE END USER'S USERID AT THE*/
*                                  /* USER'S WORKSTATION.            */
*                                  /*   Truncated if QWHCOPID_Offª=0 */
FLD: QWHCEUTX LEN(32) DISP(92)    /*THE END USER'S TRANSACTION NAME.*/
FLD: QWHCEUWN LEN(18) DISP(124)   /*THE END USER'S WORKSTATION NAME.*/
*
FLD: QWHCAID_OFF TYPE(HALF) DISP(142)           /*Offset from QWHC to*/
*                                  /*   AUTHORIZATION ID             */
*                                  /*   If QWHCAID truncated         */
FLD: QWHCOPID_OFF TYPE(HALF) DISP(144)          /*Offset from QWHC to*/
*                                  /*   ORIGINAL OPERATOR ID         */
*                                  /*   If QWHCOPID truncated        */
FLD: QWHCEUID_OFF TYPE(HALF) DISP(146)          /*Offset from QWHC to*/
*                                  /*   THE END USER'S USERID        */
*                                  /*   If QWHCEUID truncated        */
*                                  /* Trusted context and role data  */
*                                  /* will be present if the record  */
*                                  /* is written by an agent running */
*                                  /* under a trusted context and    */
*                                  /* the trusted context data can   */
*                                  /* be accessed.                   */
FLD: QWHCTCXT_OFF TYPE(HALF) DISP(148)          /*Offset from QWHC to*/
*                                  /* Trusted Context name, if       */
*                                  /* running in a trusted context   */
FLD: QWHCROLE_OFF TYPE(HALF) DISP(150)          /*Offset from QWHC to*/
*                                  /* Role name associated with the  */
*                                  /* Authorization ID, if running   */
*                                  /* in a trusted context           */
FLD: QWHCOAUD_OFF TYPE(HALF) DISP(152) /*Offset from QWHC to original*/
*                                  /* application USERID             */
FLD: QWHCCTKN_OFF TYPE(HALF) DISP(154)          /*Offset from QWHC to*/
*                                  /* the correlation token.         */
*                                  /* V9-Present only if QWHSSUBV    */
*                                  /*    is 1 or higher.             */
FLD: QWHCEND  LEN(4) TYPE(BIN) DISP(156)
*
*
***********************************************************************
**** QWHCAID_D    DSECT            /* Use if QWHCAID_Offª=0          */ 
***********************************************************************

COMP: QWHCAID_D_OFFSET =
           WHEN(QWHC_OFFSET <> 99999 AND QWHCAID_Off <> 0)
                    ASSIGN(QWHC_OFFSET + QWHCAID_Off)
           ELSE     ASSIGN(99999)
FLD: QWHCAID_D DISP(0) LEN(1) OFFSET(QWHCAID_D_OFFSET)
                                  /*Use if QWHCAID_Offª 0*/
FLD: QWHCAID_LEN TYPE(HALF) DISP(0)   /*Length of the following field*/
FLD: QWHCAID_VAR LEN(128) DISP(2) /*%U AUTHORIZATION ID*/
COMPUTE: EDIT_QWHCAID = #LEFT(QWHCAID_VAR,QWHCAID_LEN) 

*
*
***********************************************************************
**** QWHCOPID_D   DSECT            /* Use if QWHCOPID_Offª=0         */ 
***********************************************************************

COMP: QWHCOPID_D_OFFSET =
           WHEN(QWHC_OFFSET <> 99999 AND QWHCOPID_Off <> 0)
                    ASSIGN(QWHC_OFFSET + QWHCOPID_Off)
           ELSE     ASSIGN(99999)
FLD: QWHCOPID_D DISP(0) LEN(1) OFFSET(QWHCOPID_D_OFFSET)
                                  /*Use if QWHCOPID_Offª 0*/
FLD: QWHCOPID_LEN TYPE(HALF) DISP(0)  /*Length of the following field*/
FLD: QWHCOPID_VAR LEN(128) DISP(2)/*%U ORIGINAL OPERATOR ID*/
COMPUTE: EDIT_QWHCOPID = #LEFT(QWHCOPID_VAR,QWHCOPID_LEN) 
*
*
***********************************************************************
**** QWHCEUID_D   DSECT            /* Use if QWHCEUID_Offª=0         */ 
***********************************************************************

COMP: QWHCEUID_D_OFFSET =
           WHEN(QWHC_OFFSET <> 99999 AND QWHCEUID_Off <> 0)
                    ASSIGN(QWHC_OFFSET + QWHCEUID_Off)
           ELSE     ASSIGN(99999)
FLD: QWHCEUID_D DISP(0) LEN(1) OFFSET(QWHCEUID_D_OFFSET)
                                  /*Use if QWHCEUID_Offª 0*/
FLD: QWHCEUID_LEN TYPE(HALF) DISP(0)  /*Length of the following field*/
FLD: QWHCEUID_VAR LEN(128) DISP(2)/*END USER'S USERID*/
COMPUTE: EDIT_QWHCEUID = #LEFT(QWHCEUID_VAR,QWHCEUID_LEN) 
*
*
***********************************************************************
**** QWHCTCXT_D   DSECT            /* Use if QWHCTCXT_Offª=0         */ 
***********************************************************************

COMP: QWHCTCXT_D_OFFSET =
           WHEN(QWHC_OFFSET <> 99999 AND QWHCTCXT_Off <> 0)
                    ASSIGN(QWHC_OFFSET + QWHCTCXT_Off)
           ELSE     ASSIGN(99999)
FLD: QWHCTCXT_D DISP(0) LEN(1) OFFSET(QWHCTCXT_D_OFFSET)
                                  /*Use if QWHCTCXT_Offª 0*/
FLD: QWHCTCXT_LEN TYPE(HALF) DISP(0)  /*Length of the following field*/
FLD: QWHCTCXT_VAR LEN(128) DISP(2)/*%U Trusted Context name*/
COMPUTE: EDIT_QWHCTCXT = #LEFT(QWHCTCXT_VAR,QWHCTCXT_LEN) 
*
*
***********************************************************************
**** QWHCROLE_D   DSECT            /* Use if QWHCROLE_Offª=0         */ 
***********************************************************************

COMP: QWHCROLE_D_OFFSET =
           WHEN(QWHC_OFFSET <> 99999 AND QWHCROLE_Off <> 0)
                    ASSIGN(QWHC_OFFSET + QWHCROLE_Off)
           ELSE     ASSIGN(99999)
FLD: QWHCROLE_D DISP(0) LEN(1) OFFSET(QWHCROLE_D_OFFSET)
                                  /*Use if QWHCROLE_Offª 0*/
FLD: QWHCROLE_LEN TYPE(HALF) DISP(0)  /*Length of the following field*/
FLD: QWHCROLE_VAR LEN(128) DISP(2)/*%U Role name associated with*/
COMPUTE: EDIT_QWHCROLE = #LEFT(QWHCROLE_VAR,QWHCROLE_LEN) 
*                                  /*    authid                      */
*
*
***********************************************************************
**** QWHCOAUD_D   DSECT            /* Use if QWHCOAUD_Offª=0         */ 
***********************************************************************

COMP: QWHCOAUD_D_OFFSET =
           WHEN(QWHC_OFFSET <> 99999 AND QWHCOAUD_Off <> 0)
                    ASSIGN(QWHC_OFFSET + QWHCOAUD_Off)
           ELSE     ASSIGN(99999)
FLD: QWHCOAUD_D DISP(0) LEN(1) OFFSET(QWHCOAUD_D_OFFSET)
                                  /*Use if QWHCOAUD_Offª 0*/
FLD: QWHCOAUD_LEN TYPE(HALF) DISP(0)  /*Length of the following field*/
FLD: QWHCOAUD_VAR LEN(128) DISP(2)/*%U Original application USERID*/
COMPUTE: EDIT_QWHCOAUD = #LEFT(QWHCOAUD_VAR,QWHCOAUD_LEN) 
*
*
***********************************************************************
**** QWHCCTKN_D   DSECT            /* Use if QWHCCTKN_Offª=0         */ 
***********************************************************************

COMP: QWHCCTKN_D_OFFSET =
           WHEN(QWHC_OFFSET <> 99999 AND QWHCCTKN_Off <> 0)
                    ASSIGN(QWHC_OFFSET + QWHCCTKN_Off)
           ELSE     ASSIGN(99999)
FLD: QWHCCTKN_D DISP(0) LEN(1) OFFSET(QWHCCTKN_D_OFFSET)
                                  /*Use if QWHCCTKN_Offª 0*/
FLD: QWHCCTKN_LEN TYPE(HALF) DISP(0)  /*Length of the following field*/
FLD: QWHCCTKN_VAR LEN(128) DISP(2)/*%U Correlation token.*/
COMPUTE: EDIT_QWHCCTKN = #LEFT(QWHCCTKN_VAR,QWHCCTKN_LEN) 
*
*
*/*****************************************************************/
*/*      CONNECTION SYSTEM TYPE CONSTANTS                         */
*/*****************************************************************/
*
COMP: QWHCTSO = X'1'              /*TSO FOREGROUND AND BACKGROUND*/
COMP: QWHCDB2C = X'2'             /*DB2 CALL ATTACH*/
COMP: QWHCDLIB = X'3'             /*DL/I BATCH*/
COMP: QWHCCICS = X'4'             /*CICS ATTACH*/
COMP: QWHCIMSB = X'5'             /*IMS ATTACH BMP*/
COMP: QWHCIMSM = X'6'             /*IMS ATTACH MPP*/
COMP: QWHCDUW = X'7'              /*DB2 PRIVATE PROTOCOL*/
COMP: QWHCRUW = X'8'              /*DRDA PROTOCOL*/
COMP: QWHCICTL = X'9'             /*IMS CONTROL REGION*/
COMP: QWHCTBMP = X'A'             /*IMS TRANSACTION BMP*/
COMP: QWHCUTIL = X'B'             /*DB2 UTILITIES*/
COMP: QWHCTRRS = X'C'             /*RRSAF ATTACH*/
***********************************************************************
**** QWHT     DSECT                                                     
***********************************************************************

COMP: QWHT_OFFSET =
           WHEN(PSHDR_2_TYP = QWHSHT04)  ASSIGN(PSHDR_2_OFFSET)
           WHEN(PSHDR_3_TYP = QWHSHT04)  ASSIGN(PSHDR_3_OFFSET)
           WHEN(PSHDR_4_TYP = QWHSHT04)  ASSIGN(PSHDR_4_OFFSET)
           WHEN(PSHDR_5_TYP = QWHSHT04)  ASSIGN(PSHDR_5_OFFSET)
           WHEN(PSHDR_6_TYP = QWHSHT04)  ASSIGN(PSHDR_6_OFFSET)
           ELSE                          ASSIGN(99999)
FLD: QWHT     DISP(0) LEN(1) OFFSET(QWHT_OFFSET)
*     /*INSTRUMENTATION TRACE HEADER DATA  */
FLD: QWHTLEN  LEN(2) TYPE(BIN) DISP(0)             /*LENGTH OF HEADER*/
FLD: QWHTTYP  LEN(1) DISP(2)      /*TYPE OF HEADER TRACE*/
FLD: QWHTFLG0 LEN(1) DISP(3)      /*FLAGS*/
COMP: QWHTALFG = X'20'            /*ON DATA USES ALET TOKEN*/
FLD: QWHTTID  TYPE(HALF) DISP(4)  /*ID SPECIFIED DSNWTRC MACRO*/
FLD: QWHTTAG  LEN(1) DISP(6)      /*TAG SPECIFIED DSNWTRC MACRO*/
FLD: QWHTFUNC LEN(1) DISP(7)      /*FUNC SPECIFIED DSNWTRC MACRO*/
FLD: QWHTEB   LEN(4) TYPE(BIN) DISP(8)                   /*EB ADDRESS*/
FLD: QWHTPASI TYPE(HALF) DISP(12) /*PASID EPAR*/
*  /*FOLLOWING FIELDS BELONG TO CALLERS MODULE WHICH INVOKED TRACE*/
FLD: QWHTR14A TYPE(HALF) DISP(14) /*REGISTER 14 ASID*/
FLD: QWHTR14  LEN(4) TYPE(BIN) DISP(16)                 /*REGISTER 14*/
FLD: QWHTR15  LEN(4) TYPE(BIN) DISP(20)                 /*REGISTER 15*/
FLD: QWHTR0   LEN(4) TYPE(BIN) DISP(24)                  /*REGISTER 0*/
FLD: QWHTR1   LEN(4) TYPE(BIN) DISP(28)                  /*REGISTER 1*/
FLD: QWHTEXU  LEN(4) TYPE(BIN) DISP(32)
                                  /*ADDRESS OF MVS EXECUTION UNIT*/
FLD: QWHTDIM  TYPE(HALF) DISP(36) /*NUMBER OF DATA ITEMS*/
FLD: QWHTHASI TYPE(HALF) DISP(38) /*HOME ASID*/
*  /*THE FOLLOWING FIELDS REPEAT FOR EACH  DATA ITEM              */
FLD: QWHTDATA LEN(4) TYPE(BIN) DISP(40)         /*ADDRESS OF THE DATA*/
FLD: QWHTFLAG TYPE(HALF) DISP(44) /*FLAGS IN THE TRACE LIST*/
FLD: QWHTDATL TYPE(HALF) DISP(46) /*LENGTH OF THE DATA*/
FLD: QWHTEND  LEN(4) TYPE(BIN) DISP(48)
FLD: QWHTALET LEN(4) TYPE(BIN) DISP(48)   /*ALET TOKEN FOR DATA FIELD*/


***********************************************************************
**** QWHU     DSECT                                                     
***********************************************************************

COMP: QWHU_OFFSET =
           WHEN(PSHDR_2_TYP = QWHSHU08)  ASSIGN(PSHDR_2_OFFSET)
           WHEN(PSHDR_3_TYP = QWHSHU08)  ASSIGN(PSHDR_3_OFFSET)
           WHEN(PSHDR_4_TYP = QWHSHU08)  ASSIGN(PSHDR_4_OFFSET)
           WHEN(PSHDR_5_TYP = QWHSHU08)  ASSIGN(PSHDR_5_OFFSET)
           WHEN(PSHDR_6_TYP = QWHSHU08)  ASSIGN(PSHDR_6_OFFSET)
           ELSE                          ASSIGN(99999)
FLD: QWHU     DISP(0) LEN(1) OFFSET(QWHU_OFFSET)
*/********************************************************************/
*/*              INSTRUMENTATION CPU HEADER DATA                     */
*/********************************************************************/
FLD: QWHULEN  LEN(2) TYPE(BIN) DISP(0)             /*LENGTH OF HEADER*/
FLD: QWHUTYP  LEN(1) DISP(2)     /*TYPE OF HEADER CPU MAPPED QWHSHU08*/
FLD: QWHUCPU  TYPE(STCKTIME) DISP(4)
                               /*CPU time of the currently dispatched*/
*                      /* execution unit (TCB or SRB).  This    */
*                      /* time includes CPU consumed on an IBM  */
*                      /* specialty engine.                     */
*                      /* Note: A given ACE token may           */
*                      /* run under one or more MVS dispatchable*/
*                      /* execution units. Thus the CPU time for*/
*                      /* a given ACE may decrease between      */
*                      /* events.  Binary zero indicates        */
*                      /* CPU time was not available.           */
FLD: QWHUCNT  LEN(2) DISP(12)     /*(S) COUNT FIELD RESERVED*/
FLD: QWHUEND  LEN(1) DISP(14)


***********************************************************************
**** QWHD     DSECT                                                     
***********************************************************************

COMP: QWHD_OFFSET =
           WHEN(PSHDR_2_TYP = QWHSHD16)  ASSIGN(PSHDR_2_OFFSET)
           WHEN(PSHDR_3_TYP = QWHSHD16)  ASSIGN(PSHDR_3_OFFSET)
           WHEN(PSHDR_4_TYP = QWHSHD16)  ASSIGN(PSHDR_4_OFFSET)
           WHEN(PSHDR_5_TYP = QWHSHD16)  ASSIGN(PSHDR_5_OFFSET)
           WHEN(PSHDR_6_TYP = QWHSHD16)  ASSIGN(PSHDR_6_OFFSET)
           ELSE                          ASSIGN(99999)
FLD: QWHD     DISP(0) LEN(1) OFFSET(QWHD_OFFSET)
*/********************************************************************/
*/*             INSTRUMENTATION DISTRIBUTED DATA                     */
*/********************************************************************/
FLD: QWHDLEN  LEN(2) TYPE(BIN) DISP(0)
                                  /*LENGTH OF THE DISTRIBUTED HEADER*/
FLD: QWHDTYP  LEN(1) DISP(2)      /*TYPE OF HEADER DISTRIBUTED 16*/
FLD: QWHDRQNM LEN(16) DISP(4)
                         /*%U REQUESTER LOCATION NAME BLANK IF HEADER*/
*                            IS WRITTEN AT APPLICATION REQUESTER SITE
*                            THE NAME BY WHICH DB2 KNOWS THE APPLI-
*                            REQUESTER
*                            Truncated if QWHDRQNM_Offª=0
FLD: QWHDTSTP LEN(8) DISP(20)     /*TIMESTAMP FOR DBAT TRACE RECORDS*/
FLD: QWHDSVNM LEN(16) DISP(28)
                         /*%U SRVNAM PARAMETER OF DRDA EXCSAT COMMAND*/
*                            WHAT A DRDA REQUESTER CALLS ITSELF.
*                            FOR PRIVATE PROTOCOLS SAME AS QWHDRQNM.
*                            ZEROES IF HEADER IS WRITTEN AT
*                            APPLICATION REQUESTER SITE.
*                            Truncated if QWHDSVNM_Offª=0
FLD: QWHDPRID LEN(8) DISP(44)
                             /*PRDID PARAMETER OF DRDA ACCRDB COMMAND*/
*                            PRODUCT ID OF APPLICATION REQUESTER.
*                            FOR PRIVATE PROTOCOLS THIS FIELD WILL
*                            BE SET TO AN APPROPRIATE PRODUCT ID VALUE
*                            ZEROES IF HEADER IS WRITTEN AT APPLICA-
*                            TION REQUESTER SITE.
FLD: QWHDRQNM_OFF TYPE(HALF) DISP(52)           /*Offset from QWHD to*/
*                            REQUESTER LOCATION NAME
*                            If QWHDRQNM truncated
FLD: QWHDSVNM_OFF TYPE(HALF) DISP(54)              /*Offset from QWHD*/
*                            SRVNAM PARAMETER OF DRDA EXCSAT COMMAND
*                            If QWHDSVNM truncated
FLD: QWHDEND  LEN(4) TYPE(BIN) DISP(56)
*
*
*
***********************************************************************
**** QWHDRQNM_D   DSECT   Use if QWHDRQNM_Offª=0                        
***********************************************************************

COMP: QWHDRQNM_D_OFFSET =
           WHEN(QWHD_OFFSET <> 99999 AND QWHDRQNM_Off <> 0)
                    ASSIGN(QWHD_OFFSET + QWHDRQNM_Off)
           ELSE     ASSIGN(99999)
FLD: QWHDRQNM_D DISP(0) LEN(1) OFFSET(QWHDRQNM_D_OFFSET)
                                  /*Use if QWHDRQNM_Offª 0*/
FLD: QWHDRQNM_LEN TYPE(HALF) DISP(0)  /*Length of the following field*/
FLD: QWHDRQNM_VAR LEN(128) DISP(2)/*%U REQUESTER LOCATION NAME*/
COMPUTE: EDIT_QWHDRQNM = #LEFT(QWHDRQNM_VAR,QWHDRQNM_LEN) 
*
*
*
***********************************************************************
**** QWHDSVNM_D   DSECT   Use if QWHDSVNM_Offª=0                        
***********************************************************************

COMP: QWHDSVNM_D_OFFSET =
           WHEN(QWHD_OFFSET <> 99999 AND QWHDSVNM_Off <> 0)
                    ASSIGN(QWHD_OFFSET + QWHDSVNM_Off)
           ELSE     ASSIGN(99999)
FLD: QWHDSVNM_D DISP(0) LEN(1) OFFSET(QWHDSVNM_D_OFFSET)
                                  /*Use if QWHDSVNM_Offª 0*/
FLD: QWHDSVNM_LEN TYPE(HALF) DISP(0)  /*Length of the following field*/
FLD: QWHDSVNM_VAR LEN(128) DISP(2)
                         /*%U SRVNAM PARAMETER OF DRDA EXCSAT COMMAND*/
COMPUTE: EDIT_QWHDSVNM = #LEFT(QWHDSVNM_VAR,QWHDSVNM_LEN) 
*********************************************************************
* NOTE - MANY IFC RECORDS HAVE FIELDS IDENTIFIED BY DATA BASE       *
*  ID (DBID) AND PAGESET OBID. SOMETIMES RECORD OBID AND AN INDEX   *
*  OBID ARE ALSO PRESENT (RMID 14 PRODUCED RECORDS).                *
*  IFC ID 0105 AND 0107 IDENTIFY DBID AND PAGESET OBID TO DATA BASE *
*  AND PAGESET NAME. A PAGESET MAY BE A TABLESPACE OR INDEXSPACE    *
*                                                                   *
*  IF ONE DESIRES TO FIND THE PAGESET NAME IN THE DB2 SYSTEM CATALOG*
*  PLACE THE VALUES OF THE  DATA BASE ID (DBID)                     *
*  AND THE PAGESET OBID INTO A SQL WHERE CLAUSE USING               *
*  THE COLUMNS SPECIFIED BELOW FOR RELEASE 2.                       *
*   1.FOR A TABLESPACE THE COLUMNS DBID AND PSID IN                 *
*     SYSIBM.SYSTABLESPACE ARE USED.                                *
*   2.FOR AN INDEX     THE COLUMNS DBID AND ISOBID IN               *
*     SYSIBM.SYSINDEXES ARE USED.                                   *
*                                                                   *
*  IF ONE DESIRES TO FIND THE TABLE NAME ASSOCIATED WITH A RECORD   *
*  OBID THEN PLACE THE VALUES OF THE  DATA BASE ID (DBID)           *
*  AND THE RECORD OBID INTO A SQL WHERE CLAUSE USING                *
*  THE COLUMNS SPECIFIED BELOW FOR RELEASE 2.                       *
*   1.USE THE COLUMNS DBID AND OBID IN                              *
*     SYSIBM.SYSTABLES.                                             *
*                                                                   *
*  IF ONE DESIRES TO FIND THE INDEX NAME ASSOCIATED WITH AN INDEX   *
*  OBID THEN PLACE THE VALUES OF THE  DATA BASE ID (DBID)           *
*  AND THE INDEX OBID INTO A SQL WHERE CLAUSE USING                 *
*  THE COLUMNS SPECIFIED BELOW FOR RELEASE 2.                       *
*   1.USE THE COLUMNS DBID AND OBID IN                              *
*     SYSIBM.SYSINDEXES                                             *
*                                                                   *
*                                                                   *
* - -	- - - - - NOTE TO SPECTRUM SMF WRITER USERS - - - - - - - - - *
*   YOU CAN PERFORM THE DATABASE NAME LOOKUPS DESCRIBED ABOVE       *
*   IF YOU HAVE PURCHASED THE DB2 OPTION FOR SPECTRUM SMF WRITER.   *
*   CALL US FOR A FREE 30-DAY TRIAL OF THE DB2 OPTION.              *
*                                                                   *
*********************************************************************
*
*  NOTE: FIELDS DEFINED AS CHARACTER MAY CONTAIN HEX DATA
*
*********************************************************************

*/********************************************************************/
*/* IFC ID 0063 FOR RMID 22 RECORDS                                  */
*/*             THE SQL STATEMENT - PRODUCED BY THE PARSER           */
*/*             WRITTEN DURING BIND OF DYNAMIC OR STATIC SQL         */
*/*  NOTE: THE MAXIMUM LENGTH OF ANY TRACE FIELD IS 5000 (DECIMAL)   */
*/*        BYTES.  THEREFORE, THE USER SHOULD BE AWARE THAT THE SQL  */
*/*        STATEMENT AT THE END OF IFCID 63 WILL BE TRUNCATED        */
*/*        AFTER REACHING 5000 (DECIMAL) BYTES.                      */
*/********************************************************************/ 
***********************************************************************
**** QW0063   DSECT                                                    
***********************************************************************

COMP: QW0063_OFFSET =
  WHEN(SM102RTY<>102 OR QWHSIID<>63 OR QWT02R1N = 0) ASSIGN(99999)
  ELSE                                               ASSIGN(QWT02R1O)
FLD: QW0063   DISP(0) LEN(132) OFFSET(QW0063_OFFSET)
FLD: QW0063OT LEN(1) DISP(0)      /*PARSER OPTIONS AND HOST LANGUAGE*/
*        THE FOLLOWING EQUATES MAP THE PARSER OPTIONS AND HOST LANG    
COMP: QW0063OQ = X'80'            /*OPTION APOST(0) OR QUOTE(1)*/
COMP: QW0063OD = X'40'            /*OPTION PERIOD(0) OR COMMA(1)*/
COMP: QW0063OR = X'20'            /*OPTION APOSTSQL(0) OR QUOTESQL(1)*/
COMP: QW0063OM = X'10'         /*OPTION MIXED NO (0) OR MIXED YES (1)*/
COMP: QW0063OH = X'07'            /*OPTION HOST LANGUAGE BIT MASK*/
COMP: QW0063OA = 1                /*OPTION HOST ASSEMBLER LANGUAGE*/
COMP: QW0063OC = 2                /*OPTION HOST COBOL*/
COMP: QW0063OP = 3                /*OPTION HOST PL/I*/
COMP: QW0063OS = 4                /*OPTION DYNAMIC SQL*/
COMP: QW0063OF = 5                /*OPTION HOST FORTRAN*/
COMP: QW0063O2 = 6                /*OPTION HOST COB2*/
COMP: QW006307 = 7              /*LOOK AT FIELD QW0063HL TO DETERMINE*/
FLD: QW0063HL LEN(1) DISP(1)      /*HOST LANGUAGE SECOND FIELD*/
*              THIS FIELD MUST BE USED TO DETERMINE THE HOST LANGUAGE 
*              IF THE HOST LANGUAGE BIT MASK IS 7 ABOVE. THIS FIELD   
*              MAY OPTIONALLY BE USED IF THE HOST LANGUAGE BIT MASK   
*              IS NOT 7.                                              
COMP: QW0063HB = 'B'              /*OPTION HOST ASSEMBLER*/
COMP: QW0063HC = 'C'              /*OPTION HOST COBOL*/
COMP: QW0063HD = 'D'              /*OPTION HOST C*/
COMP: QW0063HF = 'F'              /*OPTION HOST FORTRAN*/
COMP: QW0063HP = 'P'              /*OPTION HOST PL/I*/
COMP: QW0063H2 = '2'              /*OPTION HOST COBOL II*/
COMP: QW0063H3 = '3'              /*OPTION HOST IBM COBOL*/
COMP: QW0063H4 = '4'              /*OPTION HOST C++*/
FLD: QW0063LL LEN(2) TYPE(BIN) DISP(2)
                                  /*LL LENGTH OF FOLLOWING FIELD + 2*/
FLD: QW0063ST LEN(1) DISP(4)
                            /*%U SQL STATEMENT REQUESTED TO BE PARSED*/
*                            LENGTH OF STATEMENT IS QW0063LL          
*                            BEGINNING WITH DB2 V2R3, HOST VARIABLES  
*                            IN SQL STATEMENTS ARE REPRESENTED AS     
*                            " :H " IN IFC ID 0063.                   
*                            THE SQL STATEMENT IS TRUNCATED AFTER    
*                            REACHING 5000 (DECIMAL) BYTES.          
*                                                                    
FLD: EDIT_QW0063ST DISP(QW0063ST) LEN(QW0063LL -2) MAXLEN(128)
***********************************************************************
**** QW0063B   DSECT   
***********************************************************************

COMP: QW0063_OFFSET =
  WHEN(SM102RTY<>102 OR QWHSIID<>63 OR QWT02R2N = 0) ASSIGN(99999)
  ELSE                                               ASSIGN(QWT02R2O)
FLD: QW0063B  DISP(0) LEN(122) OFFSET(QW0063B_OFFSET)
*! This section is located out of QWT02R2O.                          
FLD: QW0063TY LEN(2) DISP(0)      /*Type of statement*/
COMP: QW0063DY = X'8000'          /*Statement is dynamic*/
COMP: QW0063SC = X'4000'          /*Statement is static*/
FLD: QW0063SI LEN(8) DISP(2)      /*statement identifier*/
FLD: QW0063CC LEN(2) DISP(10)     /*Original source CCSID for parser*/
*                                                                    

*********************************************************************** 
*   HEADER FOR IFC ID 0172 FOR RMID 20 RECORDS                          
*********************************************************************** 
***********************************************************************
**** QW0172HE DSECT                                                     
***********************************************************************

COMP: QW0172HE_OFFSET =
  WHEN(SM102RTY<>102 OR QWHSIID<>172 OR QWT02R1N = 0) ASSIGN(99999)
  ELSE                                                ASSIGN(QWT02R1O)
FLD: QW0172HE DISP(0) LEN(1) OFFSET(QW0172HE_OFFSET)
FLD: QW0172IT LEN(4) TYPE(BIN) DISP(0)    /*DEADLOCK INTERVAL COUNTER*/
FLD: QW0172NR LEN(4) TYPE(BIN) DISP(4)
                                  /*NUMBER OF RESOURCES INVOLVED IN*/
*                          DEADLOCK                                     
FLD: QW0172TD TYPE(STCKTIME) DISP(8)
                                  /*TIME (STCK) DEADLOCK WAS DETECTED*/
*                                                                       
*********************************************************************** 
*   IFC ID 0172 FOR RMID 20 RECORDS                                     
*   DETAILS ALL OF THE UNITS OF WORK INVOLVED IN THE DEADLOCK, THE      
*   RESOURCE THEY WERE CONTENDING FOR, AND THE ATTRIBUTES OF THEIR      
*   REQUESTS.  1 per RNA in the deadlock                                
*********************************************************************** 
***********************************************************************
**** QW0172   DSECT                                                     
***********************************************************************

***********************************************************************
* TO REPORT ON ALL OCCURRENCES OF QW0172, USE:
*    INPUT: SM102B12
*           NORMWHEN(QW0172HE_OFFSET <> 99999 AND QW0172NR <> 0)
*           NORMALIZE(QW0172, QW0172NR)
***********************************************************************
COMP: QW0172_OFFSET =
  WHEN(QW0172HE_OFFSET = 99999 OR QW0172NR= 0)    ASSIGN(99999)
  ELSE                                            ASSIGN(QWT02R1O + 16)
FLD: QW0172   DISP(0) LEN(496) OFFSET(QW0172_OFFSET)
FLD: QW0172RH LEN(4) DISP(0)      /*RESOURCE NAME HASH VALUE*/
FLD: QW0172RN LEN(32) DISP(4)     /*RESOURCE NAME COMPOSED OF:*/
FLD: QW0172RL LEN(1) TYPE(BIN) DISP(4)    /*()LENGTH OF THE LOCK NAME*/
FLD: QW0172FR LEN(1) DISP(7)   /*()FLAGS FOR THE LOCKED RESOURCE TYPE*/
*                                                                       
*   **..............QW0172FR CONSTANTS...............................** 
*QW0172R0 EQU   X'00'              DATA PAGE LOCKING                    
*QW0172R1 EQU   X'01'              DATA BASE LOCKING                    
*QW0172R2 EQU   X'02'              PAGESET LOCKING                      
*QW0172R3 EQU   X'03'              PARTITIONED TABLESPACE LOCKING       
*QW0172R4 EQU   X'04'              SKELETON CURSOR TABLE LOCKING        
*QW0172R5 EQU   X'05'              INDEX PAGE LOCKING                   
*QW0172R6 EQU   X'06'              PARTITION LOCKING                    
*QW0172R7 EQU   X'07'              PAGESET OR DATA SET OPEN LOCK        
*QW0172R8 EQU   X'08'              (S)                                  
*QW0172R9 EQU   X'09'              (S)                                  
*QW0172RA EQU   X'0A'              START/STOP LOCK ON DBA TABLE         
*QW0172RB EQU   X'0B'              (S)                                  
*QW0172RC EQU   X'0C'              (S)                                  
*QW0172RD EQU   X'0D'              SYSLGRNG RECORDING LOCK              
*QW0172RE EQU   X'0E'              UTILITY SERIALIZATION LOCK           
*QW0172RF EQU   X'0F'              MASS DELETE LOCK                     
*QW0172RG EQU   X'10'              TABLE LOCKING                        
*QW0172RI EQU   X'11'              HASH ANCHOR LOCK                     
*QW0172RJ EQU   X'12'              SKELETON PACKAGE TABLE LOCK          
*QW0172RK EQU   X'13'              COLLECTION LOCK                      
*QW0172RO EQU   X'14'              CS-READ DRAIN LOCK                   
*QW0172RW EQU   X'15'              RR-READ DRAIN LOCK                   
*QW0172RQ EQU   X'16'              WRITE DRAIN LOCK                     
*QW0172RM EQU   X'17'              AUTOBIND/REMOTE BIND LOCK            
*QW0172RR EQU   X'1A'              ALTER BUFFERPOOL LOCK                
*QW0172RT EQU   X'1B'              GROUP BUFFERPOOL START/STOP LOCK     
*QW0172MR EQU   X'18'              ROW LOCK                             
*QW0172MI EQU   X'19'              INDEX END-OF-FILE LOCK               
*QW0172M2 EQU   X'24'              CATMAINT convert directory lock      
*QW0172M3 EQU   X'25'              CATMAINT convert catalog lock        
*QW0172M4 EQU   X'26'              CATMAINT migration lock              
*QW0172M5 EQU   X'27'              DB exception LPL/GRECP lock          
*QW0172M6 EQU   X'28'              Utility UID lock                     
*QW0172M7 EQU   X'29'              Utility exclusive execution lock     
*QW0172M8 EQU   X'2A'              SCA access for restart/redo info     
*QW0172M9 EQU   X'2B'              Group database exception update      
*QW0172MC EQU   X'2C'              REPAIR DBD TEST/DIAGNOSE             
*QW0172MB EQU   X'2D'              Database command serialization       
*QW0172MX EQU   X'2F'              (S)                                  
*QW0172MO EQU   X'30'              LOB lock                             
*QW0172MM EQU   X'32'              LPL recovery lock                    
*QW0172MN EQU   X'33'              hdr page hash bucket lock            
*QW0172MD EQU   X'35'              XML lock                             
*QW0172DL EQU   X'39'              DBD Load lock                        
*QW0172AC EQU   X'3A'              Accel services commands              
*QW0172IK EQU   X'3D'              Index key lock                       
*QW0172FS EQU   X'FF'              (S)                                  
*                                                                       
FLD: QW0172PN LEN(28) DISP(8)     /*LOCKED RESOURCE NAME*/
FLD: QW0172KD LEN(2) DISP(8)      /*() DATABASE ID *SEE 5. BELOW*/
FLD: QW0172KB LEN(2) DISP(10)    /*() TABLE RECORD OBID *SEE 5. BELOW*/
FLD: QW0172KP LEN(2) DISP(10)  /*() PAGESET OBID OR TABLE RECORD OBID*/
FLD: QW0172KR LEN(4) DISP(12) /*ID OF SMALL RESOURCE WHEN QW0172RL 12*/
FLD: QW0172K1 LEN(3) DISP(12)    /*1. For pageset or data base locks,*/
FLD: QW0172K2 LEN(1) DISP(15)     /*QW0172K1 and QW0172K2 are zero*/
FLD: QW0172KY LEN(5) DISP(12) /*ID of small resource when QW0172RL 13*/
FLD: QW0172K4 LEN(4) DISP(12)
                             /*page number (within large table space)*/
FLD: QW0172K5 LEN(1) DISP(16)     /*record id within page*/
FLD: QW0172KZ LEN(4) DISP(12)     /*ID of sm res when QW0172KT '33'X*/
FLD: QW0172K8 LEN(2) DISP(12)     /*partition number*/
FLD: QW0172K9 LEN(1) DISP(14)     /*hash bucket number*/
FLD: QW0172KC LEN(9) DISP(12)     /*ID of resource for XML locks*/
FLD: QW0172KX LEN(19) DISP(12)    /*ID of resource for LOB locks*/
FLD: QW0172K6 LEN(17) DISP(12)    /*Row ID*/
FLD: QW0172K7 LEN(2) DISP(29)     /*Version number*/
FLD: QW0172HP LEN(8) DISP(36)     /*Blockers PLAN NAME*/
FLD: QW0172HR LEN(12) DISP(44)    /*Blockers CORRELATION ID*/
FLD: QW0172HN LEN(8) DISP(56)     /*Blockers CONNECTION ID*/
FLD: QW0172HH LEN(30) DISP(64)    /*Blockers LUW ID & token*/
FLD: QW0172HL LEN(24) DISP(64)    /*Blocker LUWID*/
FLD: QW0172HT LEN(4) TYPE(BIN) DISP(88)        /*Blocker thread token*/
FLD: QW0172HO LEN(8) DISP(96)     /*Blockers OWNING WORK UNIT*/
FLD: QW0172HI LEN(8) DISP(104)    /*Blockers DB2 MEMBER NAME*/
FLD: QW0172HS LEN(1) DISP(112)    /*Blockers STATE*/
*                                                                       
*   **..............QW0172HS CONSTANTS...............................** 
*QW017200 EQU   X'00'                                                   
*QW017201 EQU   X'01'        UNPROTECTED SHARE                          
*QW017202 EQU   X'02'        INTENTED    SHARE                          
*QW017203 EQU   X'03'        INTENTED EXCLUSIVE                         
*QW017204 EQU   X'04'        SHARED                                     
*QW017205 EQU   X'05'        UPDATE                                     
*QW017206 EQU   X'06'        SHARED INTENT EXCLUSIVE                    
*QW017207 EQU   X'07'        NON-SHARED UPDATE                          
*QW017208 EQU   X'08'        EXCLUSIVE                                  
*                                                                       
FLD: QW0172HD LEN(1) DISP(113)    /*Blockers DURATION*/
*                                                                       
*   **..............QW0172HD CONSTANTS...............................** 
*QW017220 EQU   X'20'        MANUAL                                     
*QW017221 EQU   X'21'        MANUAL+1                                   
*QW017240 EQU   X'40'        COMMIT                                     
*QW017241 EQU   X'41'        COMMIT+1                                   
*QW017260 EQU   X'60'        ALLOCATION                                 
*QW017280 EQU   X'80'        PLAN                                       
*QW017281 EQU   X'81'        UTIL                                    @65
*QW0172FF EQU   X'FF'        DURATION TO FREE ALL LOCKS                 
*                                                                       
FLD: QW0172HF LEN(1) DISP(114)    /*(S)*/
*                                                                       
*   **..............QW0172HF CONSTANTS...............................** 
*QW0172H2 EQU   X'20'      on = blocker is waiting for the resource     
*                         off = blocker holds the resource              
*QW0172H3 EQU   X'10'        (S)                                        
*QW0172H4 EQU   X'08'        (S)                                        
*QW0172H5 EQU   X'04'        (S)                                        
*QW0172H6 EQU   X'02'        (S)                                        
FLD: QW0172WP LEN(8) DISP(116)    /*WAITERS PLAN NAME*/
FLD: QW0172WR LEN(12) DISP(124)   /*WAITERS CORRELATION ID*/
FLD: QW0172WN LEN(8) DISP(136)    /*WAITERS CONNECTION ID*/
FLD: QW0172WX LEN(30) DISP(144)   /*WAITERS LUW ID & token*/
FLD: QW0172WL LEN(24) DISP(144)   /*WAITERS LUWID*/
FLD: QW0172WT LEN(4) TYPE(BIN) DISP(168)       /*WAITERS THREAD TOKEN*/
FLD: QW0172WW LEN(8) DISP(176)    /*WAITERS REQUESTING WORK UNIT*/
FLD: QW0172WO LEN(8) DISP(184)    /*WAITERS OWNING WORK UNIT*/
FLD: QW0172WF LEN(1) DISP(192)    /*WAITERS REQUESTED FUNCTION*/
*                                                                       
*   **..............QW0172WF CONSTANTS...............................** 
*QW0172LO EQU   X'02'        LOCK FUNCTION                              
*QW0172UN EQU   X'03'        UNLOCK FUNCTION                            
*QW0172CH EQU   X'04'        CHANGE FUNCTION                            
*                                                                       
FLD: QW0172WS LEN(1) DISP(193)    /*WAITERS REQUESTED STATE*/
*                                                                       
*   **..............QW0172WS CONSTANTS...............................** 
*QW0172W1 EQU   X'01'        RESERVED                                   
*QW0172W2 EQU   X'02'        INTENTED    SHARE                          
*QW0172W3 EQU   X'03'        INTENTED EXCLUSIVE                         
*QW0172W4 EQU   X'04'        SHARED                                     
*QW0172W5 EQU   X'05'        UPDATE                                     
*QW0172W6 EQU   X'06'        SHARED INTENT EXCLUSIVE                    
*QW0172W7 EQU   X'07'        NON-SHARED UPDATE                          
*QW0172W8 EQU   X'08'        EXCLUSIVE                                  
*                                                                       
FLD: QW0172WD LEN(1) DISP(194)    /*WAITERS REQUESTED DURATION*/
*                                                                       
*   **..............QW0172WD CONSTANTS...............................** 
*QW0172MA EQU   X'20'        MANUAL                                     
*QW0172M1 EQU   X'21'        MANUAL+1                                   
*QW0172CO EQU   X'40'        COMMIT                                     
*QW0172C1 EQU   X'41'        COMMIT+1                                   
*QW0172AL EQU   X'60'        ALLOCATION                                 
*QW0172PL EQU   X'80'        PLAN                                       
*QW0172UT EQU   X'81'        UTIL                                    @65
*QW0172DU EQU   X'FF'        DURATION TO FREE ALL LOCKS                 
*                                                                       
FLD: QW0172WG LEN(1) DISP(195)    /*(S)*/
*                                                                       
*   **..............QW0172WG CONSTANTS...............................** 
*QW0172CU EQU   X'80'        (S)                                        
*QW0172AR EQU   X'40'        (S)                                        
*QW0172NU EQU   X'20'        (S)                                        
*QW0172CR EQU   X'10'        (S)                                        
*QW0172PR EQU   X'08'        (S)                                        
*QW0172RS EQU   X'04'        (S)                                        
*QW0172ML EQU   X'02'        (S)                                        
*QW0172FO EQU   X'01'        (S)                                        
*                                                                       
FLD: QW0172WA LEN(1) DISP(196)    /*WAITERS DB2 ASSIGNED WORTH VALUE*/
FLD: QW0172WI LEN(8) DISP(200)    /*WAITERS DB2 MEMBER NAME*/
FLD: QW0172HB LEN(8) DISP(208)    /*%U Holders authorization ID.*/
FLD: QW0172HC LEN(16) DISP(216)   /*Holders end user userid.*/
FLD: QW0172HJ LEN(32) DISP(232)   /*Holders transaction name.*/
FLD: QW0172HK LEN(18) DISP(264)   /*Holders workstation name.*/
FLD: QW0172HQ LEN(50) DISP(286)   /*Holders package/DBRM name*/
FLD: QW0172Q1 LEN(8) DISP(286)    /*%U Program name*/
FLD: QW0172Q2 LEN(18) DISP(294)   /*%U Package collection ID*/
FLD: QW0172Q3 LEN(16) DISP(312)   /*%U Location name*/
FLD: QW0172Q4 LEN(8) DISP(328)    /*Consistency token 64 bit*/
*                            unsigned binary integer                    
FLD: QW0172WZ LEN(8) DISP(336)    /*Statement id*/
FLD: QW0172WY LEN(2) DISP(344)    /*Statement type*/
FLD: QW0172WB LEN(8) DISP(352)    /*%U Waiters authorization ID.*/
FLD: QW0172WC LEN(16) DISP(360)   /*Waiters end user userid.*/
FLD: QW0172WJ LEN(32) DISP(376)   /*Waiters transaction name.*/
FLD: QW0172WK LEN(18) DISP(408)   /*Waiters workstation name.*/
FLD: QW0172WQ LEN(50) DISP(430)   /*Waiters package/DBRM name*/
FLD: QW0172Q5 LEN(8) DISP(430)    /*%U Program name*/
FLD: QW0172Q6 LEN(18) DISP(438)   /*%U Package collection ID*/
FLD: QW0172Q7 LEN(16) DISP(456)   /*%U Location name*/
FLD: QW0172Q8 LEN(8) DISP(472)    /*Consistency token 64 bit*/
*                            unsigned binary integer                    
FLD: QW0172HZ LEN(8) DISP(480)    /*Statement id*/
FLD: QW0172HY LEN(2) DISP(488)    /*Statement type*/
*QW0172DY EQU   X'8000'    Statement is dynamic                         
*QW0172SC EQU   X'4000'    Statement is static                          
FLD: QW0172A  LEN(28) DISP(8)     /** Locked resource name **/
FLD: QW0172A0 LEN(1) DISP(8)      /** Data Manager RMID **/
FLD: QW0172A1 LEN(5) DISP(9)      /** Constant 'GDBET' **/
FLD: QW0172A6 LEN(2) DISP(14)     /** Database exception hash class **/
*                       *  number (1-64)                         *      


*********************************************************************** 
*                                                                     * 
*   IFCID 0191 For RMID 29 Records - First Failure Data Capture       * 
*   Records in support of DDIS detected errors and non DDIS detected  * 
*   Errors which require the command/reply data stream as supporting  * 
*   evidence.                                                         * 
*                                                                     * 
***************************  DB2  AR  ********************************* 
*                                                                     * 
* The DB2 AR (through DDIS) generates 0191 records for diagnosis of   * 
* DRDA exception conditions. The 0191 record consists of a header     * 
* and other sections as follows:                                      * 
*                                                                     * 
* NOTE: All offsets within the 0191 sections are relative to the      * 
*       QW0191HD field, i.e. a single frame of reference.             * 
*                                                                     * 
* (1) QW0191HD: The header identifies the DDM command, the total      * 
*     number of RPYDSSs received in response to this command and      * 
*     the total number of OBJDSSs received in response to this com-   * 
*     mand. The DDIS DSNLZRPA parse trace (last 5 states and events)  * 
*     is also included here. The DB2 parse state (QW0191PA) is P1.    * 
*                                                                     * 
*                                                                     * 
* (2) QW0191CR: For each reply message parsed (success or failure),   * 
*     or reply data object parsed (success or failure), one           * 
*     QW0191CR section is included. This section contains the reply   * 
*     message code point or reply data object code point, relative    * 
*     RPYDSS or OBJDSS number within the total number of DSSs re-     * 
*     ceived, and the disposition of the reply message/data parse.    * 
*     The data stream is recorded and the offset to the beginning     * 
*     of the RPYDSS (if reply message) or the OBJDSS (if reply data)  * 
*     is given in QW0191OF. If the object parse state indicates fail  * 
*     ('DRDAFAIL') then the offset into the (RPY/OBJ) DSS, found in   * 
*     QW0191FO, is the point at which the parse failed. Both the      * 
*     type of error and source of error are recorded in this section. * 
*     Refer to the Diagnosis Reference Guide for a discussion of      * 
*     error diagnosis.                                                * 
*                                                                     * 
*                                                                     * 
* (3) QW0191FD: If the reply data object defined in the QW0191CR      * 
*     section is a QRYDSC (X'241A') or an SQLDTARD (X'2413'), then    * 
*     the reply data object contains an FD:OCA Late Descriptor. The   * 
*     QW0191CR field QW0191D1 contains the offset relative to the     * 
*     start of the 0191 record of the QW0191FD section. This section  * 
*     records FD:OCA parameters established during the descriptor     * 
*     parse and are required to validate the geometry of the desc-    * 
*     riptor. Refer to the Diagnosis Guide for an interpretation of   * 
*     this section.                                                   * 
*                                                                     * 
*                                                                     * 
* (4) QW0191RT: If the reply data object defined in the QW0191CR      * 
*     section is described by an FD:OCA Late Descriptor, then QW0191D2* 
*     contains the offset within the 0191 record of the DB2 (DDIS)    * 
*     RDTA data structure which represents the relationship between   * 
*     the SQL data types and DRDA FD:OCA types sent in the Late       * 
*     Descriptor. Refer to the Diagnosis Guide for a description      * 
*     of this data structure and how to map the RDTA to a DB2 SQLDA.  * 
*                                                                     * 
* (5) QW0191LT: If the reply data object defined in the QW0191CR      * 
*     section is described by an FD:OCA Early or Late Descriptor,     * 
*     then QW0191D3 contains the offset within the 0191 record of     * 
*     the DB2 (DDIS) FD_LIDLST data structure which represents the    * 
*     FD:OCA descriptor used to interpret the data within the OBJDSS. * 
*     Refer to the Diagnosis Guide for a description of this data     * 
*     structure and how to map the FD_LIDLST to the data stream.      * 
*                                                                     * 
* (6) QW01916B: The QW01916B section contains the level 6b RPYDSS     * 
*     or OBJDSS data stream.                                          * 
*                                                                     * 
*     Examples:                                                       * 
*                                                                     * 
*     Reply Message only:                                             * 
*                                                                     * 
*           QW0191HD---QW0191CR---QW01916B (data stream)              * 
*                                                                     * 
*     Reply Message followed by Reply Data (Descriptor):              * 
*                                                                     * 
*           QW0191HD---QW0191CR---QW0191FD---QW01916B (data stream)   * 
*                                                                     * 
*     Reply Data described by Early Descriptor:                       * 
*                                                                     * 
*           QW0191HD---QW0191CR---QW0191LT---QW01916B (data stream)   * 
*                                                                     * 
*     Reply Data described by Late Descriptor:                        * 
*                                                                     * 
*           QW0191HD---QW0191CR---QW0191RT---QW0191LT---QW01916B      * 
*                                                       (data stream) * 
*                                                                     * 
***************************  DB2  AS  ********************************* 
*                                                                     * 
* The DB2 AS (through DDIS) generates 0191 records to diagnose        * 
* DRDA exception conditions. The 0191 record consists of a header     * 
* and other sections as follows:                                      * 
*                                                                     * 
* NOTE: All offsets within the 0191 sections are relative to the      * 
*       field QW0191HD. i.e. a single frame of reference.             * 
*                                                                     * 
* (1) QW0191HD: The header identifies the DDM command received and    * 
*     the total number of OBJDSSs chained to the DDM command. The     * 
*     DDIS DSNLZSPA parse trace (last 5 states and events) is also    * 
*     included here. If the command parse failed, then QW0191CS is    * 
*     'DRDACMFA' and QW0191OF is the relative offset within the 0191  * 
*     record of the level 6b RQSDSS containing the DDM command.       * 
*     The parse state (QW0191PA) is P2.                               * 
*                                                                     * 
* (2) QW0191CR: For each command data object parsed (success or       * 
*     failure), one QW0191CR section is included. This section        * 
*     contains the command data code point, relative OBJDSS number    * 
*     and the state of the command data parse ('DRDASUCC'/'DRDAFAIL').* 
*     The offset to the beginning of the level 6b OBJDSS (data stream)* 
*     is contained in QW0191OF. If the object parse failed (QW0191PA  * 
*     is 'DRDAFAIL'), then the offset into the OBJDSS, defining the   * 
*     point at which the parse failed, is contained in QW0191FO. Both * 
*     the type and source of error are recorded in this section.      * 
*     Refer to the Diagnosis Reference Guide for a discussion of      * 
*     error diagnosis.                                                * 
*                                                                     * 
*                                                                     * 
* (3) QW0191FD: If the command data object defined in the QW0191CR    * 
*     section is an SQLDTA (X'2412'), then the command data object    * 
*     contains an FD:OCA Late Descriptor and the QW0191D1 field       * 
*     within QW0191CR contains the offset within the 0191 record      * 
*     of the QW0191FD section. This section records FD:OCA            * 
*     parameters established during the descriptor parse and are      * 
*     required to validate the geometry of the descriptor. Refer to   * 
*     the Diagnosis Guide for an interpretation of this section.      * 
*                                                                     * 
* (4) QW0191RT: If the reply data object defined in the QW0191CR      * 
*     section is described by an FD:OCA Late Descriptor, then QW0191D2* 
*     contains the offset within the 0191 record of the DB2 (DDIS)    * 
*     RDTA data structure which represents the relationship between   * 
*     the SQL data types and DRDA FD:OCA types sent in the Late       * 
*     Descriptor. Refer to the Diagnosis Guide for a description      * 
*     of this data structure and how to map the RDTA to a DB2 SQLDA.  * 
*     At server, QW0191RT section will not be trace any more.         * 
*                                                                     * 
* (5) QW0191LT: If the command data object defined in the QW0191CR    * 
*     section is described by an FD:OCA Early or Late Descriptor,     * 
*     then QW0191D3 contains the offset within the 0191 record of     * 
*     the DB2 (DDIS) FD_LIDLST data structure which represents the    * 
*     FD:OCA descriptor used to interpret the data within the OBJDSS. * 
*     Refer to the Diagnosis Guide for a description of this data     * 
*     structure and how to map the FD_LIDLST to the data stream.      * 
*     At server, QW0191LT still is used to trace lidlst other than    * 
*     LIDLST for input SQLDTA object.                                 * 
*                                                                     * 
* (6) QW01916B: The QW01916B section contains the level 6b RPYDSS     * 
*     or OBJDSS data stream.                                          * 
*                                                                     * 
* (7) QW0191EA: If the command data object defined in the QW0191CR    * 
*     section is described by an FD:OCA Late Descriptor, then QW0191D4* 
*     contains the offset within the 0191 record of the DB2 (DDIS)    * 
*     ZEDA data structure which represents the SQL data types and its * 
*     data position and parsing information from the Late Descriptor  * 
*     Refer to the Diagnosis Guide for a description of this data     * 
*     structure and how to map the ZEDA to a DB2 SQLDA.               * 
*                                                                       
*     Examples:                                                       * 
*                                                                     * 
*     Command Only                                                    * 
*                                                                     * 
*           QW0191HD---QW01916B (data stream)                         * 
*                                                                     * 
*     Command data (Descriptor):                                      * 
*                                                                     * 
*           QW0191HD---QW0191CR---QW0191FD---QW01916B (data stream)   * 
*                                                                     * 
*     Command Data described by Early Descriptor:                     * 
*                                                                     * 
*           QW0191HD---QW0191CR---QW0191LT---QW01916B (data stream)   * 
*                                                                     * 
*     Command Data described by Late Descriptor:                      * 
*                                                                     * 
*           QW0191HD---QW0191CR---QW0191EA---QW01916B                 * 
*                                                       (data stream) * 
*                                                                     * 
**********************************************************************/ 
*                                                                       
*          **IFCID 0191 for RMID 29 - DDM LEVEL 6B OBJECTS**            
*                                                                       
***********************************************************************
**** QW0191   DSECT                IFCID(QWHS0191)                      
***********************************************************************

***********************************************************************
* TO REPORT ON ALL OCCURRENCES OF QW0191, USE:
* INPUT: SM102B11
*        IOEXIT('GENNORM','A 102 --- 036 2I N | 028 004 2 00191')
***********************************************************************
COMP: QW0191_OFFSET =
  WHEN(SM102RTY<>102 OR QWHSIID<>191 OR QWT02R1N = 0) ASSIGN(99999)
  ELSE                                              ASSIGN(QWT02R1O)
FLD: QW0191   DISP(0) LEN(1) OFFSET(QW0191_OFFSET)  /*IFCID(QWHS0191)*/
* The following two byte field may repeat several times within IFCID    
* 191.  This is because the maximum length of any one 191 record is     
* slightly less than 32K, but the maximum length of any one data block  
* is 5000 decimal bytes.  An IFCID 191 record may be composed of        
* multiple data blocks within the single data section pointed to by     
* self-defining section pointer QWT02R1O.  All such blocks are          
* preceded by a length field.  The two byte length fields are added to  
* the record by the Instrumentation Facility Component, and they appear 
* in the 191 record in predicatable places, but they may appear in      
* between any fields of the 191 record.  A logical 191 record is a 191  
* record with all 2 byte length fields removed.  If all 2 byte          
* length fields other than QW0191LL are removed, then the QW0191 record 
* may be mapped just like any other record.  Otherwise, there are       
* some considerations that a formatting routine must take into account. 
*                                                                       
* Whether or not the two byte length fields are removed, it is          
* important to note that IFCID 191 offsets are from field QW0191HD,     
* not QW0191LL.  Also, if the two byte length fields are not removed,   
* the offsets will be off depending on the number of data blocks that   
* were required to write the 191 record, because a two byte length      
* field will preceed each such block.                                   
*                                                                       
* All data blocks will be of the length specified in QW0191LL,          
* except the last which will be some number less than or equal to       
* QW0191LL depending upon the number of bytes left to be traced.        
* The length of the entire data section, as specified in QWT02R1L.      
* will be accurate as is.                                               
*                                                                       
* Especially affected are fields QW0191FO, QW0191OF, QW0191D1,          
* QW0191D2, and QW0101D3.  In the following examples, DQ0191OF          
* is used, the but the same applies to the other four fields.           
*   IF QW0191OF > QW0191LL THEN a 2 byte length field will appear       
*       at OFFSET(QW0191LL) + QW0191LL.                                 
*   Therefore, in order to obtain a correct offset value for QW0191OF   
*   add 2 to the value of QW0191OF.  It may be necessary to repeat      
*   this procedure.  For example,                                       
*     IF QW0191OF = 'A000'X AND QW0191LL = '200'X AND QW0191LL is at    
*     offset '00'x THEN                                                 
*     the two byte length field will repeat at offset                   
*                   '00'X + '200'X = '200'X                             
*      it will repeat again at '200'X + '200'X = '400'X                 
*      it will repeat again at '400'X + '200'X = '600'X                 
*      it will repeat again at '600'X + '200'X = '800'X                 
*      it will repeat again at '800'X + '200'X = 'A00'X                 
*   Thus, five 2 byte length fields appear in the trace record that     
*   are not accounted for in the offset field QW0191OF.  The correct    
*   offset to QW01916B, which is the intent of QW0191OF is:             
*      QW0191OF + (5*LENGTH(QW0191LL)) + OFFSET(QW0191HD) =             
*      'A000'X + '0A'X + '02' = 'A00C'X                                 
*                                                                       
FLD: QW0191LL TYPE(HALF) DISP(0)  /*TRACE BLOCK LENGTH*/
FLD: QW0191HD TYPE(HALF) DISP(2)  /*HEADER*/
FLD: QW0191HE LEN(8) DISP(2)      /*Eye Catcher "DRDA0191"*/
FLD: QW0191LN LEN(18) DISP(10)    /*%U Remote Location Name*/
*                                    Truncated if QW0191LN_Off¬=0       
FLD: QW0191VS LEN(2) DISP(28)     /*Version Number for all Sections*/
*                                  This version = 1                     
FLD: QW0191NO TYPE(HALF) DISP(30) /*This 0191 record is n of*/
FLD: QW0191TO TYPE(HALF) DISP(32) /*total number of 0191 records*/
FLD: QW0191FO LEN(4) TYPE(BIN) DISP(34) /*Offset relative to QW0191HD*/
*                                  at which parse failed                
FLD: QW0191FL LEN(4) DISP(38)     /*FAILURE OBJECT LENGTH*/
FLD: QW0191ID TYPE(HALF) DISP(42) /*Identifier*/
FLD: QW0191RS LEN(4) DISP(42)     /*Reason code*/
FLD: QW0191MN LEN(8) DISP(46)     /*Module Name*/
FLD: QW0191MI TYPE(HALF) DISP(54) /*Source ID in Module*/
FLD: QW0191TK LEN(12) DISP(56)    /*Unique Error Token*/
FLD: QW0191C1 LEN(2) DISP(68)     /*DDM command code point*/
FLD: QW0191PA LEN(2) DISP(70)     /*DB2 Parse State (P1, P2)*/
FLD: QW0191RN LEN(4) TYPE(BIN) DISP(74)      /*Number of RMs received*/
FLD: QW0191ON LEN(4) TYPE(BIN) DISP(78)  /*Number of OBJDSSs received*/
FLD: QW0191DN LEN(4) TYPE(BIN) DISP(82)        /*Total Number of DSSs*/
FLD: QW0191ER LEN(8) DISP(86)     /*Type of Error*/
FLD: QW0191ET LEN(1) DISP(86)     /*0 : SQLSTATE in SQLCA gener*/
*                                  ated. 1: Reply Message sent          
FLD: QW0191SS LEN(5) DISP(87)     /*SQLSTATE returned*/
FLD: QW0191C2 LEN(2) DISP(87)     /*Reply Message Code Point*/
FLD: QW0191TN TYPE(HALF) DISP(94) /*Dimension of QW0191PT*/
FLD: QW0191PT LEN(10) DISP(96)    /*Top Level Parse Trace*/
*                                  last five (state,events)             
*                                  Repeating Group - maximum of 5       
*                                  entries                              
FLD: QW0191ST LEN(1) DISP(96)     /*LZRPA/LZSPA State*/
FLD: QW0191EV LEN(1) DISP(97)     /*LZRPA/LZSPA Event*/
FLD: QW0191LN_OFF TYPE(HALF) DISP(120)        /*Offset from QW0191 to*/
*                                    Remote Location Name               
*                                    If QW0191LN truncated              
**QW0191DT DS   0C                   Next section begins here           
*                                                                       
*   *..................QW0191PA Constants..........................*    
*QW0191P1 EQU  C'P1'                AR Parse                            
*QW0191P2 EQU  C'P2'                AS Parse                            
*QW0191HC EQU  C'HC'                HOP AS Parse                        
*QW0191HP EQU  C'HP'                HOP AR Parse                        
***QW0191Z1 EQU  C'DRDA0191'          0191 Eyecatcher                   
**********************************************************************  
*   DDM Command and/or Reply Data Section                            *  
**********************************************************************  
**QW0191CR DSECT                                                        
FLD: QW0191RE LEN(8) DISP(122)    /*Eye Catcher 'DRDACMND' or*/
*                                              'DRDARPLY'               
FLD: QW0191PS LEN(8) DISP(130)    /*'DRDASUCC' if parse successful*/
*                                  'DRDAFAIL' if parse unsuccessful     
FLD: QW0191C3 LEN(2) DISP(138)    /*Code Point*/
FLD: QW0191NM TYPE(HALF) DISP(140)/*Relative Number of DSS Carrier*/
FLD: QW0191OF LEN(4) TYPE(BIN) DISP(142)
                                  /*Offset to start of RPY/RQS/OBJ*/
*                                  DSS within 0191 record relative to   
*                                  QW0191HD                             
FLD: QW0191D1 LEN(4) TYPE(BIN) DISP(146)
                                  /*Offset relative to QW0191HD*/
*                                  to QW0191FD section                  
FLD: QW0191D2 LEN(4) TYPE(BIN) DISP(150)
                                  /*Offset relative to QW0191HD*/
*                                  to QW0191RT section                  
FLD: QW0191D3 LEN(4) TYPE(BIN) DISP(154)
                                  /*Offset relative to QW0191HD*/
*                                  to QW0191LT section                  
FLD: QW0191D4 LEN(4) TYPE(BIN) DISP(158)
                                  /*Offset relative to QW0191HD*/
*                                  to QW0191EA section                  

***********************************************************************
**** QW0191LN_D   DSECT            Use if QW0191LN_Off¬=0               
***********************************************************************

COMP: QW0191LN_D_OFFSET =
  WHEN(QW0191_OFFSET = 99999 OR QW0191LN_OFF = 0)  ASSIGN(99999)
  ELSE                     ASSIGN(QW0191_OFFSET + QW0191LN_OFF)
FLD: QW0191LN_D DISP(0) LEN(1) OFFSET(QW0191LN_D_OFFSET)
                                  /*Use if QW0191LN_Off¬ 0*/
FLD: QW0191LN_LEN TYPE(HALF) DISP(0)  /*Length of the following field*/
FLD: QW0191LN_VAR LEN(128) DISP(2)/*%U Remote Location Name*/
COMPUTE: EDIT_QW0191LN = #LEFT(QW0191LN_VAR,QW0191LN_LEN) 
*                                                                       

*  **..................Constant Eyecatchers........................**   
*                                                                       
***QW0191Z4 EQU  C'DRDACMND'           Command Data                     
***QW0191Z5 EQU  C'DRDARPLY'           Rely Data                        
***QW0191H1 EQU  C'DRDAHCMD'           Hopping Command Data             
***QW0191H2 EQU  C'DRDAHRPY'           Hopping Reply Data               
***QW0191U1 EQU  C'DRDARDTA'           User data in reply object        
***QW0191U2 EQU  C'DRDACDTA'           User data in command object      
***QW0191Z6 EQU  C'DRDASUCC'           Object Parse success             
***QW0191Z7 EQU  C'DRDAFAIL'           Object Parse failed              
**********************************************************************  
*   Section pointed to by QW0191D1 if Command/Reply Data is Late     *  
*   Descriptor....                                                   *  
**********************************************************************  
***********************************************************************
**** QW0191FD DSECT                                                     
***********************************************************************

COMP: QW0191FD_OFFSET =
  WHEN(QW0191_OFFSET = 99999 OR QW0191D1 = 0)    ASSIGN(99999)
  ELSE                     ASSIGN(QW0191_OFFSET + 2 + QW0191D1)
FLD: QW0191FD DISP(0) LEN(1) OFFSET(QW0191FD_OFFSET)
FLD: QW0191FE LEN(8) DISP(0)      /*Eye Catcher 'DRDALATE'*/
FLD: QW0191LD LEN(4) TYPE(BIN) DISP(8)
                                  /*Number of Late Environmental Des*/
*                                   criptors processed                  
FLD: QW0191GN LEN(4) TYPE(BIN) DISP(12)
                                  /*Number of SQLDTAGRP triplets*/
FLD: QW0191L1 LEN(1) DISP(16)     /*SQLDTAGRP LID extracted*/
FLD: QW0191L2 LEN(1) DISP(17)     /*SQLCADTA LID extracted*/
FLD: QW0191L3 LEN(1) DISP(18)     /*SQLDTA LID extracted*/
FLD: QW0191L4 LEN(1) DISP(19)     /*SQLDTARD LID extracted*/
FLD: QW0191GO LEN(2) DISP(20)     /*FD:OCA geometry status*/
COMP: QW0191F0 = X'8000'          /*SQLDTAGRP is ok*/
COMP: QW0191F1 = X'4000'          /*SQLCADTA is ok*/
COMP: QW0191F2 = X'2000'          /*SQLDTA is ok*/
COMP: QW0191F3 = X'1000'          /*SQLDTARD is ok*/
COMP: QW0191F4 = X'0080'          /*FDOCA GEOMETRY is ok*/
***********************************************************************
**** QW0191RT DSECT                 This is the DB2 RDTA data           
***********************************************************************

COMP: QW0191RT_OFFSET =
  WHEN(QW0191_OFFSET = 99999 OR QW0191D2 = 0)    ASSIGN(99999)
  ELSE                     ASSIGN(QW0191_OFFSET + 2 + QW0191D2)
FLD: QW0191RT DISP(0) LEN(1) OFFSET(QW0191RT_OFFSET)
                                  /*This is the DB2 RDTA data*/
*                                   structure -- See Diagnosis          
*                                   Guide for details                   
FLD: QW0191E1 LEN(8) DISP(0)      /*Eye Catcher 'DRDARDTA'*/
FLD: QW0191R1 LEN(1) DISP(8)      /*RDTA structure starts here*/
**********************************************************************  
*   Section Pointed to by QW0191D3 if Command/Reply data is desc-    *  
*   ribed by either an Early or Late Descriptor...                   *  
**********************************************************************  
***********************************************************************
**** QW0191LT DSECT                 This is the DB2 FD_LIDLST           
***********************************************************************

COMP: QW0191LT_OFFSET =
  WHEN(QW0191_OFFSET = 99999 OR QW0191D3 = 0)    ASSIGN(99999)
  ELSE                     ASSIGN(QW0191_OFFSET + 2 + QW0191D3)
FLD: QW0191LT DISP(0) LEN(1) OFFSET(QW0191LT_OFFSET)
                                  /*This is the DB2 FD_LIDLST*/
*                                   structure -- See Diagnosis          
*                                   Guide for details                   
FLD: QW0191E2 LEN(8) DISP(0)      /*Eye Catcher 'DRDALIDL'*/
FLD: QW0191LS LEN(1) DISP(8)      /*FD_LIDLST structure starts here*/
                                                                        
**********************************************************************  
*   Section Pointed to by QW0191D4 if Command/Reply data is desc-    *  
*   ribed by either an Early or Late Descriptor...                   *  
**********************************************************************  
***********************************************************************
**** QW0191EA DSECT                 This is the DB2 ZEDA                
***********************************************************************

COMP: QW0191EA_OFFSET =
  WHEN(QW0191_OFFSET = 99999 OR QW0191D4 = 0)    ASSIGN(99999)
  ELSE                     ASSIGN(QW0191_OFFSET + 2 + QW0191D4)
FLD: QW0191EA DISP(0) LEN(1) OFFSET(QW0191EA_OFFSET)
                                  /*This is the DB2 ZEDA*/
*                                   structure -- See Diagnosis          
*                                   Guide for details                   
FLD: QW0191Z3 LEN(8) DISP(0)      /*Eye Catcher 'DRDAZEDA'*/
FLD: QW0191ZS LEN(1) DISP(8)      /*ZEDA structure starts here*/
*****..................Constant Eyecatchers......................****   
*                                                                       
***QW0191Z8 EQU  C'DRDALATE'           Late Descriptor                  
***QW0191Z9 EQU  C'DRDARDTA'           DB2 RDTA structure               
***QW0191ZA EQU  C'DRDALIDL'           DB2 LIDLST structure             
***QW0191ZE EQU  C'DRDAZEDA'           DB2 LIDLST structure             
**********************************************************************  
*   Section Pointed to by QW0191OF -- this is an RQS/OBJ/RPY DSS     *  
*   level 6b object.....                        ..                   *  
**********************************************************************  
***********************************************************************
**** QW01916B DSECT                 This is the level 6b DSS            
***********************************************************************

COMP: QW01916B_OFFSET =
  WHEN(QW0191_OFFSET=99999 OR QW0191OF=0) ASSIGN(99999)
  ELSE ASSIGN(QW0191_OFFSET+2 + #INT(QW0191OF/QW0191LL)*2)
FLD: QW01916B DISP(0) LEN(1) OFFSET(QW01916B_OFFSET)
                                  /*This is the level 6b DSS*/
FLD: QW0191E3 LEN(8) DISP(0)      /*Eye Catcher 'DRDARQS ' or*/
*                                               'DRDARPY ' or           
*                                               'DRDAOBJ '              
FLD: QW0191L6 LEN(1) DISP(8)      /*6 byte DB2 internal DSS header*/
FLD: QW01916L LEN(4) TYPE(BIN) DISP(8)                /*4 byte length*/
FLD: QW01916T LEN(2) DISP(12)     /*2 byte type*/
*  **..................Constant Eyecatchers........................**   
***QW0191ZB EQU  C'DRDARQS '           RQSDSS level 6b                  
***QW0191ZC EQU  C'DRDARPY '           RPYDSS level 6b                  
***QW0191ZD EQU  C'DRDAOBJ '           OBJDSS level 6b                  

***********************************************************************
*   IFCID 0314 FOR RMID 22 TO RECORD ACCESS CONTROL AUTHORIZATION EXIT 
*       PARAMETERS.                                                    
***********************************************************************
***********************************************************************
**** QW0314   DSECT                                                    
***********************************************************************

***********************************************************************
* TO REPORT ON ALL OCCURRENCES OF QW0314, USE:
* INPUT: SM102B11
*        IOEXIT('GENNORM','A 102 --- 036 2I N | 028 004 2 00314')
***********************************************************************
COMP: QW0314_OFFSET =
  WHEN(SM102RTY<>102 OR QWHSIID<>314 OR QWT02R1N = 0) ASSIGN(99999)
  ELSE                                              ASSIGN(QWT02R1O)
FLD: QW0314   DISP(0) LEN(1) OFFSET(QW0314_OFFSET)
FLD: QW0314EL LEN(4) TYPE(BIN) DISP(0)              /*ADDRESS OF EXPL*/
FLD: QW0314WA LEN(4) TYPE(BIN) DISP(4)         /*ADDRESS OF WORK AREA*/
FLD: QW0314WL LEN(4) TYPE(BIN) DISP(8)          /*LENGTH OF WORK AREA*/
FLD: QW0314RC TYPE(HALF) DISP(12) /*RETURN CODE FROM EXIT*/
*                                                                      
COMP: QW0314C0 = 0                /*ACCESS ALLOWED*/
COMP: QW0314C4 = 4               /*PERFORM DB2 AUTHORIZATION CHECKING*/
COMP: QW0314C8 = 8                /*ACCESS DENIED*/
COMP: QW0314CC = 12              /*UNABLE TO DETERMINE AUTHORIZATION;*/
FLD: QW0314RS LEN(4) TYPE(BIN) DISP(16)       /*REASON CODE FROM EXIT*/
*                            DEFINED BY USER                           
*                                                                      
FLD: QW0314BC TYPE(STCKTIME) DISP(20)  /*STORE CLOCK BEFORE EXIT CALL*/
FLD: QW0314AC TYPE(STCKTIME) DISP(28)   /*STORE CLOCK AFTER EXIT CALL*/
FLD: QW0314PL LEN(256) DISP(36)   /*THE PARAMETER LIST (DSNDXAPL).*/
*                             UPDATE IF XAPLLEN CHANGES.               
FLD: QW0314DO TYPE(HALF) DISP(292)
                         /*OFFSET FROM QW0314 TO DATABASE INFORMATION*/
*                             ARRAY (QW0314DX)                       
*                             ONLY USE IF QW0314DS > 0               
FLD: QW0314UO TYPE(HALF) DISP(294)
                                  /*OFFSET FROM QW0314 TO AUTH ID DB2*/
*                             PERFORMS CHECK ON (QW0314U)            
FLD: QW0314BO TYPE(HALF) DISP(296)
                           /*OFFSET FROM QW0314 TO UNQUALIFIED OBJECT*/
*                             NAME (QW0314B)                         
FLD: QW0314OO TYPE(HALF) DISP(298)
                              /*OFFSET FROM QW0314 TO OBJECT OWNER OR*/
*                             OBJECT QUALIFIER (QW0314O)             
FLD: QW03141O TYPE(HALF) DISP(300)
                                /*OFFSET FROM QW0314 TO OTHER RELATED*/
*                             INFORMATION - 1  (QW0314R1)            
FLD: QW03142O TYPE(HALF) DISP(302)
                                /*OFFSET FROM QW0314 TO OTHER RELATED*/
*                             INFORMATION - 2  (QW0314R2)            
FLD: QW0314NO TYPE(HALF) DISP(304)
                                 /*OFFSET FROM QW0314 TO OBJECT OWNER*/
*                             (QW0314N)                              
FLD: QW0314LO TYPE(HALF) DISP(306)/*OFFSET FROM QW0314 TO ROLE*/
*                             (QW0314L)                              
FLD: QW0314MO TYPE(HALF) DISP(308)
                            /*OFFSET FROM QW0314 TO OTHER OBJECT NAME*/
*                             (QW0314M)                              
FLD: QW0314RO TYPE(HALF) DISP(310)
                           /*OFFSET FROM QW0314 TO OTHER OBJECT OWNER*/
*                             OR VIEWS BASE TABLE OWNER              
*                             (QW0314R)                              
FLD: QW0314SO TYPE(HALF) DISP(312)
                             /*OFFSET FROM QW0314 TO VIEWS BASE TABLE*/
*                             QUALIFIER (QW0314S)                    
FLD: QW0314AO TYPE(HALF) DISP(314)
                             /*OFFSET FROM QW0314 TO VIEWS BASE TABLE*/
*                             NAME (QW0314A)                         
FLD: QW0314CO TYPE(HALF) DISP(316)
                             /*OFFSET FROM QW0314 TO VIEWS BASE TABLE*/
*                             COLUMN (QW0314C)                     
FLD: QW0314UT LEN(80) DISP(324)   /*UTOKEN IF IT IS ACCESSIBLE*/
*                             If not accessible 1st word           
*                               0 - Not able to get UTOKEN         
*                              -1 - Abend on accessing ACEE        
FLD: QW0314DS LEN(4) TYPE(BIN) DISP(404)
                               /*NUMBER OF DATABASES FOR WHICH DETAIL*/
*                             IS PROVIDED IN THE QW0314DX ARRAY    
FLD: QW0314EN LEN(1) DISP(408)    /*END OF IFCID(QWHS0314)*/
*                                                                  
                                                                  
***********************************************************************
**** QW0314U  DSECT                                                
***********************************************************************

COMP: QW0314U_OFFSET =
  WHEN(QW0314UO = 0)  ASSIGN(99999)
  ELSE                ASSIGN(QW0314_OFFSET + QW0314UO)
FLD: QW0314U  DISP(0) LEN(1) OFFSET(QW0314U_OFFSET)
FLD: QW0314UL TYPE(HALF) DISP(0)  /*LENGTH OF NEXT FIELD*/
FLD: QW0314UN LEN(128) DISP(2)    /*%U AUTH ID DB2 PERFORMS CHECK ON*/
FLD: EDIT_QW0314UN DISP(QW0314UN) LEN(QW0314UL) MAXLEN(128)
                                                                  
***********************************************************************
**** QW0314B  DSECT                                                
***********************************************************************

COMP: QW0314B_OFFSET =
  WHEN(QW0314BO = 0)  ASSIGN(99999)
  ELSE                ASSIGN(QW0314_OFFSET + QW0314BO)
FLD: QW0314B  DISP(0) LEN(1) OFFSET(QW0314B_OFFSET)
FLD: QW0314BL TYPE(HALF) DISP(0)  /*LENGTH OF NEXT FIELD*/
FLD: QW0314BN LEN(128) DISP(2)    /*%U UNQUALIFIED OBJECT NAME*/
FLD: EDIT_QW0314BN DISP(QW0314BN) LEN(QW0314BL) MAXLEN(128)
                                                                  
***********************************************************************
**** QW0314O  DSECT                                                
***********************************************************************

COMP: QW0314O_OFFSET =
  WHEN(QW0314OO = 0)  ASSIGN(99999)
  ELSE                ASSIGN(QW0314_OFFSET + QW0314OO)
FLD: QW0314O  DISP(0) LEN(1) OFFSET(QW0314O_OFFSET)
FLD: QW0314OL TYPE(HALF) DISP(0)  /*LENGTH OF NEXT FIELD*/
FLD: QW0314ON LEN(128) DISP(2)  /*%U OBJECT OWNER OR OBJECT QUALIFIER*/
FLD: EDIT_QW0314ON DISP(QW0314ON) LEN(QW0314OL) MAXLEN(128)
                                                                  
***********************************************************************
**** QW0314R1 DSECT                                                
***********************************************************************

COMP: QW0314R1_OFFSET =
  WHEN(QW03141O = 0)  ASSIGN(99999)
  ELSE                ASSIGN(QW0314_OFFSET + QW03141O)
FLD: QW0314R1 DISP(0) LEN(1) OFFSET(QW0314R1_OFFSET)
FLD: QW03141L TYPE(HALF) DISP(0)  /*LENGTH OF NEXT FIELD*/
FLD: QW03141N LEN(128) DISP(2)    /*%U OTHER RELATED INFORMATION 1*/
FLD: EDIT_QW03141N DISP(QW03141N) LEN(QW03141L) MAXLEN(128)
                                                               
***********************************************************************
**** QW0314R2 DSECT                                             
***********************************************************************

COMP: QW0314R2_OFFSET =
  WHEN(QW03142O = 0)  ASSIGN(99999)
  ELSE                ASSIGN(QW0314_OFFSET + QW03142O)
FLD: QW0314R2 DISP(0) LEN(1) OFFSET(QW0314R2_OFFSET)
FLD: QW03142L TYPE(HALF) DISP(0)  /*LENGTH OF NEXT FIELD*/
FLD: QW03142N LEN(128) DISP(2)    /*%U OTHER RELATED INFORMATION 2*/
FLD: EDIT_QW03142N DISP(QW03142N) LEN(QW03142L) MAXLEN(128)
                                                               
***********************************************************************
**** QW0314N  DSECT                                             
***********************************************************************

COMP: QW0314N_OFFSET =
  WHEN(QW0314NO = 0)  ASSIGN(99999)
  ELSE                ASSIGN(QW0314_OFFSET + QW0314NO)
FLD: QW0314N  DISP(0) LEN(1) OFFSET(QW0314N_OFFSET)
FLD: QW0314NL TYPE(HALF) DISP(0)  /*LENGTH OF NEXT FIELD*/
FLD: QW0314NN LEN(128) DISP(2)    /*%U OBJECT OWNER*/
FLD: EDIT_QW0314NN DISP(QW0314NN) LEN(QW0314NL) MAXLEN(128)
                                                               
***********************************************************************
**** QW0314L  DSECT                                             
***********************************************************************

COMP: QW0314L_OFFSET =
  WHEN(QW0314LO = 0)  ASSIGN(99999)
  ELSE                ASSIGN(QW0314_OFFSET + QW0314LO)
FLD: QW0314L  DISP(0) LEN(1) OFFSET(QW0314L_OFFSET)
FLD: QW0314LL TYPE(HALF) DISP(0)  /*LENGTH OF NEXT FIELD*/
FLD: QW0314LN LEN(128) DISP(2)    /*%U ROLE*/
FLD: EDIT_QW0314LN DISP(QW0314LN) LEN(QW0314LL) MAXLEN(128)
                                                               
***********************************************************************
**** QW0314M  DSECT                                             
***********************************************************************

COMP: QW0314M_OFFSET =
  WHEN(QW0314MO = 0)  ASSIGN(99999)
  ELSE                ASSIGN(QW0314_OFFSET + QW0314MO)
FLD: QW0314M  DISP(0) LEN(1) OFFSET(QW0314M_OFFSET)
FLD: QW0314ML TYPE(HALF) DISP(0)  /*LENGTH OF NEXT FIELD*/
FLD: QW0314MN LEN(128) DISP(2)    /*%U OTHER OBJECT NAME*/
FLD: EDIT_QW0314MN DISP(QW0314MN) LEN(QW0314ML) MAXLEN(128)
                                                               
***********************************************************************
**** QW0314R  DSECT                                             
***********************************************************************

COMP: QW0314R_OFFSET =
  WHEN(QW0314RO = 0)  ASSIGN(99999)
  ELSE                ASSIGN(QW0314_OFFSET + QW0314RO)
FLD: QW0314R  DISP(0) LEN(1) OFFSET(QW0314R_OFFSET)
FLD: QW0314RL TYPE(HALF) DISP(0)  /*LENGTH OF NEXT FIELD*/
FLD: QW0314RN LEN(128) DISP(2)    /*%U OTHER OBJECT OWNER*/
FLD: EDIT_QW0314RN DISP(QW0314RN) LEN(QW0314RL) MAXLEN(128)
                                                               
***********************************************************************
**** QW0314S  DSECT                                             
***********************************************************************

COMP: QW0314S_OFFSET =
  WHEN(QW0314SO = 0)  ASSIGN(99999)
  ELSE                ASSIGN(QW0314_OFFSET + QW0314SO)
FLD: QW0314S  DISP(0) LEN(1) OFFSET(QW0314S_OFFSET)
FLD: QW0314SL TYPE(HALF) DISP(0)  /*LENGTH OF NEXT FIELD*/
FLD: QW0314SN LEN(128) DISP(2)    /*%U VIEWS BASE TABLE SCHEMA*/
FLD: EDIT_QW0314SN DISP(QW0314SN) LEN(QW0314SL) MAXLEN(128)
                                                               
***********************************************************************
**** QW0314A  DSECT                                             
***********************************************************************

COMP: QW0314A_OFFSET =
  WHEN(QW0314AO = 0)  ASSIGN(99999)
  ELSE                ASSIGN(QW0314_OFFSET + QW0314AO)
FLD: QW0314A  DISP(0) LEN(1) OFFSET(QW0314A_OFFSET)
FLD: QW0314AL TYPE(HALF) DISP(0)  /*LENGTH OF NEXT FIELD*/
FLD: QW0314AN LEN(128) DISP(2)    /*%U VIEWS BASE TABLE NAME*/
FLD: EDIT_QW0314AN DISP(QW0314AN) LEN(QW0314AL) MAXLEN(128)
                                                                     
***********************************************************************
**** QW0314C  DSECT                                                   
***********************************************************************

COMP: QW0314C_OFFSET =
  WHEN(QW0314CO = 0)  ASSIGN(99999)
  ELSE                ASSIGN(QW0314_OFFSET + QW0314CO)
FLD: QW0314C  DISP(0) LEN(1) OFFSET(QW0314C_OFFSET)
FLD: QW0314CL TYPE(HALF) DISP(0)  /*LENGTH OF NEXT FIELD*/
FLD: QW0314CN LEN(128) DISP(2)    /*%U VIEWS BASE TABLE COLUMN NAME*/
FLD: EDIT_QW0314CN DISP(QW0314CN) LEN(QW0314CL) MAXLEN(128)
                                                                     
***********************************************************************
**** QW0314DX DSECT          QW0314 DATABASE EXTENSION                
***********************************************************************

***********************************************************************
* TO REPORT ON ALL OCCURRENCES OF QW0314DX, USE:
*  INPUT: SMF102B11
*         IOEXIT('GENNORM','A 102 --- 036 2I N | 028 004 2 00376')
*         NORMWHEN(QW0314DS <> 0)
*         NORM(QW0314DX, QW0314DS)
***********************************************************************
COMP: QW0314DX_OFFSET =
  WHEN(QW0314DS <> 0)  ASSIGN(99999)
  ELSE                ASSIGN(QW0314_OFFSET + QW0314DO)
FLD: QW0314DX DISP(0) LEN(16) OFFSET(QW0314DX_OFFSET)
                                  /*QW0314 DATABASE EXTENSION*/
*                             AN ARRAY CONTAINING DATABASE INFORMATION  
FLD: QW0314DP LEN(4) TYPE(BIN) DISP(0)
                            /*ADDRESS TO INFORMATION OF NEXT DATABASE*/
FLD: QW0314DN LEN(8) DISP(4)      /*DATABASE NAME*/
FLD: QW0314DA LEN(1) DISP(12)     /*RESULTS OF DBADM CHECK*/
FLD: QW0314IM LEN(1) DISP(13)     /*WHETHER DATABASE IS IMPLICIT*/

***********************************************************************
**  IFCID 0376 is a serviceability trace. It can be used to identify  *
**  SQL statements with potential incompatible changes when switching *
**  to the new application behavior (e.g V11R1). This trace record is *
**  written once for each unique dynamic cached statement and static  *
**  statement if it was bound on V10 NFM or later. For static         *
**  statements that are bound before V10 NFM, this trace record will  *
**  be externalized once per unique combination of: plan, package ID, *
**  statement number.                                                 *
**  Note that it is not practical to maintain history of every SQL    *
**  that has been processed, and therefore, it is possible that       *
**  more than one trace record will be written for the same statement.*
**  This should be a rare occurence.                                  *
**  This trace record is similar to IFCID 0366 trace record except    *
**  the IFCID 0366 trace could be written much more frequently, since *
**  it does not perform uniqness checking. For instance, when the     *
**  same dynamic SQL statement is executed by several threads         *
**  (or repeatedly by the same thread) multiple IFICD 0366 records    *
**  would be written, but only one IFCID 0376 record would be written.*
**  See IFCID 0366 description for additional information.            *
***********************************************************************
***********************************************************************
**** QW0376       DSECT                                                
***********************************************************************

***********************************************************************
* TO REPORT ON ALL OCCURRENCES OF QW0376, USE:
* INPUT: SM102B11
*        IOEXIT('GENNORM','A 102 --- 036 2I N | 028 004 2 00376')
***********************************************************************
COMP: QW0376_OFFSET =
  WHEN(SM102RTY<>102 OR QWHSIID<>376 OR QWT02R1N = 0) ASSIGN(99999)
  ELSE                                              ASSIGN(QWT02R1O)
FLD: QW0376   DISP(0) LEN(1) OFFSET(QW0376_OFFSET)
FLD: QW0376FN LEN(4) TYPE(BIN) DISP(0)
                                  /*See QW0366FN for the description*/
FLD: QW0376SN LEN(4) TYPE(BIN) DISP(4)
                                  /*Statement number of the query*/
FLD: QW0376PL LEN(8) DISP(8)      /*Plan name for this query*/
FLD: QW0376TS LEN(8) DISP(16)     /*Timestamp for this query*/
FLD: QW0376SI LEN(8) DISP(24)     /*Statement Identifier*/
FLD: QW0376TY LEN(2) DISP(32)  /*Statement information (see QW0366TY)*/
FLD: QW0376SE TYPE(HALF) DISP(34) /*Section number*/
FLD: QW0376PC_OFF TYPE(HALF) DISP(36)
                         /*Offset from QW0376 to Package CollectionID*/
FLD: QW0376PN_OFF TYPE(HALF) DISP(38)
                                 /*Offset from QW0376 to Program name*/
FLD: QW0376VL TYPE(HALF) DISP(40) /*Version length*/
FLD: QW0376VN LEN(64) DISP(42)    /*Version*/
FLD: QW0376SC_OFF TYPE(HALF) DISP(106)        /*Offset from QW0376 to*/
*                            schema name                               
FLD: QW0376PR_OFF TYPE(HALF) DISP(108)        /*Offset from QW0376 to*/
*                            specific name                             
FLD: QW0376INC_OFF TYPE(HALF) DISP(110)
                               /*Offset from QW0376 to incompat parms*/
FLD: QW0376SQL_OFF TYPE(HALF) DISP(112)
                                  /*Offset from QW0376 to SQL text*/
*                                                                      
***********************************************************************
**** QW0376PC_D   DSECT                                                
***********************************************************************

COMP: QW0376PC_D_OFFSET =
  WHEN(QW0376_OFFSET = 99999 OR QW0376PC_OFF = 0)  ASSIGN(99999)
  ELSE                     ASSIGN(QW0376_OFFSET + QW0376PC_OFF)
FLD: QW0376PC_D DISP(0) LEN(1) OFFSET(QW0376PC_D_OFFSET)
FLD: QW0376PC_LEN TYPE(HALF) DISP(0)
                                  /*Length of Package Collection ID*/
FLD: QW0376PC_VAR LEN(128) DISP(2)/*%U Package Collection ID*/
COMPUTE: EDIT_QW0376PC_VAR = #LEFT(QW0376PC_VAR,QW0376PC_LEN) 
*                                                                      
***********************************************************************
**** QW0376PN_D   DSECT                                                
***********************************************************************

COMP: QW0376PN_D_OFFSET =
  WHEN(QW0376_OFFSET = 99999 OR QW0376PN_OFF = 0)  ASSIGN(99999)
  ELSE                     ASSIGN(QW0376_OFFSET + QW0376PN_OFF)
FLD: QW0376PN_D DISP(0) LEN(1) OFFSET(QW0376PN_D_OFFSET)
FLD: QW0376PN_LEN TYPE(HALF) DISP(0)         /*Length of Program Name*/
FLD: QW0376PN_VAR LEN(128) DISP(2)/*%U Program Name*/
COMPUTE: EDIT_QW0376PN_VAR = #LEFT(QW0376PN_VAR,QW0376PN_LEN) 
*                                                                      
***********************************************************************
**** QW0376PR_D   DSECT                                                
***********************************************************************

COMP: QW0376PR_D_OFFSET =
  WHEN(QW0376_OFFSET = 99999 OR QW0376PR_OFF = 0)  ASSIGN(99999)
  ELSE                     ASSIGN(QW0376_OFFSET + QW0376PR_OFF)
FLD: QW0376PR_D DISP(0) LEN(1) OFFSET(QW0376PR_D_OFFSET)
FLD: QW0376PR_LEN TYPE(HALF) DISP(0)        /*Length of specific name*/
FLD: QW0376PR_VAR LEN(128) DISP(2)/*%U specific name*/
COMPUTE: EDIT_QW0376PR_VAR = #LEFT(QW0376PR_VAR,QW0376PR_LEN) 
*                                                                      
***********************************************************************
**** QW0376SC_D   DSECT                                           
***********************************************************************

COMP: QW0376SC_D_OFFSET =
  WHEN(QW0376_OFFSET = 99999 OR QW0376SC_OFF = 0)  ASSIGN(99999)
  ELSE                     ASSIGN(QW0376_OFFSET + QW0376SC_OFF)
FLD: QW0376SC_D DISP(0) LEN(1) OFFSET(QW0376SC_D_OFFSET)
FLD: QW0376SC_LEN TYPE(HALF) DISP(0)          /*Length of schema name*/
FLD: QW0376SC_VAR LEN(128) DISP(2)/*%U schema name*/
COMPUTE: EDIT_QW0376SC_VAR = #LEFT(QW0376SC_VAR,QW0376SC_LEN) 
*                                                                 
***********************************************************************
**** QW0376INC_D   DSECT                                          
***********************************************************************

COMP: QW0376INC_D_OFFSET =
  WHEN(QW0376_OFFSET = 99999 OR QW0376INC_OFF = 0)  ASSIGN(99999)
  ELSE                     ASSIGN(QW0376_OFFSET + QW0376INC_OFF)
FLD: QW0376INC_D DISP(0) LEN(1) OFFSET(QW0376INC_D_OFFSET)
FLD: QW0376INC_LEN TYPE(HALF) DISP(0)
                                 /*Length of incompatible parameters:*/
FLD: QW0376INC_VAR LEN(256) DISP(2)
                                  /*the ordinal number of output parm*/
*                            (if fn8) or input parm (if fn7),     
*                            source datatype, target datatype     
COMPUTE: EDIT_QW0376INC_VAR = #LEFT(QW0376INC_VAR,QW0376INC_LEN) 
*                                                                 
***********************************************************************
**** QW0376SQL_D   DSECT                                          
***********************************************************************

COMP: QW0376SQL_D_OFFSET =
  WHEN(QW0376_OFFSET = 99999 OR QW0376SQL_OFF = 0)  ASSIGN(99999)
  ELSE                     ASSIGN(QW0376_OFFSET + QW0376SQL_OFF)
FLD: QW0376SQL_D DISP(0) LEN(1) OFFSET(QW0376SQL_D_OFFSET)
FLD: QW0376SQL_LEN TYPE(HALF) DISP(0)            /*Length of SQL text*/
FLD: QW0376SQL_VAR LEN(4000) DISP(2)                    /*%U SQL text*/
COMPUTE: EDIT_QW0376SQL_VAR = #LEFT(QW0376SQL_VAR,QW0376SQL_LEN) 

********************************************************************    
* IFCID 369 is a statistics record containing wait and CPU         *    
* aggregated by connection type. It is written at statistics       *    
* intervals and is available via the IFI READS interface.          *    
*                                                                  *    
* This record contains 4 sections mapped as follows:               *    
*                                                                  *    
*   Data Section 1 is mapped by QW0369_1                           *    
*   Data Section 2 is a repeating group, each mapped by QW0369_2   *    
*   Data Section 3 is a repeating group, each mapped by DSNDQWAC   *    
*   Data Section 4 is a repeating group, each mapped by DSNDQWAX   *    
*                                                                  *    
* Notes:                                                           *    
*  1.Statistics collection will become enabled when both IFCID 369 *    
*    and IFCID 3 is enabled on the system.                         *    
*  2.All counters will be reset to zeroes when DB2 is restarted    *    
*  3.Statistics are aggregated by connection type. If no agents    *    
*    for that connection type have executed since the 369          *    
*    collection in enabled, no data will be externalized for that  *    
*    connection type.                                              *    
*  4.QWACPCNT indicates the number of transactions aggregated for  *    
*    a given connection type.                                      *    
*                                                                  *    
********************************************************************    
***********************************************************************
**** QW0369_1 DSECT                                                     
***********************************************************************

***********************************************************************
* TO REPORT ON ALL OCCURRENCES OF QW0369_1, USE:
* INPUT: SMF10211
*   NORMWHEN(SM102RTY=102 AND QWHSIID=369 AND QWT02R1N > 0)
*   NORMSMF(QWT02R1O)
***********************************************************************
COMP: QW0369_1_OFFSET =
  WHEN(SM102RTY<>102 OR QWHSIID<>369 OR QWT02R1N = 0) ASSIGN(99999)
  ELSE                                              ASSIGN(QWT02R1O)
FLD: QW0369_1 DISP(0) LEN(1) OFFSET(QW0369_1_OFFSET)
FLD: QW0369ST TYPE(STCKTIME) DISP(0)
                           /*Timestamp when 369 statistics collection*/
*                           was enabled                                 
FLD: QW0369SP TYPE(STCKTIME) DISP(8)
                           /*Timestamp when 369 statistics collection*/
*                           was disabled                                
                                                                   
***********************************************************************
**** QW0369_2 DSECT                                                
***********************************************************************

***********************************************************************
* TO REPORT ON ALL OCCURRENCES OF QW0369_2, USE:
* INPUT: SMF10211
*   NORMWHEN(SM102RTY=102 AND QWHSIID=369 AND QWT02R2N > 0)
*   NORMSMF(QWT02R2O)
***********************************************************************
COMP: QW0369_2_OFFSET =
  WHEN(SM102RTY<>102 OR QWHSIID<>369 OR QWT02R2N = 0) ASSIGN(99999)
  ELSE                                              ASSIGN(QWT02R2O)
FLD: QW0369_2 DISP(0) LEN(1) OFFSET(QW0369_2_OFFSET)
FLD: QW0369CN LEN(8) DISP(0)      /*Connection name*/
*                                                                  
* Possible values for QW0369CN                                     
*QW0369IMS DC  CL8'MASS    '  IMS attach                                
*QW0369CCS DC  CL8'SASS    '  CICS attach                               
*QW0369RSF DC  CL8'RRSAF   '  RRSAF attach                              
*QW0369UTL DC  CL8'UTILITY '  Utility                                   
*QW0369BTC DC  CL8'BATCH   '  Batch                                     
*QW0369DIS DC  CL8'DIST    '  DDF connection                            
 
*/********************************************************************/ 
*/*     INSTRUMENTATION ACCOUNTING DATA FOR IFCID=0003               */ 
*/********************************************************************/ 
*/********************************************************************  
*  NOTE: If QWACPARR is on in QWACFLGS, this is a rollup record.     *  
*        A rollup record is written with accumulated                 *  
*        counter data for the following type of threads:             *  
*                                                                    *  
*        - Query parallelism child tasks, if ZPARM PTASKROL = YES    *  
*        - DDF and RRSAF threads, if ZPARM ACCUMACC is >= 2          *  
*        - Aggregated Accounting Statistics IFCID369s                *  
*                                                                    *  
*        Query parallelism child tasks:                              *  
*        A rollup record is written with accumulated counter data    *  
*        when the parent task (agent) deallocates on an originating  *  
*        DB2, or when an accumulating child task deallocated on an   *  
*        assisting DB2.  The rollup data is an accumulation of all   *  
*        the counters for that field for each child task that        *  
*        completed and deallocated.                                  *  
*                                                                    *  
*        DDF and RRSAF threads:                                      *  
*        A rollup record is written with accumulated counter data    *  
*        for a given end user when the number of occurrences of that *  
*        end user reaches the ZPARM value for ACCUMACC. End user     *  
*        user is the concatenation of the following three            *  
*        values as defined by ZPARM ACCUMUID:                        *  
*          - End user userid (QWHEUID, 16 bytes)                     *  
*          - End user transaction name (QWHCEUTX, 32 bytes)          *  
*          - End user workstation name (QWHCEUWN, 18 bytes)          *  
*                                                                    *  
*        The following fields are invalid for rollup records:        *  
*                                                                    *  
*          QWACBJST QWACBSRB QWACESRB                                *  
*                                                                    *  
*        The following fields are redefined for rollup records:      *  
*                                                                    *  
*          QWACESC QWACEJST QWACBSC                                  *  
*                                                                    *  
*        QWACESC and QWACEJST contain the accumulated elapsed and    *  
*        CPU times respectively for all child tasks or all DDF/RRSAF *  
*        threads rolled into the record. For DDF/RRSAF rollup        *  
*        records, QWACBSC represents the earliest store clock value  *  
*        for a thread that has rolled data into the record.          *  
*                                                                    *  
*        For DDF/RRSAF rollup records the following values are       *  
*        derived from last thread to rollup:                         *  
*                                                                    *  
*          QWACWLME QWACNID                                          *  
*                                                                    *  
**********************************************************************/ 
*                                                                       
*/********************************************************************  
*  NOTE: FIELDS DEFINED AS CHARACTER MAY CONTAIN HEX DATA               
*                                                                       
*    NOTE - THE FOLLOWING TIMES INDICATE A LEVEL OF ACTIVITY FOR        
*    THE THREAD ADDRESS SPACE DURING THE PERIOD OF TIME THE             
*    AUTHORIZATION ID WAS ACTIVE BUT SHOULD BE USED WITH CAUTION        
*    FOR CHARGE BACK BECAUSE CPU AND ELAPSED TIMES ARE OBTAINED WHEN    
*    THE CREATE THREAD OR SIGNON REQUEST UNDER A THREAD IS SUCCESSFUL   
*    OR HAS BEEN TERMINATED.  SINCE THESE REQUESTS PROBABLY WILL NOT    
*    OCCUR AT TRANSACTION/APPLICATION PROGRAM SCHEDULING OR TERMINATION 
*    THE TIMES MAY NOT ACCURATELY REPRESENT A USERS ACIVITY.  AN        
*    EXCEPTION TO THE ABOVE STATEMENT IS FOR IMS APPLICATION PROGRAMS   
*    WHICH ALWAYS MAKE A SQL CALL IN THE BEGINNING OF THE PROGRAM AND   
*    ARE RUNNING AS MODE SINGLE TRANSACTIONS OR AS NON TRANSACTION      
*    DRIVEN BMPS. THEN THE TIMES RECORDED BELOW DO APPROXIMATE TIME     
*    ASSOCIATED WITH A SPECIFIC AUTHORIZATION ID.                    */ 
*                                                                       
*/********************************************************************/ 

***********************************************************************
**** QWAC     DSECT  ,
***********************************************************************

***********************************************************************
* TO REPORT ON ALL OCCURRENCES OF QWAC, USE:
* INPUT: SMF10211
*   NORMWHEN(SM102RTY=102 AND QWHSIID=369 AND QWT02R3N > 0)
*   NORMSMF(QWT02R3O)
***********************************************************************
COMP: QWAC_OFFSET =
  WHEN(SM102RTY<>102 OR QWHSIID<>369 OR QWT02R3N = 0) ASSIGN(99999)
  ELSE                                              ASSIGN(QWT02R3O)
FLD: QWAC     DISP(0) LEN(1) OFFSET(QWAC_OFFSET)
FLD: QWACBSC  TYPE(STCKTIME) DISP(0)    /*BEGINNING STORE CLOCK VALUE*/
FLD: QWACESC  TYPE(STCKTIME) DISP(8)       /*ENDING STORE CLOCK VALUE*/
*                                                                       
*/********************************************************************  
*  WHEN A CICS APPLICATION PROGRAM CAUSES MORE THAN ONE SYNC POINT   *  
*  COMMIT OR ROLLBACK TO OCCUR, THEN IT IS POSSIBLE TO HAVE MULTIPLE *  
*  ACCOUNTING RECORDS AND ACCOUNTING RECORDS OUT OF SEQUENCE FOR THE *  
*  APPLICATION IF CICS ATTACH THREAD SWAPPING OCCURS.                *  
**********************************************************************/ 
*                                                                       
FLD: QWACBJST TYPE(STCKTIME) DISP(16)
                            /*Beginning CPU time for all environments*/
*                        /*(CICS, IMS, TSO, etc.). This CPU time     */ 
*                        /*does not include CPU consumed on an IBM   */ 
*                        /*specialty engine.                         */ 
*                                                                       
*/********************************************************************  
* QWACEJST VALUES MAY BE INVALID WHEN  WHEN THE QWACRINV VALUE       *  
*  EXCEEDS DECIMAL 20.                                               *  
* QWACEJST MAY BE ZERO WHEN QWACRINV IS EQUAL TO DECIMAL 20.         *  
* QWACEJST VALUES MAY BE INVALID FOR END OF MEMORY CONDITIONS.       *  
**********************************************************************/ 
*                                                                       
FLD: QWACEJST TYPE(STCKTIME) DISP(24)
                               /*Ending CPU time for all environments*/
*                        /*(CICS, IMS, TSO, etc.). This CPU time     */ 
*                        /*does not include CPU consumed on an IBM   */ 
*                        /*specialty engine.                         */ 
FLD: QWACBSRB LEN(8) DISP(32)   /*SRB times are no longer set by DB2.*/
FLD: QWACESRB LEN(8) DISP(40)   /*SRB times are no longer set by DB2.*/
FLD: QWACRINV LEN(4) DISP(48)
                             /*REASON ACCOUNTING IS INVOKED SEE BELOW*/
FLD: QWACNID  LEN(16) DISP(52)    /*NETWORK ID VALUE FROM CCB*/
FLD: QWACCOMM LEN(4) TYPE(BIN) DISP(68)
                                  /*NUMBER OF COMMIT PHASE 2 REQUESTS*/
FLD: QWACABRT LEN(4) TYPE(BIN) DISP(72)    /*NUMBER OF ABORT REQUESTS*/
*                                                                       
*/********************************************************************* 
*  THE FOLLOWING VALUES THROUGH QWACARNS ARE CALCULATED IF THE          
*   OPTIONAL ACCOUNTING CLASSES ARE STARTED                             
**********************************************************************/ 
*                                                                       
FLD: QWAC1    LEN(4) TYPE(BIN) DISP(76)
*                                                                       
*/********************************************************************* 
*  THE FOLLOWING VALUES ARE CALCULATED FOR THREADS BY TAKING THE        
*   STCK TIME, AND ASCB TCB TIMES ON ENTRY TO DB2 AND                   
*   SUBTRACTING THE CORRESPONDING TIMES ON EXIT FROM DB2. THE MAJORITY  
*   OF THREAD ALLOCATION AND CERTAIN ABEND CONDITIONS ARE NOT INCLUDED. 
*   THE ELAPSED AND TCB TIMES WILL NOT BE EXACTLY THE SAME AS VALUES    
*   THAT MIGHT BE DERIVED FROM A SUMMATION OF DELTA VALUES BETWEEN      
*   IFCID 121 AND 122 COMBINATIONS, BECAUSE THE TIMES ARE NOT TAKEN     
*   AT EXACTLY THE SAME TIME.                                           
**********************************************************************/ 
*                                                                       
FLD: QWACASC  TYPE(STCKTIME) DISP(76)
                                  /*ACCUMULATED ELAPSED TIME IN DB2*/
FLD: QWACAJST TYPE(STCKTIME) DISP(84)
                                /*Accumulated CPU time consumed while*/
*                     /* executing in DB2.  This CPU time does not  */  
*                     /* include CPU consumed on an IBM specialty   */  
*                     /* engine. In addition, this time does not    */  
*                     /* include CPU consumed while processing SQL  */  
*                     /* statements in a stored procedure.          */  
FLD: QWACASRB LEN(8) DISP(92)    /*SRB times are no longer set by DB2*/
*                                                                       
*/********************************************************************  
*  THE FOLLOWING TWO VALUES ARE CALCULATED FOR THREADS BY TAKING THE    
*   STCK TIME ON ENTRY TO EVENT WAIT AND SUBTRACTING STCK ON EXIT       
*   RESUME FROM THE EVENT.                                              
**********************************************************************/ 
*                                                                       
FLD: QWACAWTI TYPE(STCKTIME) DISP(100)
                              /*ACCUMULATED I/O ELAPSED WAIT TIME FOR*/
*                         database I/O done under this thread       */  
FLD: QWACAWTL TYPE(STCKTIME) DISP(108)
                                 /*Accumulated wait time due to local*/
*                         contention for locks. The term "local         
*                         contention" is used to differentiate from     
*                         "global contention" (which is reported in     
*                         QWACAWTJ).  Local contention does not require 
*                         inter-system communication - the contention   
*                         is detected  and resolved entirely within     
*                         this  subsystem.                          */  
FLD: QWACARNA LEN(4) TYPE(BIN) DISP(116)
                          /*NUMBER OF DB2 ENTRY/EXIT EVENTS PROCESSED*/
*                     /* BY THE ALLIED ADDRESS SPACE.  IT DOES NOT  */  
*                     /* INCLUDE SQL ENTRY/EXIT EVENTS PERFORMED BY */  
*                     /* A STORED PROCEDURE.                        */  
FLD: QWACARNE LEN(4) TYPE(BIN) DISP(120)
                          /*NUMBER OF WAIT TRACE EVENTS PROCESSED FOR*/
*                     /*  WAITS FOR database I/O UNDER THIS THREAD  */  
*                                                                       
*/********************************************************************* 
*  THE FOLLOWING THREE VALUES ARE CALCULATED FOR THREADS BY TAKING THE  
*   STCK TIME ON ENTRY TO EVENT WAIT AND SUBTRACTING STCK ON EXIT       
*   RESUME FROM THE EVENT.                                              
**********************************************************************/ 
*                                                                       
FLD: QWACAWTR TYPE(STCKTIME) DISP(124)
                            /*ACCUMULATED WAIT TIME FOR READ I/O THAT*/
*                         IS DONE UNDER A THREAD OTHER THAN THIS        
*                         ONE.                                      */  
FLD: QWACAWTW TYPE(STCKTIME) DISP(132)
                           /*ACCUMULATED WAIT TIME FOR WRITE I/O THAT*/
*                         IS DONE UNDER A THREAD OTHER THAN THIS        
*                         ONE.                                      */  
FLD: QWACAWTE TYPE(STCKTIME) DISP(140)
                           /*Accumulated wait time due to synchronous*/
*                         execution unit switch for DB2 commit,         
*                         abort, or deallocation processing. For        
*                         RRSAF threads, this value include             
*                         explicit commit time (SRRCMIT calls).         
*                         See QWACAWLG for implicit RRS commit          
*                         time.                                     */  
FLD: QWACAWLH TYPE(STCKTIME) DISP(148)
                                 /*Accumulated wait time due to latch*/
*                         contention                                */  
FLD: QWACARNL LEN(4) TYPE(BIN) DISP(156)
                          /*NUMBER OF WAIT TRACE EVENTS PROCESSED FOR*/
*                         WAITS FOR LOCAL CONTENTION FOR LOCKS.         
FLD: QWACARNR LEN(4) TYPE(BIN) DISP(160)
                          /*NUMBER OF WAIT TRACE EVENTS PROCESSED FOR*/
*                         WAITS FOR READ I/O UNDER ANOTHER THREAD   */  
FLD: QWACARNW LEN(4) TYPE(BIN) DISP(164)
                          /*NUMBER OF WAIT TRACE EVENTS PROCESSED FOR*/
*                         WAITS FOR WRITE I/O UNDER ANOTHER THREAD  */  
FLD: QWACARNS LEN(4) TYPE(BIN) DISP(168)
                          /*NUMBER OF WAIT TRACE EVENTS PROCESSED FOR*/
*                         WAITS FOR SYNCHRONOUS EXECUTION UNIT          
*                         SWITCHING for commit/abort.               */  
FLD: QWACARLH LEN(4) TYPE(BIN) DISP(172)
                          /*Number of wait trace events processed for*/
*                         waits for latch contention                */  
                                                                        
*/********************************************************************* 
*  THE FOLLOWING VALUES THROUGH QWACARNH ARE CALCULATED IF              
*    ACCOUNTING CLASS 3 IS STARTED.                                     
**********************************************************************/ 
*                                                                       
FLD: QWAC2    LEN(4) TYPE(BIN) DISP(176)
*                                                                       
FLD: QWACARLG LEN(4) TYPE(BIN) DISP(176)
                              /*Number of wait trace events processed*/
*                        /* for waits for log write I/O             */  
FLD: QWACAWLG TYPE(STCKTIME) DISP(180)
                              /*Accumulated wait time for a log write*/
*                        /* I/O.  For RRSAF threads, this value     */  
*                        /* includes implicit commit time for RRS   */  
*                        /* at EOT if uncommitted work exists.      */  
*                        /* See QWACAWTE for explicit RRS           */  
*                        /* commit time.                            */  
FLD: QWACALBC LEN(4) TYPE(BIN) DISP(188)
                              /*Number of wait trace events processed*/
*                        /* for waits for TCP/IP LOB and XML        */  
*                        /* materialization                         */  
FLD: QWACALBW TYPE(STCKTIME) DISP(192)
                               /*Accumulated wait time for TCP/IP LOB*/
*                        /* and XML materialization                 */  
FLD: QWACAACC LEN(4) TYPE(BIN) DISP(200)
                               /*Number of wait trace event processed*/
*                        /* for requests to an accelerator          */  
FLD: QWACAACW TYPE(STCKTIME) DISP(204)
                              /*Accumulated wait time for requests to*/
*                        /* an accelerator                          */  
FLD: QWACAWTP TYPE(STCKTIME) DISP(212)
                            /*Accumulated wait time due to page latch*/
*                        /* contention                              */  
FLD: QWACARNH LEN(4) TYPE(BIN) DISP(220)
                              /*Number of wait trace events processed*/
*                        /* for page latch contention               */  
*/********************************************************************* 
*  THE FOLLOWING VALUES THROUGH QWACPKGN ARE DEPENDENT ON THE           
*    ACTIVATION OF OPTIONAL ACCOUNTING CLASSES.                         
*    QWACCLS2 WILL BE ON ONLY IF ACCOUNTING CLASS 2 WAS ACTIVE DURING   
*      THE LIFE OF THE AGENT WHEN A CLASS 2 EVENT OCCURRED.             
*    QWACCLS3 WILL BE ON ONLY IF ACCOUNTING CLASS 3 WAS ACTIVE DURING   
*      THE LIFE OF THE AGENT WHEN A CLASS 3 EVENT OCCURRED.             
*    QWACPKGN WILL BE NON-ZERO ONLY IF ACCOUNTING CLASS 7 AND/OR 8      
*      WERE ACTIVE WHEN THE AGENT BEGAN EXECUTION OF A PACKAGE          
**********************************************************************/ 
*                                                                       
FLD: QWAC3    LEN(4) TYPE(BIN) DISP(224)
*                                                                       
FLD: QWACFLGS LEN(2) DISP(224)    /*FLAGS*/
*                                                                       
*/********************************************************************/ 
*/*     BIT MEANINGS FOR QWACFLGS                                    */ 
*/********************************************************************/ 
*QWACCLS2 EQU    X'0001'                THERE IS NON-ZERO ACCOUNTING    
*                                        CLASS 2 DATA IN THIS           
*                                        DSNDQWAC DATA SECTION          
*QWACCLS3 EQU    X'0002'                THERE IS NON-ZERO ACCOUNTING    
*                                        CLASS 3 DATA IN THIS           
*                                        DSNDQWAC DATA SECTION          
*QWACCL2O EQU    X'0004'                Class 2 accounting data         
*                                        was being collected at the     
*                                        time this record was written   
*QWACCL3O EQU    X'0008'                Class 3 accounting data         
*                                        was being collected at the     
*                                        time this record was written   
*QWACCL7O EQU    X'0010'                Class 7 accounting data         
*                                        was being collected at the     
*                                        time this record was written   
*QWACCL8O EQU    X'0020'                Class 8 accounting data         
*                                        was being collected at the     
*                                        time this record was written   
*QWACPARR EQU    X'0040'                There is rollup data for        
*                                        parallel child tasks or DDF/   
*                                        RRSAF threads in this          
*                                        DSNDQWAC data section          
*QWACBADE EQU    X'0400'                An error was detected in the    
*                                        WLM enclave structure.  Some   
*                                        accounting data may be         
*                                        incorrect.                     
FLD: QWACPKGN TYPE(HALF) DISP(226)/*NUMBER OF PACKAGES FOR*/
*                                       WHICH THE APPROPRIATE TRACES    
*                                       WERE ACTIVE AND THEREFORE,      
*                                       PACKAGE LEVEL ACCOUNTING        
*                                       WAS PERFORMED.  THIS IS THE     
*                                       NUMBER OF QPAC SECTIONS TO BE   
*                                       WRITTEN FOR THIS AGENT IN IFCID 
*                                       239 (10 PER RECORD).            
*                                                                       
*/********************************************************************* 
*  The following values through QWACARNJ are calculated if              
*    Accounting Class 3 is started and if DB2 is a member of a DB2      
*    data sharing group.                                                
**********************************************************************/ 
*                                                                       
FLD: QWACA261 LEN(4) TYPE(BIN) DISP(228)
FLD: QWACAWTG TYPE(STCKTIME) DISP(228)
                            /*Accumulated wait time due to sending of*/
*                           messages to other DB2 members in the        
*                           data sharing group.                     */  
FLD: QWACAWTJ TYPE(STCKTIME) DISP(236)
                                /*Accumulated wait time due to global*/
*                           contention for parent L-locks.  Global      
*                           contention occurs when inter-system         
*                           communication is required to resolve an     
*                           IRLM Lock or Change request.  QPACAWTL      
*                           contains the wait time due to local         
*                           contention.  Local contention does not      
*                           require inter-system communciation - it     
*                           can be resolved by the local subsystem. */  
FLD: QWACARNG LEN(4) TYPE(BIN) DISP(244)
                              /*Number of wait trace events processed*/
*                           for sending of messages to other members    
*                           in the data sharing group.              */  
FLD: QWACARNJ LEN(4) TYPE(BIN) DISP(248)
                              /*Number of wait trace events processed*/
*                           for waits for global lock contention for    
*                           parent L-locks.                         */  
*/********************************************************************* 
*  THE FOLLOWING VALUES ARE FOR STORED PROCEDURES.                      
*  QWACSPCP IS CALCULATED ONLY IF CLASS 1 IS ACTIVE.                    
*  QWACSPTT, QWACSPNE ARE CALCULATED ONLY IF CLASS 2 IS ACTIVE.         
*  QWACCANM, QWACCAST ARE CALCULATED ONLY IF CLASS 3 IS ACTIVE.         
**********************************************************************/ 
FLD: QWACB302 LEN(1)
FLD: QWACSPCP TYPE(STCKTIME) DISP(252)
                                  /*The accumlated CPU time used to*/
*                        /* satisfy stored procedure requests       */  
*                        /* processed in a DB2 stored procedure/    */  
*                        /* WLM address space.  SQLP times are      */  
*                        /* included in this time IF the SQLP       */  
*                        /* was called on a nested task and was     */  
*                        /* not invoked by the main application     */  
*                        /* execution unit. This time does not      */  
*                        /* include CPU consumed on an IBM specialty*/  
*                        /* engine.                                 */  
FLD: QWACA302 LEN(1)
FLD: QWACSPTT TYPE(STCKTIME) DISP(260)
                                  /*The accumulated CPU time consumed*/
*                        /* in DB2 processing SQL statements        */  
*                        /* issued by stored procedure(s) processed */  
*                        /* in a DB2 stored procedure/WLM           */  
*                        /* address space.  This time also          */  
*                        /* includes in DB2 time needed to          */  
*                        /* connect and disconnect the SP task for  */  
*                        /* non-SQLP stored procedures.             */  
*                        /* SQLP times are included in this time IF */  
*                        /* the SQLP was called on a nested task and*/  
*                        /* was not invoked by the main application */  
*                        /* execution unit. This time is a subset   */  
*                        /* of QWACSPCP and does not include CPU    */  
*                        /* consumed on an IBM specialty engine.    */  
FLD: QWACSPNE LEN(4) TYPE(BIN) DISP(268)
                                /*the number of SQL entry/exit events*/
*                        /* performed by stored procedures          */  
FLD: QWACCAST TYPE(STCKTIME) DISP(272)
                               /*the total elapsed time spent waiting*/
*                        /* for an available TCB, before the        */  
*                        /* stored procedure could be scheduled.    */  
FLD: QWACCANM LEN(4) TYPE(BIN) DISP(280)
                                  /*the number of times an SQL CALL*/
*                        /* statement had to wait for an available  */  
*                        /* TCB, before the stored procedure could  */  
*                        /* be scheduled.                           */  
*/********************************************************************* 
*  THE FOLLOWING VALUES ARE FOR IFC ROLLUP RECORDS AND                  
*  UTILITY SUBTASKS.                                                    
*  QWACPCNT, QWACPACE ARE CALCULATED ONLY IF CLASS 1 IS ACTIVE.         
**********************************************************************/ 
FLD: QWACA282 LEN(4) TYPE(BIN) DISP(284)
FLD: QWACPCNT LEN(4) TYPE(BIN) DISP(284)
                                  /*1. For a non rollup parent record*/
*                        /*    number of parallel child agents      */  
*                        /*    created                              */  
*                        /* 2. For a non-rollup child agent record =*/  
*                        /*    0                                    */  
*                        /* 3. For a parallel query rollup record = */  
*                        /*    number of parellel child agents      */  
*                        /*    rolled into the record               */  
*                        /* 4. For a DDF/RRSAF rollup record =      */  
*                        /*    number of accounting intervals rolled*/  
*                        /*    into the record for the corresponding*/  
*                        /*    end user.                            */  
FLD: QWACPACE LEN(4) TYPE(BIN) DISP(288)
                                /*1. For a non rollup parent record 0*/
*                        /* 2. For a non-rollup child agent record =*/  
*                        /*    QWHSACE of the parent record         */  
*                        /* 3. For a parallel query rollup record = */  
*                        /*    QWHSACE of the parent record         */  
*                        /* 4. For a DDF/RRSAF rollup record = no   */  
*                        /*    meaning                              */  
FLD: QWACSUCV TYPE(FULL) DISP(292)
                            /*THIS FIELD CONTAINS THE SU CONV FACTOR.*/
*                        /* THIS VALUE IS USEFUL FOR ACCOUNTING     */  
*                        /* MONITORS THAT ATTEMPT TO ROLL UP CPU    */  
*                        /* EXECUTION TIMES ACROSS MULTIPLE DB2S    */  
*                        /* RUNNING ON DIFFERENT MACHINES.  WITHOUT */  
*                        /* THIS CONVERSION FACTOR, CPU TIMES       */  
*                        /* CANNOT BE NORMALIZED AND SUMMED.        */  
*                        /* This value reflects the conversion      */  
*                        /* factor at the time the record was       */  
*                        /* written.                                */  
FLD: QWACWLME LEN(8) DISP(296)
                             /*The MVS Workload Manager Service Class*/
*                        /* Name if the thread is a DBAT and if the */  
*                        /* MVS release and system definitions      */  
*                        /* invoke this function. Otherwise binary  */  
*                        /* zeroes.  For DDF/RRSAF rollup records,  */  
*                        /* this value will be derived from the last*/  
*                        /* thread to rollup data into the record.  */  
*/*******************************************************************   
*                        Log Values for task                            
*  amount of logging for a thread may exceed UR only related logging    
*  because of system related actions needed by the thread.              
********************************************************************/   
FLD: QWACLRN  LEN(4) TYPE(BIN) DISP(304)        /*log records written*/
FLD: QWACLRAB LEN(6) DISP(310)    /*bytes logged*/
FLD: QWACLRA2 LEN(2) DISP(310)    /*Hi order 2 bytes*/
FLD: QWACLRA4 LEN(4) DISP(312)    /*Lo order 4 bytes*/
*/********************************************************************* 
*  THE FOLLOWING VALUES ARE FOR USER DEFINED FUNCTIONS.                 
*  QWACUDCP AND QWACUDEA ARE CALCULATED ONLY IF CLASS 1 IS ACTIVE.      
*  QWACUDTT, QWACUDNE, AND QWACUDEB ARE CALCULATED ONLY IF CLASS        
*  2 IS ACTIVE.                                                         
*  QWACUDST IS CALCULATED ONLY IF CLASS 3 IS ACTIVE.                    
**********************************************************************/ 
FLD: QWACB303 LEN(1)
FLD: QWACUDCP TYPE(STCKTIME) DISP(316)
                                  /*The accumlated CPU time used to*/
*                        /* satisfy UDF requests                    */  
*                        /* processed in a DB2 stored procedure/    */  
*                        /* WLM address space. Non-inline UDF times */  
*                        /* are included in this time IF the native */  
*                        /* UDF was called on a nested task and was */  
*                        /* not invoked by the main application     */  
*                        /* execution unit. This time does not      */  
*                        /* include CPU consumed on an IBM specialty*/  
*                        /* engine.                                 */  
FLD: QWACA303 LEN(1)
FLD: QWACUDTT TYPE(STCKTIME) DISP(324)
                                  /*The accumulated CPU time consumed*/
*                        /* in DB2 processing SQL statements        */  
*                        /* issued by UDF(s) processed              */  
*                        /* in a DB2 stored procedure/WLM           */  
*                        /* address space.  This time also          */  
*                        /* includes in DB2 time needed to          */  
*                        /* connect and disconnect the udf task.    */  
*                        /* Non-inline UDF times are included in    */  
*                        /* this time IF the native UDF was called  */  
*                        /* on a nested task and was not invoked by */  
*                        /* the main application execution unit.    */  
*                        /* This time is a subset of QWACUDCP and   */  
*                        /* does not include CPU consumed on an IBM */  
*                        /* specialty engine.                       */  
FLD: QWACUDNE LEN(4) TYPE(BIN) DISP(332)
                                /*the number of SQL entry/exit events*/
*                        /* performed by user-defined functions     */  
FLD: QWACUDST TYPE(STCKTIME) DISP(336)
                               /*the total elapsed time spent waiting*/
*                        /* for an available TCB, before the        */  
*                        /* user-defined function could be scheduled*/  
FLD: QWACUDEA TYPE(STCKTIME) DISP(344)
                                  /*The total elapsed time spent in*/
*                        /* UDF requests processed in a DB2 stored  */  
*                        /* procedure/WLM address space.            */  
*                        /* Non-inline UDF times are included in    */  
*                        /* this time IF the native UDF was called  */  
*                        /* on a nested task and was not invoked by */  
*                        /* the main application execution unit.    */  
*                        /* This time includes time executing SQL.  */  
FLD: QWACUDEB TYPE(STCKTIME) DISP(352)
                             /*The total elapsed time spent executing*/
*                        /* SQL via UDF requests processed in a DB2 */  
*                        /* stored procedure/WLM address space.     */  
*                        /* This time includes time needed to       */  
*                        /* connect and disconnect the UDF task.    */  
*                        /* Non-inline UDF times are included in    */  
*                        /* this time IF the native UDF was called  */  
*                        /* on a nested task and was not invoked by */  
*                        /* the main application execution unit.    */  
*/*******************************************************************   
* The following values are for TRIGGERS.                                
* QWACTRTT, QWACTRET, QWACTRTE, QWACTREE, and QWACPECD                  
* are calculated only if class 1 is active.                             
*********************************************************************/  
FLD: QWACB304 LEN(1)
FLD: QWACTRTT TYPE(STCKTIME) DISP(360)
                            /*The accumulated CPU time consumed while*/
*                        /* executing triggers on the main          */  
*                        /* application execution unit.  This time  */  
*                        /* does not include CPU consumed on an IBM */  
*                        /* specialty engine.                       */  
FLD: QWACTRET TYPE(STCKTIME) DISP(368)
                              /*The accumulated elapsed time expended*/
*                        /* executing triggers on the main          */  
*                        /* application execution unit.             */  
FLD: QWACSPEA TYPE(STCKTIME) DISP(392)
                             /*The total elapsed time spent in stored*/
*                        /* procedure requests                      */  
*                        /* processed in a DB2 stored procedure/    */  
*                        /* WLM address space.  SQLP times are      */  
*                        /* included in this time IF the SQLP       */  
*                        /* was called on a nested task and was     */  
*                        /* not invoked by the main application     */  
*                        /* execution unit.  This time includes time*/  
*                        /* executing SQL.                          */  
FLD: QWACSPEB TYPE(STCKTIME) DISP(400)
                             /*The total elapsed time spent executing*/
*                        /* SQL via stored procedure requests       */  
*                        /* processed in a DB2 stored procedure/    */  
*                        /* WLM address space.  SQLP times are      */  
*                        /* included in this time IF the SQLP       */  
*                        /* was called on a nested task and was     */  
*                        /* not invoked by the main application     */  
*                        /* execution unit.  This time includes time*/  
*                        /* needed to connect and disconnect the SP */  
*                        /* task for non-SQLP stored procedures.    */  
FLD: QWACTRTE TYPE(STCKTIME) DISP(408)
                            /*The accumulated CPU time consumed while*/
*                        /* executing triggers on a nested task.    */  
*                        /* This time does not include CPU consumed */  
*                        /* on an IBM specialty engine.             */  
FLD: QWACTREE TYPE(STCKTIME) DISP(416)
                              /*The accumulated elapsed time expended*/
*                        /* executing triggers on a nested task.    */  
*/*******************************************************************   
* The following values are for External Savepoint requests              
* QWACSVPT, QWACRLSV, and QWACRBSV                                      
*********************************************************************/  
FLD: QWACESVP LEN(1)
FLD: QWACSVPT LEN(4) TYPE(BIN) DISP(424)
                                  /*the number of savepoint requests*/
FLD: QWACRLSV LEN(4) TYPE(BIN) DISP(428)
                                /*the number of release svpt requests*/
FLD: QWACRBSV LEN(4) TYPE(BIN) DISP(432)
                            /*the number of rollback to svpt requests*/
*/*******************************************************************   
*  Additional counters for global wait times. These counters            
*  break out values that were previously all contained in               
*  QWACAWTJ and QWACARNJ.                                               
*********************************************************************/  
FLD: QWAC2AW  LEN(1)
FLD: QWACAWTK TYPE(STCKTIME) DISP(436)
                                /*Accumulated wait time due to global*/
*                               contention for child L-locks        */  
FLD: QWACAWTM TYPE(STCKTIME) DISP(444)
                                /*Accumulated wait time due to global*/
*                               contention for other L-locks        */  
FLD: QWACAWTN TYPE(STCKTIME) DISP(452)
                                /*Accumulated wait time due to global*/
*                           contention for pageset/partition P-locks*/  
FLD: QWACAWTO TYPE(STCKTIME) DISP(460)
                                /*Accumulated wait time due to global*/
*                               contention for page P-locks         */  
FLD: QWACAWTQ TYPE(STCKTIME) DISP(468)
                                /*Accumulated wait time due to global*/
*                               contention for other P-locks        */  
FLD: QWACARNK LEN(4) TYPE(BIN) DISP(476)
                              /*Number of wait trace events processed*/
*                               for waits for global contention for     
*                               child L-locks                       */  
FLD: QWACARNM LEN(4) TYPE(BIN) DISP(480)
                              /*Number of wait trace events processed*/
*                               for waits for global contention for     
*                               other L-locks                       */  
FLD: QWACARNN LEN(4) TYPE(BIN) DISP(484)
                              /*Number of wait trace events processed*/
*                               for waits for global contention for     
*                               pageset/partition P-locks           */  
FLD: QWACARNO LEN(4) TYPE(BIN) DISP(488)
                              /*Number of wait trace events processed*/
*                               for waits for global contention for     
*                               page P-locks                        */  
FLD: QWACARNQ LEN(4) TYPE(BIN) DISP(492)
                              /*Number of wait trace events processed*/
*                               for waits for global contention for     
*                               other P-locks                       */  
FLD: QWACZIIP LEN(1)
FLD: QWACCLS1_ZIIP TYPE(STCKTIME) DISP(496)
                                /*Accumulated CPU time consumed while*/
*                         /* executing on an IBM specialty engine in*/  
*                         /* all environments.  This value may be   */  
*                         /* 0 when QWACRINV >= 20                  */  
FLD: QWACCLS2_ZIIP TYPE(STCKTIME) DISP(504)
                                /*Accumulated CPU time consumed while*/
*                         /* executing in DB2 on an IBM specialty   */  
*                         /* engine.                                */  
FLD: QWACTRTT_ZIIP TYPE(STCKTIME) DISP(512)
                            /*Accumulated CPU time consumed executing*/
*                         /* triggers on the main application       */  
*                         /* execution unit on an IBM specialty     */  
*                         /* engine.                                */  
FLD: QWACZIIP_ELIGIBLE LEN(8) DISP(520)
                                  /*(S) Accumulated CPU executed on a*/
*                         /* standard CP for zIIP-eligible work.    */  
*                         /* This field will reflect zIIP eligible  */  
*                         /* time for accounting records written    */  
*                         /* for:                                   */  
*                         /*   1) distributed DBATs                 */  
*                         /*   2) parallel query parents            */  
*                         /*   3) zIIP eligible utilities           */  
*                         /* For parallel query parent records the  */  
*                         /* value will reflect zIIP eligible time  */  
*                         /* for the parent and the child tasks.    */  
*                         /* Child task records will have a 0 value.*/  
*                         /* All other cases of specialty engine    */  
*                         /* offload are NOT reflected in this      */  
*                         /* field.                                 */  
FLD: QWACSPNF_ZIIP TYPE(STCKTIME) DISP(528)
                            /*Accumulated CPU time consumed executing*/
*                         /* stored procedure requests on the main  */  
*                         /* application execution unit on an IBM   */  
*                         /* specialty engine. Since these SPs run  */  
*                         /* entirely within DB2, this time         */  
*                         /* represents class 1 and class 2 time.   */  
FLD: QWACUDFNF_ZIIP TYPE(STCKTIME) DISP(536)
                            /*Accumulated CPU time consumed executing*/
*                         /* user defined functions on the main     */  
*                         /* application execution unit on an IBM   */  
*                         /* specialty engine. Since these UDFs run */  
*                         /* entirely within DB2, this time         */  
*                         /* represents class 1 and class 2 time.   */  
FLD: QWACNF   LEN(1)
FLD: QWACSPNF_ELAP TYPE(STCKTIME) DISP(544)
                                  /*Accumulated elapsed time consumed*/
*                         /* executing stored procedure requests on */  
*                         /* the main application execution unit.   */  
*                         /* Since these SPs run entirely           */  
*                         /* within DB2, this time represents class */  
*                         /* 1 and class 2 time.                    */  
FLD: QWACSPNF_CP TYPE(STCKTIME) DISP(552)
                            /*Accumulated CPU time consumed executing*/
*                         /* stored procedure requests on the main  */  
*                         /* application execution unit. This time  */  
*                         /* does not include CPU consumed on an    */  
*                         /* IBM specialty engine. Since these SPs  */  
*                         /* run entirely within DB2, this time     */  
*                         /* represents class 1 and class 2 time.   */  
FLD: QWACUDFNF_ELAP TYPE(STCKTIME) DISP(560)
                                  /*Accumulated elapsed time consumed*/
*                         /* executing user defined functions on    */  
*                         /* the main application execution unit.   */  
*                         /* Since these UDFs run entirely          */  
*                         /* within DB2, this time represents class */  
*                         /* 1 and class 2 time.                    */  
FLD: QWACUDFNF_CP TYPE(STCKTIME) DISP(568)
                            /*Accumulated CPU time consumed executing*/
*                         /* user defined functions on the main     */  
*                         /* application execution unit. This time  */  
*                         /* does not include CPU consumed on an    */  
*                         /* IBM specialty engine. Since these      */  
*                         /* UDFs run entirely within DB2, this     */  
*                         /* time represents class 1 and class 2    */  
*                         /* time.                                  */  
FLD: QWACSE   LEN(1)
FLD: QWACSP_CLS1SE TYPE(STCKTIME) DISP(576)
                                  /*The accumlated CPU time used to*/
*                         /* satisfy stored procedure requests      */  
*                         /* processed in a DB2 stored procedure/   */  
*                         /* WLM address space while executing on   */  
*                         /* an IBM specialty engine.  SQLP times   */  
*                         /* are included in this time IF the SQLP  */  
*                         /* was called on a nested task and was    */  
*                         /* not invoked by the main application    */  
*                         /* execution unit.                        */  
FLD: QWACSP_CLS2SE TYPE(STCKTIME) DISP(584)
                                  /*The accumulated CPU time consumed*/
*                         /* in DB2 processing SQL statements       */  
*                         /* issued by stored procedure(s) processed*/  
*                         /* in a DB2 stored procedure/WLM          */  
*                         /* address space while executing on an    */  
*                         /* IBM specialty engine. SQLP times are   */  
*                         /* included in this time IF the           */  
*                         /* SQLP was called on a nested task and   */  
*                         /* was not invoked by the main application*/  
*                         /* execution unit. This time is a subset  */  
*                         /* of QWACSP_CLS1se                       */  
FLD: QWACUDF_CLS1SE TYPE(STCKTIME) DISP(592)
                                  /*The accumlated CPU time used to*/
*                         /* satisfy UDF requests                   */  
*                         /* processed in a DB2 stored procedure/   */  
*                         /* WLM address space while executing on   */  
*                         /* an IBM specialty engine.               */  
FLD: QWACUDF_CLS2SE TYPE(STCKTIME) DISP(600)
                                  /*The accumulated CPU time consumed*/
*                         /* in DB2 processing SQL statements       */  
*                         /* issued by UDFs processed               */  
*                         /* in a DB2 stored procedure/WLM          */  
*                         /* address space while executing on an    */  
*                         /* IBM specialty engine. This time is a   */  
*                         /* subset of QWACUDF_CLS1se               */  
FLD: QWACTRTE_SE TYPE(STCKTIME) DISP(608)
                               /*The accumulated CPU time consumed on*/
*                         /* an IBM specialty engine while          */  
*                         /* executing triggers on a nested task.   */  
FLD: QWACRU   LEN(1)
FLD: QWAC_PT_COUNT LEN(4) TYPE(BIN) DISP(628)
                                  /*1. For all non rollup records 0*/
*                         /* 2. For a parallel query rollup record =*/  
*                         /*    number of parallel child agents     */  
*                         /*    rolled into this record             */  
*                         /* 3. For a DDF/RRSAF rollup record =     */  
*                         /*    the number of parallel query child  */  
*                         /*    agents rolled into this record.     */  
*                         /*    These agents are NOT counted in     */  
*                         /*    QWACPCNT.                           */  
FLD: QWACFLGS2 TYPE(HALF) DISP(632)
*QWAC_RU_PARQRY EQU X'8000' /* This record contains parallel         */ 
*                          /* query rollup data.                    */  
FLD: QWAC_PROFMON LEN(1)          /*Thread profile monitoring info*/
FLD: QWAC_PROFMON_TYPE LEN(1) DISP(634)
                            /*Profile monitoring type (e excp,w warn)*/
FLD: QWAC_PROFMON_PID LEN(4) TYPE(BIN) DISP(636)
                                  /*Profile table row id value*/
FLD: QWAC_PQS LEN(1)
FLD: QWAC_ACCEL LEN(1)
FLD: QWAC_ACCEL_ELIG_ELA TYPE(STCKTIME) DISP(652)
                                 /*The accumulated elapsed time spent*/
*                         /* processing SQL in DB2 that may be       */ 
*                         /* eligible for execution on an accelerator*/ 
FLD: QWAC_ACCEL_ELIG_CP TYPE(STCKTIME) DISP(660)
                                  /*The accumulated CPU time spent*/
*                         /* processing SQL in DB2 that may be       */ 
*                         /* eligible for execution on an accelerator*/ 
*                         /* this value does not include time spent  */ 
*                         /* processing on an IBM specialty engine   */ 
FLD: QWAC_ACCEL_ELIG_SE TYPE(STCKTIME) DISP(668)
                               /*The accumulated CPU time consumed on*/
*                         /* on an IBM specialty engine processing   */ 
*                         /* SQL in DB2 that may be eligible for     */ 
*                         /* execution on an accelerator             */ 
FLD: QWACEND  LEN(1) DISP(680)
*                                                                       
*/********************************************************************/ 
*/*THE FOLLOWING VALUES DESCRIBE WHY ACCOUNTING WAS INVOKED- QWACRINV*/ 
*/********************************************************************/ 
*/*         DCR-DJ012 ADDED ACC,STG,STL,IN2 *jbt 8/02                */ 
*QWACRACC EQU    X'00000001'  /*ACCUMULATING DATA BY END USER FOR DDF */
*                            /*OR RRSAF AND THRESHOLD REACHED FOR #  */ 
*                            /*END USER OCCURRENCES. THIS IS ALSO    */ 
*                            /*THE QWACRINV VALUE FOR IFI 147/148    */ 
*                            /*RECORDS THAT REPRESENT DDF/RRSAF      */ 
*                            /*ROLLUP DATA.                          */ 
*QWACRSTG EQU    X'00000002'  /*ACCUMULATING DATA BY END USER FOR DDF */
*                            /*OR RRSAF AND INTERNAL DB2 STORAGE     */ 
*                            /*THRESHOLD HAS BEEN REACHED            */ 
*QWACRSTL EQU    X'00000003'  /*ACCUMULATING DATA BY END USER FOR DDF */
*                            /*OR RRSAF AND ACCUMULATED DATA HAS     */ 
*                            /*EXCEEDED THE STALENESS THRESHOLD      */ 
*QWACRIFI EQU    X'00000004'  /*IFI READS REQUEST FOR IFCID 147 OR    */
*                            /*148                                   */ 
*QWACRSUS EQU    X'00000006'  /*SAME USER RESIGN-ON WITH SAME AUTHID  */
*QWACRNUS EQU    X'00000008'  /*NEW USER - THE AUTHORIZATION ID       */
*                            /*CHANGED.                              */ 
*QWACRINA EQU    X'0000000A'  /*DDF THREAD IS BECOMING INACTIVE       */
*QWACRIN2 EQU    X'0000000B'  /*DDF TYPE 2 INACT IS BECOMING INACTIVE */
*QWACRDEA EQU    X'0000000C'  /*DEALLOCATION - NORMAL PROGRAM         */
*                            /*TERMINATION                           */ 
*QWACRAAC EQU    X'0000000E'  /*COMMIT - RRSAF THREAD SPECIFIED       */
*                            /*ACCOUNTING INTERVAL = COMMIT          */ 
*/********************************************************************/ 
*/* THE FOLLOWING CONSTANTS INDICATE WHY ACCOUNTING WAS CALLED,         
*   HOWEVER, THE ACCOUNTING RECORD IS WRITTEN AT DEALLOCATION        */ 
*/********************************************************************/ 
*                                                                       
*QWACEOTN EQU    X'00000010'  /*END OF TASK - APPLICATION PROGRAM     */
*                            /*TERMINATED - NORMAL                   */ 
*QWACEOTA EQU    X'00000014'  /*END OF TASK - APPLICATION PROGRAM     */
*                            /*ABEND SITUATION - ABNORMAL            */ 
*QWACEOMA EQU    X'00000018'  /*END OF MEMORY - ABNORMAL TERMINATION  */
*QWACRESI EQU    X'0000001C'  /*RESOLVE INDOUBT - ABNORMAL            */
*QWACCANF EQU    X'00000020'  /*CANCEL FORCE - STOP FORCE COMMAND     */
*                            /*TERMINATED - ABNORMAL                 */ 
*/********************************************************************/ 
*/* THE FOLLOWING CONSTANTS INDICATE WHY ACCOUNTING WAS CALLED,         
*    AND THE ACCOUNTING RECORD IS WRITTEN NOW WITH THE WORK UNIT        
*    HAVING GONE  INDOUBT                                            */ 
*/********************************************************************/ 
*QWACETIN EQU    X'00000028'  /*END OF TASK - APPLICATION PROGRAM     */
*                            /*TERMINATED - NORMAL                   */ 
*QWACETIA EQU    X'0000002C'  /*END OF TASK - APPLICATION PROGRAM     */
*                            /*ABEND SITUATION - ABNORMAL            */ 
*QWACEMIA EQU    X'00000030'  /*END OF MEMORY - ABNORMAL TERMINATION  */
*                            /*ABNORMAL                              */ 
*QWACCNFI EQU    X'00000038'  /*CANCEL FORCE - STOP FORCE COMMAND     */
*                            /*ABNORMAL                              */ 


*/********************************************************************  
*  NOTE: If QWACPARR is on in QWACFLGS, this is a rollup record.     *  
*        A rollup record is written with accumulated                 *  
*        counter data for the following type of threads:             *  
*                                                                    *  
*        - Query parallelism child tasks, if ZPARM PTASKROL = YES    *  
*        - DDF and RRSAF threads, if ZPARM ACCUMACC is >= 2          *  
*        - Aggregated Accounting Statistics IFCID369s                *  
*                                                                    *  
*        Query parallelism child tasks:                              *  
*        A rollup record is written with accumulated counter data    *  
*        when the parent task (agent) deallocates on an originating  *  
*        DB2, or when an accumulating child task deallocated on an   *  
*        assisting DB2.  The rollup data is an accumulation of all   *  
*        the counters for that field for each child task that        *  
*        completed and deallocated.                                  *  
*                                                                    *  
*        DDF and RRSAF threads:                                      *  
*        A rollup record is written with accumulated counter data    *  
*        for a given end user when the number of occurrences of that *  
*        end user reaches the ZPARM value for ACCUMACC. End user     *  
*        user is the concatenation of the following three            *  
*        values as defined by ZPARM ACCUMUID:                        *  
*          - End user userid (QWHEUID, 16 bytes)                     *  
*          - End user transaction name (QWHCEUTX, 32 bytes)          *  
*          - End user workstation name (QWHCEUWN, 18 bytes)          *  
*                                                                    *  
*        All QWAX fields are valid in rollup records.                *  
*                                                                    *  
**********************************************************************/ 
*                                                                       

***********************************************************************
**** QWAX     DSECT , 
***********************************************************************

***********************************************************************
* TO REPORT ON ALL OCCURRENCES OF QWAX, USE:
* INPUT: SMF10211
*   NORMWHEN(SM102RTY=102 AND QWHSIID=369 AND QWT02R4N > 0)
*   NORMSMF(QWT02R4O)
***********************************************************************
COMP: QWAX_OFFSET =
  WHEN(SM102RTY<>102 OR QWHSIID<>369 OR QWT02R4N = 0) ASSIGN(99999)
  ELSE                                              ASSIGN(QWT02R4O)
FLD: QWAX     DISP(0) LEN(1) OFFSET(QWAX_OFFSET)
*/********************************************************************/ 
*  The following values are applicable only if accounting class 3       
*  is active.  The QWAX section is included only if at least one        
*  of these values is non-zero.                                         
*/********************************************************************/ 
FLD: QWAX4    LEN(4) TYPE(BIN) DISP(0)
FLD: QWAXALOG TYPE(STCKTIME) DISP(0)
                         /*Accumulated wait time due to processing of*/
*                         ARCHIVE LOG MODE(QUIESCE) commands            
*                      NOTE:                                            
*                        This number represents the amount of           
*                        time that an individual thread was suspended   
*                        due to an ARCHIVE LOG MODE(QUIESCE) command    
*                        and not the time that it took for the entire   
*                        command to complete                         */ 
FLD: QWAXALCT LEN(4) TYPE(BIN) DISP(8)
                            /*Number of suspensions due to processing*/
*                        of ARCHIVE LOG MODE(QUIESCE) commands.         
*                        QWAXALCT is a Class 1 value.                */ 
FLD: QWAXX    LEN(4) TYPE(BIN) DISP(12)
FLD: QWAXARND LEN(4) TYPE(BIN) DISP(12)
                              /*Number of wait trace events processed*/
*                        for waits for a drain lock.                 */ 
FLD: QWAXAWDR TYPE(STCKTIME) DISP(16)
                            /*Accumulated wait time for a drain lock.*/
FLD: QWAXAWCL TYPE(STCKTIME) DISP(24)
                                  /*Accumulated wait time for a drain*/
*                        when waiting for claims to be released      */ 
FLD: QWAXARNC LEN(4) TYPE(BIN) DISP(32)
                              /*Number of wait trace events processed*/
*                        for suspensions to wait for claims to          
*                        be released                                 */ 
FLD: QWAXAWAR TYPE(STCKTIME) DISP(36)    /*Accumulated wait time for:*/
*                         - archive reads                               
*                         - active reads                                
*                         - active log prefetch reads                */ 
FLD: QWAXANAR LEN(4) TYPE(BIN) DISP(44)
                              /*Number of wait trace events processed*/
*                        for:                                           
*                         - archive reads                               
*                         - active reads                                
*                         - active log prefetch reads                */ 
FLD: QWAXOCSE TYPE(STCKTIME) DISP(48)
                           /*Accumulated wait time due to synchronous*/
*                         execution unit switch to the DB2              
*                         Open/Close data set service or the            
*                         HSM recall service.                        */ 
FLD: QWAXSLSE TYPE(STCKTIME) DISP(56)
                           /*Accumulated wait time due to synchronous*/
*                         execution unit switch to the DB2              
*                         SYSLGRNG recording service.  This service     
*                         is also sometimes used for level-id           
*                         checking for down level detection.         */ 
FLD: QWAXDSSE TYPE(STCKTIME) DISP(64)
                           /*Accumulated wait time due to synchronous*/
*                         execution unit switch to the DB2              
*                         Dataspace Manager Services, which include:    
*                            - Define data set                          
*                            - Extend data set                          
*                            - Delete data set                          
*                            - Reset data set                           
*                            - VSAM catalog access                   */ 
FLD: QWAXOTSE TYPE(STCKTIME) DISP(72)
                           /*Accumulated wait time due to synchronous*/
*                         execution unit switch to other DB2            
*                         service tasks                              */ 
FLD: QWAXOCNS LEN(4) TYPE(BIN) DISP(80)
                          /*Number of wait trace events processed for*/
*                         waits for synchronous execution unit          
*                         switching to the Open/Close service.      */  
FLD: QWAXSLNS LEN(4) TYPE(BIN) DISP(84)
                          /*Number of wait trace events processed for*/
*                         waits for synchronous execution unit          
*                         switching to the Syslgrng recording           
*                         service.                                  */  
FLD: QWAXDSNS LEN(4) TYPE(BIN) DISP(88)
                          /*Number of wait trace events processed for*/
*                         waits for synchronous execution unit          
*                         switching to Dataspace Manager                
*                         service tasks.                            */  
FLD: QWAXOTNS LEN(4) TYPE(BIN) DISP(92)
                          /*Number of wait trace events processed for*/
*                         waits for synchronous execution unit          
*                         switching to other service tasks.         */  
FLD: QWAX2X   LEN(4) TYPE(BIN) DISP(96)
FLD: QWAXAWFC TYPE(STCKTIME) DISP(96)
                           /*Accumulated wait time for commit phase 1*/
*                         database write I/O completion.            */  
FLD: QWAXFCCT LEN(4) TYPE(BIN) DISP(104)
                          /*Number of wait trace events processed for*/
*                         force-at-commit                           */  
FLD: QWAXIXLE LEN(4) TYPE(BIN) DISP(108)
                          /*Number of wait trace events processed for*/
*                         asynch IXLCACHE/IXLFCOMP invocations.         
*                         These are incremented by IFCID 329 which      
*                         is NOT part of a begin/end pair so this       
*                         number represents the true # of events and    
*                         is not doubled as are other wait events.  */  
FLD: QWAXIXLT LEN(4) TYPE(B-SECS) DISP(112) DEC(2)
                             /*Accumulated wait time for IXLCACHE and*/
*                         IXLFCOMP asynch req. in microseconds      */  
*                                                                       
FLD: QWAXEND  LEN(1) DISP(116)
                                                                 
FLD: SMF102_END LEN(1) OFFSET(0)

 


 

Sample Report from SMF 102, IFCID 144 Records
DB2 Audit Report -- Users Accessing Selected Tables


The sample SMF report below was created with
Spectrum SMF Writer, the low-cost 4GL SMF report writer.

In this report, the primary input file is the SMF file. We select just the type 102 "DB2 Audit" records with IFCID 144 ("ATTEMPTED ACCESS (READ) OF AN AUDITED OBJECT"). (See SMF 102 record layout.) We normalize the 144 data section, in order to report on all occurances of that segment within each SMF record.

We select the records for the timeframe and the tables we are interested in. (Alternately, we could have selected on Operator ID, to see all tables accessed by a given user.)

This example also illustrates Spectrum SMF Writer's DB2 Option. The SMF record itself does not contain the text name of the tables being accessed. It just contains halfword codes for: Database ID, Page Space ID and Object ID. However, we were able to use those codes to "select" rows from two DB2 system tables and expand those codes into full names. Thus we were able to show the actual table names in our report.

All of this with just a few lines of code!
Why not install a Spectrum SMF Writer trial right now and start making your own SMF reports!

These Spectrum SMF Writer Statements:

OPTION: DB2SUBSYS('DB2T') NOGRANDTOTALS
*
*   THE MAIN INPUT FILE IS THE SMF FILE. WE NORMALIZE TO GET ALL SEGMENTS
INPUT:  SMF102V9  LIST(YES)
        IOEXIT('GENNORM','A 102 --- 036 2I N | 028 004 2 00144') 
*
*   LOOK UP SPACE NAME IN IBM SYSTEM DB2 TABLE
READ:  SPACE   SHOWFLDS(YES)
       DB2NAME('SYSIBM.SYSTABLESPACE')
       WHERE(DBID = QW0144DB AND PSID = QW0144PS)
*
*   LOOK UP TABLE NAME IN IBM SYSTEM DB2 TABLE
READ:  TABLE   SHOWFLDS(YES)
       DB2NAME('SYSIBM.SYSTABLES')
       WHERE(TABLE.DBID = QW0144DB AND TABLE.OBID = QW0144OB)
*
*   SELECT THE RECORDS WE WANT FOR THE REPORT
INCLUDEIF: SM102RTY = 102
           AND QWHSIID = 144
           AND SM102DTE = 4/11/10
           AND SM102TME >= 18:00:00 AND < 19:00:00
           AND SPACE.NAME : 'FLOAT'
***        AND QWHCOPID = 'TTP011A'
*
*   SELECT THE DATA FIELDS TO PRINT IN THE REPORT
COLUMNS:
     SM102RTY(3 'SMF|REC|TYP')
     QWHSIID(4 'IFC|ID')
     SM102DTE('SMF|LOG DATE')
     SM102TME('SMF|LOG TIME')
     QWHCCN('CONNECT|NAME')
     QWHCPLAN('PLAN|NAME')
     QWHCOPID('OPERATOR/ID')
     QW0144DB(4 'DBID')
     SPACE.NAME(16 'DBID|NAME')
     QW0144PS(4 'PSID')
     QW0144OB(4 'OBID')
     TABLE.NAME(16 'OBID|NAME')
*
*   SPECIFY REPORT TITLES
TITLE: 'DB2 AUDIT REPORT FROM SMF 102 RECORDS'
TITLE: 'ACCESS TO TABLES BEGINNING WITH "FLOAT"'

 

Produce This SMF Report:

                                    DB2 AUDIT REPORT FROM SMF 102 RECORDS
                                   ACCESS TO TABLES BEGINNING WITH "FLOAT"
 SMF 
 REC IFC    SMF        SMF     CONNECT    PLAN                          DBID                       OBID
 TYP  ID  LOG DATE  LOG TIME     NAME     NAME   OPERATOR/ID DBID       NAME       PSID OBID       NAME
 ___ ____ ________ ___________ ________ ________ ___________ ____ ________________ ____ ____ ________________

 102  144 04/11/10 18:37:40.13 TSO      ADB       TTP011A      291 FLOATACC1           2    3 FLOATAAC1
 102  144 04/11/10 18:37:54.06 TSO      ADB       TTP011A      291 FLOATACC1           2    3 FLOATAAC1
 102  144 04/11/10 18:38:09.56 TSO      ADB       TTP011A      291 FLOATACC1           2    3 FLOATAAC1
 102  144 04/11/10 18:38:19.11 TSO      ADB       TTP011A      292 FLOATTEMP           2    3 FLOATTEMP
 102  144 04/11/10 18:38:31.80 TSO      ADB       TTP011A      292 FLOATTEMP           2    3 FLOATTEMP
 102  144 04/11/10 18:48:35.58 DB2CALL  SPECT303  TTP011A      292 FLOATTEMP           2    3 FLOATTEMP
 102  144 04/11/10 18:49:29.27 DB2CALL  SPECT303  TTP011A      291 FLOATACC1           2    3 FLOATAAC1

See other sample SMF reports.

Copyright 2024.
Pacific Systems Group.
All rights reserved.
Home | Products | Prices | Documentation | 30-Day Trials | Customer Reviews | Company | FAQ | Sample Reports | SMF Records
Send Your Comments or Questions
+