EasyManua.ls Logo

IBM TSO/E REXX - EXECIO Example 6; EXECIO Example 6 (Continued)

IBM TSO/E REXX
242 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
EXECIO Example 6 (continued)
SAY
SAY
SAY "-----------------------------------------------------"
SAY newvar.0 "records have been read from 'sample2.data': "
SAY
DOi=1TOnewvar.0 /* Loop through all records */
SAY newvar.i /* Display the ith record */
END
"EXECIO" newvar.0 "DISKW myoutdd (STEM newvar." /* Write
exactly the number of records read */
IF rc = 0 THEN /* If write was successful */
DO
SAY
SAY newvar.0 "records were written to 'all.sample.data'"
END
ELSE
DO
exec_RC = RC /* Save exec return code */
SAY
SAY "Error during 2nd EXECIO ...DISKW, return code is " RC
SAY
END
END
ELSE
DO
exec_RC = RC /* Save exec return code */
SAY
SAY "Error during 2nd EXECIO ... DISKR, return code is " RC
SAY
END
END
"EXECIO 0 DISKW myoutdd (FINIS" /* Close output file */
"FREE FI(myindd1)"
"FREE FI(myindd2)"
"FREE FI(myoutdd)"
EXIT 0
Figure 9. EXECIO Example 6 (continued)
Using EXECIO to Process Information ...
170
z/OS V1R1.0 TSO/E REXX Users Guide

Table of Contents