Information

This site will undergo a brief period of maintenance on Friday, 18 December at 12:30 AM Central/12:00 PM IST. During a 30 minute window, site availability may be intermittent.

Default language.

Information
Space announcement The Using section of the MainView for DB2 documentation is now available in Japanese. The displayed language is dependent on your browser language. You can switch languages from the Language menu.

Trace print from a TLDS


You can print a trace log data set by using the JCL provided in BBSAMP members DZTBTRAC. Specify the DSN of the log with the TLDS parameter. Multiple TLDSs can be concatenated.

JCL to print a trace (DZTBTRAC)

//         JOB (ACCT),'NAME'
//DZTBPRNT PROC TLDS=NULLFILE,            INPUT TRACE DATA SET
//             TDIR=NULLFILE,             INPUT TRACE DIRECTORY
//             SMF=NULLFILE,              INPUT UNLOADED SMF FILE
//             GTF=NULLFILE,              INPUT GTF FILE
//             ARC=NULLFILE,              INPUT ARCHIVED TRACE DATA SET
//             PFX='HILVL.RUN.LIB'        DSN PREFIX OF BBLINK
//PRINT   EXEC PGM=DZTBPRNT,REGION=4M,PARM='GMWK=128K'
//*                                       INCREASE GMWK FOR LARGE TRACES
//STEPLIB   DD DISP=SHR,DSN=&PFX..BBLINK
//SYSPRINT  DD SYSOUT=*                   INPUT LIST AND DIAGNOSTICS
//SYSUDUMP  DD SYSOUT=*                   ABEND DUMPS
//STD1      DD SYSOUT=*                   DEFAULT REPORT OUTPUT
//*
//*    ===>    ONLY ONE OF THE FOLLOWING INPUT DD'S MAY BE SPECIFIED
//*    ===>    IF NONE IS SPECIFIED, DEFAULT INPUT IS LIVE SMF DATASET
//*
//TRACIN01  DD DISP=SHR,DSN=&TLDS         TLDS INPUT
//TRACEDIR  DD DISP=SHR,DSN=&TDIR         TLDS INPUT THRU TRACE DIR
//SMFIN     DD DISP=SHR,DSN=&SMF          SMF INPUT
//GTFIN     DD DISP=SHR,DSN=&GTF          GTF INPUT
//ARCIN     DD DISP=SHR,DSN=&ARC          ARCHIVED TLDS INPUT
//        PEND
//*
//*                     ** SPECIFY INPUT FILE **
//PRINT   EXEC DZTBPRNT,TLDS='SYS5.DB2P.THRDHIST.JUL01.T0001.V01'
//REPTDD1   DD SYSOUT=*                  USER-DEFINED OUTPUT DD
//RPTSUM    DD SYSOUT=*                  SAMPLE REPORT OUTPUT DD
//RPTWKLD   DD SYSOUT=*                  SAMPLE REPORT OUTPUT DD
//RPTACCL   DD SYSOUT=*                  SAMPLE REPORT OUTPUT DD
//RPTACCS   DD SYSOUT=*                  SAMPLE REPORT OUTPUT DD
//RPTSQL    DD SYSOUT=*                  SAMPLE REPORT OUTPUT DD
//RPTEVNT   DD SYSOUT=*                  SAMPLE REPORT OUTPUT DD
//RPTEXPL   DD SYSOUT=*                  SAMPLE REPORT OUTPUT DD
//RPTFAIL   DD SYSOUT=*                  SAMPLE REPORT OUTPUT DD
//*SYSIN    DD *                         FOR IN-STREAM REPORT STMTS
//SYSIN     DD DSN=&PFX.BBSAMP(DZJPSUM)   DEFAULT SUMMARY RPT  (SUM)
//          DD DSN=&PFX.BBSAMP(DZJPWKLD)  WORKLOAD SUMMARY-TIME(SUM)
//*         DD DSN=&PFX.BBSAMP(DZJPACCL)  ACCTG DETAIL-LONG    (SUM)
//*         DD DSN=&PFX.BBSAMP(DZJPACCS)  ACCTG DETAIL-SHORT   (SUM)
//*         DD DSN=&PFX.BBSAMP(DZJPSQL)   SQL STATEMENT SUMMARY(D-SQL)
//*         DD DSN=&PFX.BBSAMP(DZJPEVNT)  THREAD DETAIL EVENTS (D-ANY)
//*         DD DSN=&PFX.BBSAMP(DZJPEXPL)  SQL TEXT/EXPLAIN     (D-SQL)
//*         DD DSN=&PFX.BBSAMP(DZJPFAIL)  LOCK/EDM FAILURES    (D-BASE)
//*

