REXX EXEC to determine the available storage in a TSO Region
search cancel

REXX EXEC to determine the available storage in a TSO Region

book

Article ID: 49090

calendar_today

Updated On:

Products

RC Compare for DB2 for z/OS Bind Analyzer for DB2 for z/OS SQL-Ease for DB2 for z/OS SYSVIEW Performance Management Option for DB2 for z/OS Plan Analyzer for DB2 for z/OS Subsystem Analyzer for DB2 for z/OS Database Analyzer for DB2 for z/OS Fast Unload for DB2 for z/OS Fast Check for DB2 for z/OS Fast Index for DB2 for z/OS 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.

 

Environment

Release:
Component: GEN

Resolution

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'  

SAY ''
LDALIMIT = C2D(STORAGE(D2X(LDA + 232),4))
LDALIMIT = FORMAT(LDALIMIT/(1024*1024),9,2)
SAY 'ALLOCATED BELOW:' LDALIMIT'M'

LDALIMIT = C2D(STORAGE(D2X(LDA + 240),4))
LDAIMIT = FORMAT(LDALIMIT/(1024*1024),9,2)
SAY 'ALLOCATED ABOVE:' LDALIMIT'M' Exit 0 Execute the REXX exec: TSO EX 'highlvl.EXEC(VSTORUSE)' Output example: BELOW LIMIT:         7.48M
ABOVE LIMIT:       256.00M
 
ALLOCATED BELOW:         0.48M
ALLOCATED ABOVE: 1994752M
 *** ================================

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.