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
——————————————————————————————————–
In United States, If you would like to Earn Free Stocks, Credit card Points and Bank account Bonuses, Please visit My Finance Blog
——————————————————————————————————–
You may also like to look at:
Working on Mainframes – Is Change to a different technology necessary |