For detailed information about all control statements in DZTBTRAC, see Printing-a-trace-report.

An example of the Accounting Summary Report that is produced when you submit this JCL is shown in the following figure. It shows accounting totals, followed by a trace summary by plan.

BMC SOFTWARE INC            ACCOUNTING SUMMARY REPORT              PAGE:       2
REPORT:REPORT1                                                     DATE: 14JUN16
                                                                   TIME:09:36:46
  13JUN16                  DTL SQL TRACE=BOLJXO1  
- - - - - - - - - - SUMMARY STATISTICS - ALL TRACE ENTRIES  - - - - - - - - - -
-----TERMINATIONS ----------    ---------ACTIVITY------------------------------
FIRST END..13JUN 12.25.11.63                TOTAL   AVERAGE   MAXIMUM   MINIMUM
LAST END...13JUN 12.37.59.01             --------  --------  --------  --------
NUMBER THREADS.............2    ELAPSED  00:26:21  00:13:10  00:13:34  00:12:47
COMMIT/ROLLBK.......2/.....0    ELP-DB2  00:21:28  00:10:44  00:11:01  00:10:27
NORMAL TERM................2    CPU      00:11:09  00:05:34  00:05:37  00:05:32
-- NEW USER................0    CPU-DB2  00:07:39  00:03:50  00:03:52  00:03:47
-- DEALLOC.................2    WAITS    00:09:37  00:04:48  00:04:51  00:04:46
-- APPL END................0    ZIIP CPU     0 us      0 us      0 us      0 us
-- RESIGNON................0    ZIIP-DB2     0 us      0 us      0 us      0 us
-- DBAT INACT..............0    ZIIP-EL.     0 us      0 us      0 us      0 us
-- DDF/RRSAF ROLLUP........0    SQL       44,000K   22,000K   22,000K   22,000K
ABNORMAL TERM..............0    GETPAGES      352       176       176       176
IN DOUBT TERM..............0    SYNC RDS        0         0         0         0
BUFFER HIT %..........VP=100    PFCH PGS        0         0         0         0
ZIIP USED/ELIGIBLE %.  0/  0    UPD/COMT        0         0         0         0
                                ACC ELAP 00:25:37  00:12:49  00:13:11  00:12:26
                                ACC CPU  00:10:55  00:05:27  00:05:28  00:05:26
                                ACC WAIT 4,132 ms  2,066 ms  2,080 ms  2,052 ms
                                AcEl Elp     0 us      0 us      0 us      0 us
                                AcEl CPU     0 us      0 us      0 us      0 us
                                AcEl zIP     0 us      0 us      0 us      0 us
                                                                              
 END TIME     PLAN    AUTHID  CONNECT   ELAPSED   CPU    # STMTS GETPAGE REASON
----------- -------- -------- -------- -------- -------- ------- ------- ------
12:25:11    DSNTEP2  BOLJXO1  BATCH    00:13:34 00:05:37 22,000K     176  OK    
                                                                               
