REXX – READ THE DSN PROVIDED AS DD IN JCL

When you execute your REXX EXEC in batch mode, suppose you want to use the file already created in the EXEC by passing it using the JCL (Not through Arguments, but by DD DSN), you can make use of below JCL.

//STEP02 EXEC PGM=IKJEFT01,PARM=(‘%READFL2’)
//SYSPROC DD DSN=YOUR.REXX.EXEC,DISP=SHR
//DD1 DD DSN=YOUR.INPUT.FILE,DISP=SHR
//SYSTSPRT DD SYSOUT=A
//SYSTSIN DD DUMMY

Here READFL2 is your EXEC which will read the dataset YOUR.INPUT.FILE using the DD name provided DD1.
Below I have provided the code for the EXEC READFL2. This EXEC reads the file and displays all the lines in the FILE.

/** REXX **/
“EXECIO * DISKR DD1(STEM AR. FINIS”
DO I = 1 TO AR.0
SAY AR.I
END
EXIT

Important SQL CODES and ABEND CODES
SORT JOIN – TO JOIN TWO FILES BASED ON A KEY
KNOW YOUR MAINFRAME
REXX – INITIAL SETUP
EASYTRIEVE – A023 ABEND
EASYTRIEVE – SORT and FILE COMPARISION
EASYTRIEVE – Special-name Report Procedures
EASYTRIEVE – REPORT STAEMENT
EASYTRIEVE – Sample Program – Table And Search
EASYTRIEVE – Sample Program – Display Totals and Summary
EASYTRIEVE – Sample Program – Display Employee Data
CA-Easytrieve/Plus – Basics
REXX TOOL # 02 – FSAVE – Save member opened in VIEW mode
REXX TOOL # 01 – O – Open Any Mainframe Element from any ISPF Screen
REXX – INDEX, POS, SUBSTR, COMPARE
REXX – READ THE DSN PROVIDED AS DD IN JCL
REXX – SEND MULTIPLE ARGUMENTS THROUGH JCL
REXX – HOW TO COMPILE YOUR REXX EXEC
REXX – CHANGE UPPER TO LOWER CASE
REXX – GET LAST 4 DAYS FROM GIVEN DATE
REXX – PANEL Definition
REXX – READ, CREATE AND WRITE DATA TO A DATASET
REXX TOOL TO SUBSTITUTE SYMBOLICS IN A PROC
Advertisements