JCLNeat : LISTDSI in CAZ1NREX Rexx
search cancel

JCLNeat : LISTDSI in CAZ1NREX Rexx

book

Article ID: 212531

calendar_today

Updated On:

Products

JCLCheck Workload Automation

Issue/Introduction

Sometimes it is necessary to use the IBM LISTDSI (list data set information) function to verify if a specific dataset or pds member exists and this needs to be checked into the JCLNeat CAZ1NREX Rexx during batch execution.

Considering that the LISTDSI function can be used only in REXX execs that run in the TSO/E address space, how to set it in a batch JCLNeat execution?

Environment

Release : All

Component : CA JCLCheck workload Automation

Resolution

This can be obtained with the following steps:

1-  in the CAZ1NREX Rexx used during the JCLNeat batch execution, it will be necessary to code the LISTDSI intructions. Here a sample code: 

...

EXEC_PROCESSING:                
Trace I                         
say 'exec process'              
dsno = 'dsname-to-be-checked
dsnoinfo = LISTDSI("'"dsno"'")  
dsnodsname = SYSDSNAME          
dsnodsorg  = SYSDSORG           
dsnorecfm  = SYSRECFM           
dsnolrecl  = SYSLRECL           
trace off                       

...

the above code can be added in any of the Rexx PROCESSING Sections.

2- Execute the JCLNeat function as batch run using a jcl looking like the following: 

//[email protected]  EXEC PGM=IKJEFT01                                        
//SYSTSPRT DD SYSOUT=*                                              
//SYSOUT   DD SYSOUT=*                                              
//SYSTSIN  DD   *                                                   
 CALL '....JCK120....CAZ2LOAD(CAZ1NEAT)'                   
//*                                                                 
//JCLNOPTS DD *                                                     
INLIB=PDS            
BCS=N                                                               
BCI=N                                                               
CDEL=0                                                              
CEC=50                                                              
CSC=12                                                              
DCBS=N                                                              
FCC=-                                                               
FORMAT=Y                                                            
JOBF=Y                                                              
ICSC=52                                                             
INCR=10                                                             
LINES=55                                                            
MEMBERS=INCLUDE                                                     
MKW=60                                                              
MQKW=10                                                             
OPSC=12                                                             
PACK=5                                                                                                                          
RECOVER=Y                                                         
REXXMEM=CAZ1NREX                                               
REPORT=7                                                          
RSYM=N                                                            
SECC=*                                                            
SEQ1=10                                                           
SIM=N                                                             
OUTLIB=PDS                                                             
//STEPLIB  DD DSN=hlq...JCK120...CAZ2LOAD,DISP=SHR        
//SYSPRINT DD SYSOUT=*                                            
//SYSUDUMP DD SYSOUT=*                                            
//SYSTSPRT  DD  SYSOUT=*                                          
//SYSTERM   DD  SYSOUT=*                                          
//SYSEXEC  DD DISP=SHR,DSN=hlq...JCLCHK....sysexec                   
//SYSUT1   DD UNIT=SYSDA,                                         
//            SPACE=(CYL,(3,1),RLSE)                              
//SYSUT2   DD UNIT=SYSDA,                                         
//            SPACE=(CYL,(3,1),RLSE)                              
//*                                                                                                                            
//PDSIN    DD DISP=SHR,DSN=hlq....JCLCHK.input.pds                   
//PDSOUT   DD DISP=SHR,DSN=hlq....JCLCHK.output.pds               
//MEMBERS  DD *                                                   
membername                                                      
//****

So the program JCLNeat is called and executed under IKJEFT01, that is the TSO/E Environment.