REXX EXEC TO DETERMINE THE AVAILABLE STORAGE IN A TSO REGION

book

Article ID: 49090

calendar_today

Updated On:

Products

CA RC Compare for DB2 for z/OS CA Bind Analyzer for DB2 for z/OS CA SQL-Ease for DB2 for z/OS CA Sysview Performance Management Option for DB2 for z/OS CA Plan Analyzer for DB2 for z/OS CA Subsystem Analyzer for DB2 for z/OS CA Database Analyzer for DB2 for z/OS CA Fast Unload for DB2 for z/OS CA Fast Check for DB2 for z/OS CA Fast Index for DB2 for z/OS CA Fast Load for DB2 for z/OS CA Rapid Reorg for DB2 for z/OS

Issue/Introduction

Description:

This REXX Exec can be used to help determine the available storage based on TSO region size. This may be useful when an insufficient storage message is issued by one of the DB2 tools.

Solution:

Please place this in an EXEC library:

/* REXX                         */                                      
                                                                      
Numeric digits 10                                                       
                                                                      
ascb     = C2d(Storage(224,4))                                          
ascb     = C2d(Storage(224,4))                                          
ascb     = C2d(Storage(224,4))                                          
lda = C2d(Storage(D2x(ascb + 48),4))                                    
ldalimit = C2d(storage(D2x(lda + 208),4))                               
ldalimit = format(ldaLimit/(1024*1024),9,2)                             
ldaelim  = C2d(storage(D2x(lda + 216),4))                               
ldaelim  = format(ldaElim/(1024*1024),9,2)                              
                                                                      
Say ''                                                                  
say 'Below limit:' ldaLimit'M'                                          
Say 'Above limit:' ldaElim'M'                                           
                                                                      
Exit 0
 
Execute the REXX exec:
TSO EX 'highlvl.EXEC(VSTORUSE)'
 
Output example:
Below limit:         6.06M
Above limit:       192.00M
================================

JCL to execute the REXX EXEC in Batch, different region sizes can be supplied for J2 and J3:

//Jobcard
//TEST PROC                                                             
//S1  EXEC PGM=IRXJCL,PARM='VSTORUSE'                                   
//SYSTSIN  DD DUMMY                                                     
//SYSTSPRT DD SYSOUT=*                                                  
//SYSEXEC  DD DSN=hilvl.EXEC,DISP=SHR                          
// PEND                                                                 
//J1 EXEC TEST                                                          
//J2 EXEC TEST,REGION.S1=0M                                             
//J3 EXEC TEST,REGION.S1=400K                                           
//
 J1 will use the default region size.
 
Output Example:
Below limit:         7.98M
Above limit:      1111.00M
 
Below limit:         7.98M
Above limit:      1111.00M
 
Below limit:         7.98M
Above limit:      1111.00M

Note: If there is an IEFUSI exit in place this may determine the region limit. Also the above source may need to be adjusted depending on the z/OS version.

Environment

Release:
Component: GEN