Saturday, July 19, 2025

Extracting SMF records : SORT vs IFASMFDP

The below job demonstrates two approaches to extracting SMF record types 70 to 79 from a weekly SMF dataset.

The goal is to compare the performance of the SORT utility and the IFASMFDP utility.
 
Test job
 
//SORT    EXEC PGM=SORT                                     
//SORTIN DD   DISP=SHR,DSN=SMF.WEEKLY.FILE          
//SORTOUT  DD DSN=USERID.SMF7079.SORT,                     
//            DISP=(NEW,CATLG,DELETE),                      
//            DATACLAS=DCTLARGE,                            
//            SPACE=(CYL,(100,100),RLSE),                   
//            DCB=(RECFM=VBS,BLKSIZE=0,LRECL=32760,DSORG=PS)
//SYSOUT DD SYSOUT=*                                        
//SYSIN DD *                                                
 OPTION COPY,VLSHRT                                         
 INCLUDE COND=(06,1,CH,GE,X'46',AND,    SMF TYPE 70         
               06,1,CH,LE,X'4F')        SMF TYPE 79         
//*                                                         
//IFASMFDP   EXEC PGM=IFASMFDP                                
//SYSPRINT DD SYSOUT=*                                      
//INDD1    DD DISP=SHR,DSN=SMF.WEEKLY.FILE          
//OUTDD1   DD DSN=USERID.SMF7079.IFASMFDP,                 
//            DISP=(NEW,CATLG,DELETE),                      
//            DATACLAS=DCTLARGE,                            
//            SPACE=(CYL,(100,100),RLSE),                   
//            DCB=(RECFM=VBS,BLKSIZE=0,LRECL=32760,DSORG=PS)
//SYSIN    DD *                                            
 INDD(INDD1,OPTIONS(ALL))                                  
 OUTDD(OUTDD1,TYPE(70:79))                                 
 START(0000)                                               
 END(2359)                                                 
