EasyManua.ls Logo

IBM TSO/E REXX - Appendix A. Allocating Data Sets

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 5 (continued)
/****************************************************************/
/* Since the outdd file is already open at this point, the */
/* following "EXECIO 0 DISKW ..." command will close the file, */
/* but will not empty it of the lines that have already been */
/* written. The data set allocated to outdd will contain out_ctr*/
/* lines. */
/****************************************************************/
"EXECIO 0 DISKW outdd (FINIS" /* Closes the open file, outdd */
SAY 'File outdd now contains ' out_ctr' lines.'
END
ELSE /* Else no new lines have been */
/* written to file outdd */
DO /* Erase any old records from the file*/
/****************************************************************/
/* Since the outdd file is still closed at this point, the */
/* following "EXECIO 0 DISKW ..." command will open the file, */
/* write 0 records, and then close it. This will effectively */
/* empty the data set allocated to outdd. Any old records that */
/* were in this data set when this exec started will now be */
/* deleted. */
/****************************************************************/
"EXECIO 0 DISKW outdd (OPEN FINIS" /*Empty the outdd file */
SAY 'File outdd is now empty.'
END
"FREE FI(indd)"
"FREE FI(outdd)"
EXIT
Figure 6. EXECIO Example 5 (continued)
Using EXECIO to Process Information ...
Chapter 12. Processing Data and Input/Output Processing 167

Table of Contents

Related product manuals