STOP.....13JUN 12.25.11.63 PLAN...............DSNTEP2 TYPE.........ACCELERATOR  
START....13JUN 12.11.37.57 AUTHID............BOLJXO1  CONNECT........BATCH/TSO  
ELAPSED...........00:13:34 ORIG PRIM AUTH....BOLJXO1  CORR ID.....BOLJXOAD      
TERM........NORMAL/DEALLOC COMMITS..................1 ROLLBACKS..............0  
------------------------------------------------------------------------------  
RUNTIME ANALYSIS   IN DB2     IN APPL.      TOTAL      %IN DB2(=)     TOTAL(*)  
----------------   --------   --------   --------     0 ...25...50...75..100%   
ELAPSED TIME       00:11:01   00:02:33   00:13:34     | ================**** |  
CPU TIME           00:03:52   00:01:45   00:05:37     |                      |  
DB2 WAIT TIME      00:04:46                           | =======              |  
- Specialty Engine CPU times - -                                                
  - In DB2 CPU         0 us                  0 us     |                      |  
  - STORED PROC        0 us                                                     
  - UDF                0 us                                                     
  - TRIGGER            0 us                                                     
- Accel-elig elpsd     0 us                                                     
  - Eligible CPU       0 us                                                     
  - Eligible zIIP      0 us                                                     
- - - - - - ACTIVITY  - - - - - -     - - - - - - KEY INDICATORS  - - - - - - -
TOTAL SQL.................22,000K     SQL: SELECT=     0, FETCH=   22M          
GETPAGES......................176     ACCEL CONNECTS=     22, REQUESTS=     44  
SYNC READS (PRLL=00)............0     SQL: DYNAMIC(PREPARE)=    24              
PREFETCH PAGES READ.............0     TOTAL ACCELERATOR DDL = EEEEEEE           
UPDATES/COMMIT................0.0     ACCEL INS=EEEEEE, UPD=  459K, DEL=EEEEEE  
BFR HIT RATIOS:...........VP=100%     AROWS INS=     0, UPD=   18P, DEL=EEEEEE  
LOG RECORDS WRITTEN.............0

All control of the input and formatting is done through a series of keywords in the input job stream (or in a PDS member) under ddname SYSIN. Keywords that apply to all requested reports can be specified following a label of GLOBAL. Keywords that apply to a specific report must be specified following the REPORT label. An example of two report requests is shown in following figure.

GLOBAL  TIME=1300-1500
*
*       SQL-TEXT and EXPLAIN FROM TSO
*
REPORT  REPORTID=DAILY1,LTRAC=YES,NEWPAGE=TRAN,
        POPUP=(SQL-TEXT,EXPLAIN,OPEN),
        CONNECT=TSO,
        TITLE1='DETAILS OF BIND AND EXPLAIN',
        TITLE2='WITH STATS FROM OPEN',
        DDN=OUTPUT1,WIDTH=WIDE       COMMENTS ABOUT THE REPORT
*
*       FULL EXAMINATION OF CERTAIN SPECIAL TRANSACTIONS
*
REPORT  REPORTID=SPECIALS,LTRAC=YES,STRAC=SUMMARY,DTRAC=YES,POPUP=ALL,
        NEWPAGE=(TRAN,FIRSTEVENT),LEVEL=3,
        PLAN=(PAY+++++,ACCT1+++),CONNECT=IMSP,
        AUTHID=(USR1,USR5)

The GLOBAL keyword TIME limits the trace output to 1:00 P.M. to 3:00 P.M. for both reports.

The first report prints the one-line LTRAC entry on a new page for each transaction of the selected TSO threads and the pop-ups for SQL-TEXT, EXPLAIN, and OPEN after that one-line entry for each transaction. The report is written on ddname OUTPUT1.

The second report prints the one-line LTRAC entry, the STRAC accounting summary, and all DTRAC events and pop-ups for selected plans from two specific IMS users. The report is written on ddname SPECIALS.

For detailed information about each of the request keywords, see Request-keywords.

Related topic


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

MainView for DB2 6.1