/*                                                         
 
Job performance data
 

Step

EXCP

Conn

TCB Time

Elapsed Time

CPU Time

SORT

93,346

209K

6.64 sec

3:47.52

6.75 sec

IFASMFDP

1,403,000

308K

12.09 sec

6:40.17

16.16 sec

 
 
  • SORT completed in nearly half the time of IFASMFDP.
  • CPU usage for IFASMFDP was more than double that of SORT.
  • EXCP count (I/O operations) was significantly higher for IFASMFDP
 
Use SORT for quick and lightweight SMF record extraction.
Of course if you need complex SMF record extraction, you would need go with IFASMFDP.

Interpreting 12 byte format of USRCPUT in CICS SMF 110 records

You are trying to understand the format of fields such as USRCPUT. The old PICTURE clause in DFHCOB was TMRCPUT-TIME PICTURE 9(8) COMP. The new PICTURE clause is S9(8). Looking at the SMF 110 records generated by CICS Transaction Server for z/OS (CICS TS) V3.2 and higher, you find values like x'000000000025CFE0'. The values generated by CICS TS V2.3 and V3.1 are more in the range '00000071'. You want to know, what does the field USRCPUT represent and how to convert it to seconds?

The USRCPUT field for CICS TS V3.2 and higher is a 12 byte field. Basically, clock fields like USRCPUT are now 12 bytes instead of 8 bytes. So, in CICS TS V2.3 the USRCPUT part of the SMF 110 record might look like 00000BC300000007 which you would break it down as follows:

00000BC300000007 - Example 8 byte USRCPUT in releases of CICS prior to CICS TS V3.2 
00000BC3 - CPU time in binary units where the smallest unit is 6 microseconds (bytes 1 to 4)
00 - Reserved bits (byte 5)
000007 - Count of the number of times contributed to the CPU time (bytes 6 to 8)

Now with CICS TS V3.2 and higher you will see something like 000000000BC3F29D00000007 and you would break it down as follows:

000000000BC3F29D - CPU time in binary units where the smallest unit is 16 microseconds (bytes 1 to 8)
00 - Reserved bits (byte 9)
000007 - Count of the number of times contributed to the CPU time (bytes 10 to 12)

Before you could convert the CPU time to seconds by taking 00000BC3 and converting to decimal and multiplying by .000016. But, now you would take the middle 4 bytes of the CPU time (which would give you 00000BC3) and then convert it like you used to. Or, to get a little greater accuracy you could do the following:

   1. Disregard the bottom 3 nibbles of the CPU time
      (leaving you 000000000BC3F) and convert it to decimal.
   2. Multiply the result by .000001 to get the value in seconds.


Below is the sample COBOL code to calculate the USRCPUT time.

*  User task CPU time                         
05  PDRCPUT.                               
    07  PDRCPUT-TIME    PIC X(8).          
    07  PDRCPUT-COUNT   PIC S9(8)   COMP.  
 
05 WS-TEMP-CPU-TIME            PIC 9(18) COMP.        
05 WS-TEMP-CPU-TIME-R REDEFINES WS-TEMP-CPU-TIME     
                              PIC X(08).             
05 WS-TEMP-CPU-TIME-X         PIC X(08).             
05 WS-USRCPUT-TIME            PIC 9(03)V9(06) COMP-3. 

     MOVE PDRCPUT-TIME             TO WS-TEMP-CPU-TIME-R
     MOVE LOW-VALUES               TO WS-TEMP-CPU-TIME-X       
* DROP LAST BYTE                                               
     MOVE WS-TEMP-CPU-TIME-R (1:7) TO WS-TEMP-CPU-TIME-X (2:7) 
     MOVE WS-TEMP-CPU-TIME-X       TO WS-TEMP-CPU-TIME-R       
* DIVIDE BY 16 TO DROP LAST 4 BITS                             
     COMPUTE WS-TEMP-CPU-TIME = WS-TEMP-CPU-TIME / 16          
     COMPUTE WS-USRCPUT-TIME  = WS-TEMP-CPU-TIME * 0.000001.         
 

 

Sunday, May 25, 2025

Generate MQ, CICS related reports using CA Explore Report writer

 We can use CA Explore Report writer to generate Various sub system reports such as CICS, MQ, MVS, IMS etc from Sysview Log streams.

The below sample job gerenates "MQ OBJECT STATISTICS" from Sysview MQ log stream

//***************************************************************       
//* You can use logstreams as input:                            *       
//*                                                             *       
//* SET SMFIN='sysview.AUDIT.ADTT'                              *       
//* SET SMFIN='sysview.CICSLOGR.TRAN'                           *       
//* SET SMFIN='sysview.CICSLOGR.TSUM'                           *       
//* SET SMFIN='sysview.CICSLOGR.SYSD'                           *       
//* SET SMFIN='sysview.CICSLOGR.XLOG'                           *       
//* SET SMFIN='sysview.IMSLOGR.IMTR'                            *       
//* SET SMFIN='sysview.IMSLOGR.IMRS'                            *       
//* SET SMFIN='sysview.MQSDATA.MQHR'                            *       
//* SET SMFIN='sysview.SMFDATA.SMFD'                            *       
//* SET SMFIN='sysview.SYSDATA.XLOG'                            *       
//*                                                             *       
//* Type LGLOGS command in SYSVIEW to find out names of the     *       
//* logstreams.                                                 *       
//*                                                             *       
//***************************************************************       
//* Type Sysview high level qualifier below.                    *       
//***************************************************************       
// SET SMFIN='XXX0150.MQSDATA.MQHR'          
// SET SYSVIEW='CA.SYSVIEW.R17'                                        
//*                                                                     
//REPORT   EXEC PGM=XPFRMAIN,REGION=4M                                  
//STEPLIB  DD DISP=SHR,DSN=&SYSVIEW..CNM4BLOD                           
//ERPTPRM  DD DISP=SHR,DSN=&SYSVIEW..CNM4RSAM                           
//SYSUDUMP DD SYSOUT=*                                                  
//SYSPRINT DD DSN=USERID.MQ.SYSVIEW.TEST,                              
//            DISP=(NEW,CATLG,DELETE),                                  
//            SPACE=(CYL,(50,50)),                                      
//            DCB=(RECFM=FB,LRECL=1024)                                 
//TAPSMF   DD DISP=SHR,DSN=&SMFIN,                              *       
//            SUBSYS=(LOGR,GSVXLGEX,                            *       
//            'FROM=OLDEST,TO=YOUNGEST,LOCAL',                  *       
//            'STATS,EXPAND,BACKWARD,NORDW'),                   *       
//            DCB=(DSORG=PS,RECFM=VB,LRECL=32756,BLKSIZE=32760) *       
//*                                                             *       
//SYSIN    DD DISP=SHR,DSN=&SYSVIEW..CNM4RSAM(MQ001)               
//*                                                                
//***************************************************************  
//* Use this utility to transform created report to CSV format. *  
//*                                                             *  
//* Optional parameters: (one character long only)              *  
//*  - VS - Value Separator (default is ,)                      *  
//*  - DS - Decimal Separator (default is .)                    *  
//*                                                             *  
//***************************************************************  
//*                                                                
//PARSE    EXEC PGM=IKJEFT01                                       
//SYSEXEC  DD DISP=SHR,DSN=&SYSVIEW..CNM4RSAM                      
//SYSTSPRT DD SYSOUT=*                                             
//RWO      DD SYSOUT=*,DCB=(RECFM=FB,LRECL=1024)                   
//CSVIN    DD DSN=USERID.MQ.SYSVIEW.TEST,DISP=SHR                 
//CSVOUT   DD DSN=USERID.MQ.SYSVIEW.TEST.CSV,  
//            DISP=(NEW,CATLG,DELETE),          
//            SPACE=(CYL,(50,50)),              
//            DCB=(RECFM=FB,LRECL=1024)         
//SYSTSIN  DD *                                 
  CSVGEN CSVIN CSVOUT VS=; DS=,                 
/*                                              


The sample control cards to generate various reports can be found at 
sysview.CNM4RSAM($$INDEX) library

The below job generates last 1 hour "CICS Transaction Detail Report" from Sysview CICS logstream  

// SET SMFIN='XXXX150.CICSLOGR.TRAN'      
// SET SYSVIEW='CA.SYSVIEW.R17'                                    
//*                                                                 
//REPORT   EXEC PGM=XPFRMAIN,REGION=4M                              
//STEPLIB  DD DISP=SHR,DSN=&SYSVIEW..CNM4BLOD                       
//ERPTPRM  DD DISP=SHR,DSN=&SYSVIEW..CNM4RSAM                       
//SYSUDUMP DD SYSOUT=*                                              
//*YSPRINT DD SYSOUT=*                                              
//SYSPRINT DD DSN=USERID.CICS.SYSVIEW.TEST,                        
//            DISP=(NEW,CATLG,DELETE),                              
//            SPACE=(CYL,(50,50)),                                  
//            DCB=(RECFM=FB,LRECL=1024)                             
//TAPSMF   DD DISP=SHR,DSN=&SMFIN,                              *   
//            SUBSYS=(LOGR,GSVXLGEX,'LOCAL,DURATION=(1,HOURS)'),    
//            DCB=BLKSIZE=32760                                     
//SYSIN    DD DISP=SHR,DSN=&SYSVIEW..CNM4RSAM(CICS031)   
//PARSE    EXEC PGM=IKJEFT01                          
//SYSEXEC  DD DISP=SHR,DSN=&SYSVIEW..CNM4RSAM         
//SYSTSPRT DD SYSOUT=*                                
//RWO      DD SYSOUT=*,DCB=(RECFM=FB,LRECL=1024)      
//CSVIN    DD DSN=USERID.CICS.SYSVIEW.TEST,DISP=SHR  
//CSVOUT   DD DSN=USERID.CICS.SYSVIEW.TEST.CSV,      
//            DISP=(NEW,CATLG,DELETE),                
//            SPACE=(CYL,(50,50)),                    
//            DCB=(RECFM=FB,LRECL=1024)               
//SYSTSIN  DD *                                       
  CSVGEN CSVIN CSVOUT VS=; DS=,                       
/*                                                    

Documentation for Sample reports can be found at https://techdocs.broadcom.com/us/en/ca-mainframe-software/performance-and-storage/ca-sysview-performance-management/17-0/reporting/using-ca-explore-report-writer/sample-reports/cics-sample-reports.html

Saturday, May 17, 2025

Send multiple files as attachment thru email in a single job step from Mainframe

XMITIP is a mainframe based electronic mail application that is capable of sending electronic mail to any valid Intranet or Internet address. Along with messages, XMITIP can also send mainframe files in one of several different file attachment formats.  XMITIP is written almost completely in z/OS REXX by Lionel B Dyck.

Guide can be found at https://github.com/lbdyck/pubs/blob/main/XMITIP-Guide.pdf

The below job step sends two mainframe datasets as attachment.

//XMITIP  EXEC PGM=IKJEFT1B        
//SYSEXEC  DD DISP=SHR,DSN=system.sysexec library  
//DD1      DD DISP=SHR,DSN=MY.FILE1     
//DD2      DD DISP=SHR,DSN=MY.FILE1    
//SYSPRINT DD  SYSOUT=*                          
//SYSTSPRT DD  SYSOUT=*                          
//SYSTSIN DD   *                                 
%xmitip mainframe.dev@abc.com                     +    
        MSGT 'This is the body of the mail'       +
        From mainframe.dev@abc.com                +
        Subject 'This is the subject of the mail' +
        FILEDD (DD1 DD2)                          +                  
        FILENAME (file1.csv file2.csv)               
/*                                               

Friday, May 16, 2025

Generate report for SMF type 30, subtype 4 & 5 records with ICETOOL

SMF type 30 (subtype 4) records contain useful information on the resource consumption of a particular job step. These include CPU time (total, and broken down by field), elapsed time, EXCPs (total, and broken down by device), and device connect time.
 
These SMF records provide a wealth of performance data, which is often difficult to analyse in its raw form. You need to convert this raw data into processed data that can be used for trend analysis and management reports. If you do not have access to a performance analysis and reporting product, you can use the DFSORT editing functions in combination with the reporting capabilities of ICETOOL or OUTFIL to generate performance data reports. The INCLUDE/OMIT, OUTFIL, and INREC/OUTREC control statements are helpful in selecting the specific fields of the particular SMF, RMF, or other data records to be analysed. ICETOOL or OUTFIL can then be used to generate printable reports from the resulting raw data. See z/OS DFSORT Application Programming Guide (SC26- 7523-00) for more information about ICETOOL, OUTFIL, and editing functions.
 
ICETOOL was used to select and display SMF type 30 (subtype 4) records below. 

Run this job-1 to determine what offsets to use for the next job:
 
Job 1
//* OFFSET30 JCL: RUN THIS JOB TO
//* FIND OUT WHAT SMF RECORD 30/4 OFFSETS
//* TO USE FOR THE NEXT JOB.
//* IDENTIFICATION SECTION (SMF30IOF)
//* I/O ACTIVITY SECTION   (SMF30UOF)
//* PROCESSOR SECTION      (SMF30COF)
//* STORAGE SECTION        (SMF30COF)
//* PERFORMANCE SECTION    (SMF30POF)
//*------------------------------------------
//TOOL1 EXEC PGM=ICETOOL
//DFSMSG DD SYSOUT=*
//RAWSMF DD DSN=your.smf.weekly.ds,DISP=SHR
//SMFOFF DD DSN=&&SMFOFF,DISP=(,PASS),
//          SPACE=(CYL,(50,25)),UNIT=SYSDA,
//          DCB=(RECFM=VB,LRECL=32756,BLKSIZE=0)
//SRT1CNTL DD *
 OPTION DYNALLOC,VLSHRT,STOPAFT=10,SPANINC=RC4
 INCLUDE COND=(6,1,BI,EQ,X'1E',AND,23,2,BI,EQ,X'0004')
 SORT FIELDS=(7,4,FI,A)
/*
//TOOLMSG DD SYSOUT=*
//REPORT DD SYSOUT=*
//TOOLIN DD *
 SORT FROM(RAWSMF) TO(SMFOFF) USING(SRT1)
 DISPLAY FROM(SMFOFF) LIST(REPORT)        -
 TITLE('SMF RECORD 30/4 OFFSETS DISPLAY') -
 PAGE DATE TIME BLANK                     -
* USE VALUES DISPLAYED FOR A, B, C, D, E IN THE NEXT ICETOOL JOB
 HEADER('ID. SEC. (A)')    ON(33,4,FI)    -
 HEADER('I/O SEC.(B)')     ON(41,4,FI)    -
 HEADER('PROC SEC.(C)')    ON(57,4,FI)    -
 HEADER('STORAGE SEC.(D)') ON(73,4,FI)    -
 HEADER('PERF. SEC. (E)')  ON(81,4,FI)
/*
//*
 
Output from this job looks like this:
 
SMF RECORD 30/4 OFFSETS DISPLAY        - 1 -        05/16/25        09:10:12   
                                                                               
ID. SEC. (A)   I/O SEC.(B)   PROC SEC.(C)   STORAGE SEC.(D)   PERF. SEC. (E)   
------------   -----------   ------------   ---------------   --------------   
         257           507            591               807             1063   
 
Use a=257, b=507, c=591, d=807, and e=1063 in the below ICETOOL job (Job 2) to generate step level reports from SMF 30 sub type 4.

Job 2 

//*-----------------------------------------------------------------
//* Extract type 30 smf records from a dumped smf dataset
//*-----------------------------------------------------------------
//TOOL2 EXEC PGM=ICETOOL,REGION=0M
//DFSMSG   DD SYSOUT=*
//RAWSMF   DD DSN=your.smf.weekly.ds,DISP=SHR
//SMFEXTR  DD DSN=&&ASID3Ø,DISP=(,PASS),
//            SPACE=(CYL,(50,50)),UNIT=SYSALLDA
//COPYOUT  DD DSN=&&ASID,DISP=(,PASS),
//            SPACE=(TRK,(30,30)),UNIT=SYSALLDA
//DFSPARM  DD *
 OPTION SMF=FULL
//SRT1CNTL DD *
 OPTION DYNALLOC,VLSHRT,SPANINC=RC4
*Only these records that comply to:
*SMF 30, sub type 4, id offset = 257, excp > 0
 INCLUDE COND=(6,1,BI,EQ,X'1E',AND,23,2,BI,EQ,X'0004',AND,
 33,4,BI,EQ,X'00000101',AND,                id offset = 257
 512,4,BI,GT,X'00000000')                   excp > 0
 SORT FIELDS=(11,4,PD,A,7,4,BI,A)
/*
//SRT2CNTL DD *
 OPTION COPY,VLSHRT
* Run previous icetool job (OFFSET30) to get values for a, b, c, d, e
* and substitute with the appropriate values
* SMF30LEN (RDW)  0+1=1 start of record
* SMF30TME (TIME) 6+1=7 start of record
* SMF30DTE SMF record write date: 10+1
*
* Identification Section offset (a): 257 + 1 = 258
* off len
*  0+258: 258,8 SMF30JBN - Job or session name.
*  8+258: 266,8 SMF30PGM - Program name
* 32+258: 290,8 SMF30JNM - JES job identifier.
*
* I/O Activity Section offset (b): 507 + 1 = 508
*  4+508: 512,4 SMF30TEP - EXCP count
* 18+508: 526,4 SMF30TCN - Total device connect time for this ASID.
* 32+508: 540,4 SMF30AIC - DASD I/O connect time
* 36+508: 544,4 SMF30AID - DASD I/O disconnect time
* 40+508: 548,4 SMF30AIW - DASD I/O pending + control unit queue time
*
* Processor Accounting Section offset (c): 591 + 1 = 592
*  4+592: 596,4 SMF30CPT - CPU time under the TCB
*  8+592: 600,4 SMF30CPS - CPU time under the SRB
* 44+592: 636,4 SMF30IIP - CPU time used to process I/O interrupts
* 48+592: 640,4 SMF30RCT - CPU time used by the region control task
* 52+592: 644,4 SMF30HPT - CPU time used to transfer data:HSP <-> ASID
*
* Storage and Paging Section offset (d): 807 + 1 = 808
*  4+808: 812,2 SMF30PRV - Largest stg used from bottom of priv.
*  6+808: 814,2 SMF30SYS - Largest stg used from top of priv.
*  8+808: 816,4 SMF30PGI - Paged in from AUX.
* 12+808: 820,4 SMF30PGO - Paged out to AUX
* 20+808: 828,4 SMF30NSW - # of ASID swap sequences.
* 24+808: 832,4 SMF30PSI - # of pages swapped in from AUX storage to CS.
* 28+808: 836,4 SMF30PSO - # of pages swapped out from CS to AUX.
* 32+808: 840,4 SMF30VPI - # of VIO page-ins from AUX to CS.
* 36+808: 844,4 SMF30VPO - # of VIO page-outs from CS to AUX.
* 44+808: 852,4 SMF30CPI - # of Comm area page-ins from AUX to CS.
* 48+808: 856,4 SMF30HPI - # of HSP page-ins from AUX to PROC stg.
* 52+808: 860,4 SMF30LPI - # of LPA page-ins from AUX to CS.
* 56+808: 864,4 SMF30HPO - # of HSP page-outs from PROC stg. to AUX.
* 72+808: 880,4 SMF30RGB - Private size in bytes (< 16 megabytes).
* 76+808: 884,4 SMF30ERG - Private size in bytes (> 16 megabytes).
* 80+808: 888,4 SMF30ARB - Maxvirt alloc from LSQA and the
* SWA subpools (<16M)
* 84+808: 892,4 SMF30EAR - Maxvirt alloc from LSQA and the
* SWA subpools (>16M)
* 88+808: 896,4 SMF30URB - Maxvirt alloc from the user
* subpools (< 16 M B)
* 92+808: 900,4 SMF30EUR - Maxvirt alloc from the user
* subpools (> 16 M B)
* 96+808: 904,4 SMF30RGN - Region size established
*100+808: 908,4 SMF30DSV - Amount of dsp and hsp VS used
*
* Performance Section offset (e): 1063 + 1 = 1064
*  0+1064:1064,4 SMF30SRV - Total service units.
*  4+1064:1068,4 SMF30CSU - CPU service units.
*  8+1064:1072,4 SMF30SRB - Service request block (SRB) service units.
* 12+1064:1076,4 SMF30IO - I/O service units.
* 16+1064:1080,4 SMF30MSO - Main storage occupancy (MSO) service units.
*
 OUTREC FIELDS=(1,4,       SMF30LEN
   7,4,                    SMF30TME
  11,4,                    SMF30DTE
 258,8,                    SMF30JBN
 266,8,                    SMF30PGM
 290,8,                    SMF30JNM
 512,4,                    SMF30TEP
 526,4,                    SMF30TCN
 540,4,                    SMF30AIC
 544,4,                    SMF30AID
 548,4,                    SMF30AIW
 596,4,                    SMF30CPT
 600,4,                    SMF30CPS
 636,4,                    SMF30IIP
 640,4,                    SMF30RCT
 644,4,                    SMF30HPT
 812,2,                    SMF30PRV
 814,2,                    SMF30SYS
 816,4,                    SMF30PGI
 820,4,                    SMF30PGO
 828,4,                    SMF30NSW
 832,4,                    SMF30PSI
 836,4,                    SMF30PSO
 840,4,                    SMF30VPI
 844,4,                    SMF30VPO
 852,4,                    SMF30CPI
 856,4,                    SMF30HPI
 860,4,                    SMF30LPI
 864,4,                    SMF30HPO
 880,4,                    SMF30RGB
 884,4,                    SMF30ERG
 888,4,                    SMF30ARB
 892,4,                    SMF30EAR
 896,4,                    SMF30URB
 900,4,                    SMF30EUR
 904,4,                    SMF30RGN
 908,4,                    SMF30DSV
 1064,4,                   SMF30SRV
 1068,4,                   SMF30CSU
 1072,4,                   SMF30SRB
 1076,4,                   SMF30IO
 1080,4)                   SMF30MSO
*
//TOOLMSG DD SYSOUT=*
//SERVICE DD SYSOUT=* <-- Service performance data
//CPURPT  DD SYSOUT=* <-- CPU performance data
//SUMMARY DD SYSOUT=* <-- Summary report
//STORAGE DD SYSOUT=* <-- Storage report
//DASD    DD SYSOUT=* <-- I/O report
//PAGE    DD SYSOUT=* <-- Paging report
//SWAP    DD SYSOUT=* <-- Swap report
//HSP     DD SYSOUT=* <-- Hiperspace report
//TOOLIN  DD *
 SORT FROM(RAWSMF)  TO(SMFEXTR) USING(SRT1)
 COPY FROM(SMFEXTR) TO(COPYOUT) USING(SRT2)
 
 DISPLAY FROM(COPYOUT) LIST(STORAGE)                   -
   TITLE('Storage report')                               -
   PAGE DATE TIME BLANK                                  -
   HEADER('Date')            ON(09,4,DT1,E'9999/99/99')  -
   HEADER('Time')            ON(05,4,TM1,E'99:99:99')    -
   HEADER('Jes2 #')          ON(29,8,CH)                 -
   HEADER('Job')             ON(13,8,CH)                 -
   HEADER('Pgm')             ON(21,8,CH)                 -
   HEADER('Region - kb ')    ON(149,4,FI)                -
   HEADER('Dsp Hsp mb')      ON(153,4,FI)                -
   HEADER('Bott stg KB')     ON(77,2,FI)                 -
   HEADER('Top stg KB')      ON(79,2,FI)                 -
   HEADER('p < 16 kb')       ON(125,4,FI,/KB)            -
   HEADER('p > 16 kb')       ON(129,4,FI,/KB)            -
   HEADER('VS< 16 kb')       ON(133,4,FI,/KB)            -
   HEADER('VS> 16 kb')       ON(137,4,FI,/KB)            -
   HEADER('Max VS<16 mb')    ON(141,4,FI,/KB)            -
   HEADER('Max VS>16 mb')    ON(145,4,FI,/KB)
 
 DISPLAY FROM(COPYOUT) LIST(PAGE)                      -
   TITLE('Paging report')                                -
   PAGE DATE TIME BLANK                                  -
   HEADER('Date')            ON(09,4,DT1,E'9999/99/99')  -
   HEADER('Time')            ON(05,4,TM1,E'99:99:99')    -
   HEADER('Jes2 #')          ON(29,8,CH)                 -
   HEADER('Job')             ON(13,8,CH)                 -
   HEADER('Pgm')             ON(21,8,CH)                 -
   HEADER('Page in')         ON(81,4,FI)                 -
   HEADER('Page out')        ON(85,4,FI)                 -
   HEADER('VIO page in')     ON(101,4,FI)                -
   HEADER('VIO page out')    ON(105,4,FI)                -
   HEADER('Comm page in')    ON(109,4,FI)                -
   HEADER('LPA page in')     ON(117,4,FI)                -
   HEADER('HSP page in')     ON(113,4,FI)                -
   HEADER('HSP page out')    ON(121,4,FI)
 
 DISPLAY FROM(COPYOUT) LIST(SWAP)                      -
   TITLE('Swap report')                                  -
   PAGE DATE TIME BLANK                                  -
   HEADER('Date')            ON(09,4,DT1,E'9999/99/99')  -
   HEADER('Time')            ON(05,4,TM1,E'99:99:99')    -
   HEADER('Jes2 #')          ON(29,8,CH)                 -
   HEADER('Job')             ON(13,8,CH)                 -
   HEADER('Pgm')             ON(21,8,CH)                 -
   HEADER('Swap seq.')       ON(89,4,FI)                 -
   HEADER('Swap in')         ON(93,4,FI)                 -
   HEADER('Swap out')        ON(97,4,FI)
 
 DISPLAY FROM(COPYOUT) LIST(DASD)                      -
   TITLE('I/O report')                                   -
   PAGE DATE TIME BLANK                                  -
   HEADER('Date')            ON(09,4,DT1,E'9999/99/99')  -
   HEADER('Time')            ON(05,4,TM1,E'99:99:99')    -
   HEADER('Jes2 #')          ON(29,8,CH)                 -
   HEADER('Job')             ON(13,8,CH)                 -
   HEADER('Pgm')             ON(21,8,CH)                 -
   HEADER('Excp')            ON(37,4,FI)                 -
   HEADER('Tot.conn')        ON(41,4,FI)                 -
   HEADER('Dasd conn')       ON(45,4,FI)                 -
   HEADER('Dasd disconn')    ON(49,4,FI)                 -
   HEADER('Dasd pend.')      ON(53,4,FI)
 
 DISPLAY FROM(COPYOUT) LIST(CPURPT)                    -
   TITLE('CPU performance data')                         -
   PAGE DATE TIME BLANK                                  -
   HEADER('Date')            ON(09,4,DT1,E'9999/99/99')  -
   HEADER('Time')            ON(05,4,TM1,E'99:99:99')    -
   HEADER('Jes2 #')          ON(29,8,CH)                 -
   HEADER('Job')             ON(13,8,CH)                 -
   HEADER('Pgm')             ON(21,8,CH)                 -
   HEADER('Excp')            ON(37,4,FI)                 -
   HEADER('tcb')             ON(57,4,FI,F1)              -
   HEADER('srb')             ON(61,4,FI,F1)              -
   HEADER('iip')             ON(65,4,FI,F1)              -
   HEADER('rct')             ON(69,4,FI,F1)              -
   HEADER('hpt')             ON(73,4,FI,F1)
 
 DISPLAY FROM(COPYOUT) LIST(SERVICE)                   -
   TITLE('Service performance data')                     -
   PAGE DATE TIME BLANK                                  -
   HEADER('Date')            ON(09,4,DT1,E'9999/99/99')  -
   HEADER('Time')            ON(05,4,TM1,E'99:99:99')    -
   HEADER('Jes2 #')          ON(29,8,CH)                 -
   HEADER('Job')             ON(13,8,CH)                 -
   HEADER('Pgm')             ON(21,8,CH)                 -
   HEADER('Total su')        ON(157,4,FI)                -
   HEADER('Tcb su')          ON(161,4,FI)                -
   HEADER('Srb su')          ON(165,4,FI)                -
   HEADER('Io su')           ON(169,4,FI)                -
   HEADER('MSO su')          ON(173,4,FI)
 
 DISPLAY FROM(COPYOUT) LIST(SUMMARY)                   -
   TITLE('Summary report')                               -
   PAGE DATE TIME BLANK                                  -
   HEADER('Date')            ON(09,4,DT1,E'9999/99/99')  -
   HEADER('Time')            ON(05,4,TM1,E'99:99:99')    -
   HEADER('Jes2 #')          ON(29,8,CH)                 -
   HEADER('Job')             ON(13,8,CH)                 -
   HEADER('Pgm')             ON(21,8,CH)                 -
   HEADER('Excp')            ON(37,4,FI)                 -
   HEADER('Conn.')           ON(41,4,FI)                 -
   HEADER('tcb')             ON(57,4,FI,F1)              -
   HEADER('srb')             ON(61,4,FI,F1)              -
   HEADER('Serv')            ON(157,4,FI)                -
   HEADER('Region - kb ')    ON(149,4,FI)                -
   HEADER('Dsp Hsp mb')      ON(153,4,FI)
 
 DISPLAY FROM(COPYOUT) LIST(HSP)                       -
   TITLE('Hiperspace report')                            -
   PAGE DATE TIME BLANK                                  -
   HEADER('Date')            ON(09,4,DT1,E'9999/99/99')  -
   HEADER('Time')            ON(05,4,TM1,E'99:99:99')    -
   HEADER('Jes2 #')          ON(29,8,CH)                 -
   HEADER('Job')             ON(13,8,CH)                 -
   HEADER('Pgm')             ON(21,8,CH)                 -
   HEADER('Dsp Hsp mb')      ON(153,4,FI)                -
   HEADER('hpt')             ON(73,4,FI,F1)              -
   HEADER('HSP page in')     ON(113,4,FI)                -
   HEADER('HSP page out')    ON(121,4,FI)
/*

The above job can be run to get job level information by simply changing the subtype 
X'0004' in the below INCLUDE condition to X'0005' 
 
INCLUDE COND=(6,1,BI,EQ,X'1E',AND,23,2,BI,EQ,X'0004',AND,

This article is copied from https://www.cbttape.org/xephon/xephonm/mvs0507.pdf and some minor modifications are made.