Db2 for z/OS - The AI Database

nested-group-icon.png

DB2

REXX Execs for IFCID225 Storage Statistics – Db2 for z/OS 

Thu August 27, 2020 03:10 PM

Works with versions:

Db2 11 for z/OS, Db2 12 for z/OS, Db2 10 for z/OS, 

Installation

  1. Upload (text format) the following components to your z/OS system:

MEMUZV12 – Provides READS capability for one shot at the IFCID225 information and displays it on the TSO screen.

MEMU2V12 – REXX exec invoked from a batch job that outputs IFCID225 data to a data set in comma delimited format at default of 5 minute intervals.

MEMU2JCL – Sample JCL to allocate the output data set and invoke MEMU2V12

  1. Copy them all in a PDS of your choice for later modifications
  2. Edit the REXX execs and change ISPEXEC to match your SDSNLOAD

Invoking MEMUZV12

Syntax:

MEMUZV12  ssid [display]

ssid – DB2 subsystem ID

display – What you want to display. Acceptable values: ALL (default), REAL, SERVICE

            ALL – All fields except those marked as service only (default)

            REAL – Only the fields related to real storage usage

            SERVICE – All fields including those marked as service only

 

You can invoke MEMUZV12 from the TSO Option 6 ISPF panel and the output will display immediately on the terminal session screen.

Example:

EXEC ‘IBMUSER.MEMU2.CNTL(MEMUZV12)’ ‘DBX1’

Invoking MEMU2V12 as batch job

Important: Make sure the MEMU2 batch job runs with a high WLM dispatching priority otherwise system may stall on latch

Syntax:

MEMU2V12  ssid [numtimes [sleeptime]]

ssid – Db2 subsystem ID

numtimes – Number of times you want the exec to produce the statistics. Default is 60.

sleeptime – Interval between two statistics. Default is 60 seconds (1 minute).

The following sample JCL can be used to invoke the REXX exec MEMU2V12:

//DELDS EXEC PGM=IEFBR14 
//OUTP DD DISP=(MOD,DELETE,DELETE),
// DSN=IBMUSER.MEMU2.CSV (1)
//MEMU2 EXEC PGM=IKJEFT01,DYNAMNBR=25,ACCT=SHORT,
// REGION=4096K
//STEPLIB DD DSN=DB2.V12.SDSNLOAD,DISP=SHR (2)
//SYSEXEC DD DSN=IBMUSER.MEMU2.CNTL,DISP=SHR (3)
//OUTP DD DISP=(,CATLG,CATLG),
// DSN=IBMUSER.MEMU2.CSV, (4)
// DCB=(RECFM=VB,LRECL=8192,BLKSIZE=0),
// SPACE=(TRK,(5,1),RLSE),UNIT=SYSDA
//SYSUDUMP DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSTSIN DD *
MEMU2V12 DBX1 288 300 (5)
/*

 

Notes:

  1. Change to match the name of your output data set. The first time you ever run this job, comment out step DELDS as the data set does not exist.
  2. Change to match your SDSNLOAD library
  3. Change to match the name of the PDS where MEMU2V12 REXX exec resides.
  4. Change to match the name of your output data set. If you are using a JCL from a previous version of MEMU2, make sure you increase the LRECL value.
  5. Invoke through SYSTSIN the REXX exec MEMU2V12 with your DB2 SSID and the number of times you want the exec to produce the statistics.
  6. Add a suitable job card for your environment.

When the job is finished:

  1. Download the output data set to your hard drive.
  2. Bring up Excel and open the .csv file you just downloaded. 

Once it is in the spreadsheet you can use it any way you want.

Additional files

The MEMU2 V12 packages contains 3 additional files:

CSVSTO10

CSVSTO11

CSVSTO12

 

These are field lists to produce MEMU2-like .csv files with OMEGAMON XE for DB2 Performance Monitor on z/OS. For more information on the Spreadsheet Input-Data Generator utility, see Generating input data for spreadsheets.

The following sample JCL can be used to invoke the OMPE Spreadsheet Input-Data Generator:

 

//JOBLIB  DD  DISP=SHR,DSN=<DB2OMPE>.TKANMOD                     
//*
//STATFIL  EXEC PGM=FPECMAIN                                     
//INPUTDD  DD DISP=SHR,DSN=<USER_HLQ>.SMF100                    
//SYSPRINT DD SYSOUT=*                                          
//SYSOUT   DD SYSOUT=*                                          
//JOBSUMDD DD SYSOUT=*                                          
//STFILDD  DD DISP=(NEW,PASS),UNIT=SYSDA,SPACE=(CYL,(200,100))  
//SYSIN DD *                                                    
 GLOBAL                                                         
    INCLUDE (SUBSYSTEMID(DB2A))                                 
 STATISTICS                                                     
    FILE DDNAME(STFILDD)                                        
EXEC                                                             
/*                                                              
//FPEPCSVP EXEC PGM=FPEPCSV,                                    
//         PARM='SSTG Y Y N , . <DB2OMPE>.TKO2SAMP'             
//SYSPRINT DD  SYSOUT=*                                          
//FLDSEL   DD  DISP=SHR,DSN=<USER_HLQ>.FPECSVU(CSVSTO12)        
//INPUT    DD  DISP=(OLD,DELETE),DSN=*.STATFIL.STFILDD          
//OUTPUT   DD  DSN=<USER_HLQ>.MEMU2.CSV,                        
//             DISP=(NEW,CATLG,DELETE),                          
//             UNIT=SYSDA,SPACE=(CYL,(200,100),RLSE),           
//             DCB=(RECFM=VB,LRECL=32756,BLKSIZE=32760)         
//*

 

Statistics

0 Favorited
12 Views
1 Files
0 Shares
6 Downloads
Attachment(s)
zip file
REXX Execs for IFCID225 Storage Statistics – Db2 for z/OS   36K   1 version
Uploaded - Thu August 27, 2020