Db2 for z/OS & Db2ZAI

Db2 for z/OS and its ecosystem

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only

REXX Execs for IFCID 225 Storage Statistics – Db2 for z/OS 

Thu August 27, 2020 03:10 PM

Update for Db2 13 for z/OS

The Db2 for z/OS SWAT previously maintained the attached sample REXX Execs for IFCID 225 storage statistics because of a historical lack of necessary fields in SMF 100 data. However, the SWAT team has also been working to ensure the inclusion of all necessary fields in the SMF 100 data. This effort is complete, and OMEGAMON for Db2 Performance Expert on z/OS and other vendor tools can now create comma delimited files for input of the IFCID 225 to a spreadsheet.  Therefore, these sample REXX execs will not be updated for Db2 13 or later.

The attached sample REXX execs work with the following Db2 for z/OS versions:

  • Db2 12 for z/OS
  • Db2 11 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)         
//*

 


#Db2forz/OS

Statistics
0 Favorited
82 Views
1 Files
0 Shares
27 Downloads
Attachment(s)
zip file
OS   36 KB   1 version
Uploaded - Thu August 27, 2020

Comments

Tue September 19, 2023 09:10 AM

Hi Paul, 

I configured the code you've shared as a address space, it causes more cpu consumption. Is this something you aware of? 

Regards, Sercan

Tue June 20, 2023 09:24 AM

Hello Paul, would you have this REXX also for Db2 V13 ? 
Kind regards, Claudia Pelster