The IBM LISTDSI (list data set information) function may be called from a REXX exec that runs in a TSO/E address space to verify if a data set exists, and to return the data set's attributes.
How to use the LISTDSI function in a JCLNeat REXX exec during batch execution?
Release : All
Component : JCLCheck Workload Automation
Call the JCLNeat program (CAZ1NEAT) using IKJEFT01. Example:
//$$$$$$@ EXEC PGM=IKJEFT01
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSTSIN DD *
CALL 'hlq.jclcheck.CAZ2LOAD(CAZ1NEAT)'
//SYSUT1 DD SPACE=(CYL,(10,1),RLSE),UNIT=SYSDA
//SYSUT2 DD SPACE=(CYL,(10,1),RLSE),UNIT=SYSDA
//SYSEXEC DD DISP=SHR,DSN=hlq.rexx.lib
//PDSIN DD DISP=SHR,DSN=hlq.input.jcllib
//SEQOUT DD DISP=(,CATLG,DELETE),DSN=hlq.output.jclneat,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920),UNIT=SYSDA,
// SPACE=(TRK,15)
//JCLNOPTS DD *
INLIB=PDS
MEMBERS=INCLUDE
REXXMEM=CAZ1NREX
OUTLIB=SEQ
//MEMBERS DD *
membername
/*
Sample use of the LISTDSI function:
EXEC_PROCESSING:
Trace I
say 'exec processing routine'
dsno = 'dsname-to-be-checked'
dsnoinfo = LISTDSI("'"dsno"'")
dsnodsname = SYSDSNAME
dsnodsorg = SYSDSORG
dsnorecfm = SYSRECFM
dsnolrecl = SYSLRECL
trace off