EasyManuals Logo

IBM TSO/E REXX User Manual

IBM TSO/E REXX
242 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #186 background image
EXECIO Example 6
/***************************** REXX ********************************/
/* This exec uses EXECIO to successively append the records from */
/* 'sample1.data' and then from 'sample2.data' to the end of the */
/* data set 'all.sample.data'. It illustrates the effect of */
/* residual data in STEM variables. Data set 'sample1.data' */
/* contains 20 records. Data set 'sample2.data' contains 10 */
/* records. */
/*******************************************************************/
"ALLOC FI(myindd1) DA('sample1.data') SHR REUSE" /* input file 1 */
"ALLOC FI(myindd2) DA('sample2.data') SHR REUSE" /* input file 2 */
"ALLOC FI(myoutdd) DA('all.sample.data') MOD REUSE" /* output append
file */
/*******************************************************************/
/* Read all records from 'sample1.data' and append them to the */
/* end of 'all.sample.data'. */
/*******************************************************************/
exec_RC = 0 /* Initialize exec return code */
"EXECIO * DISKR myindd1 (STEM newvar. FINIS" /* Read all records */
IF rc = 0 THEN /* If read was successful */
DO
/*****************************************************************/
/* At this point, newvar.0 should be 20, indicating 20 records */
/* have been read. Stem variables newvar.1, newvar.2, ... through*/
/* newvar.20 will contain the 20 records that were read. */
/*****************************************************************/
SAY "-----------------------------------------------------"
SAY newvar.0 "records have been read from 'sample1.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 */
Figure 7. EXECIO Example 6
Using EXECIO to Process Information ...
168
z/OS V1R1.0 TSO/E REXX User’s Guide

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM TSO/E REXX and is the answer not in the manual?

IBM TSO/E REXX Specifications

General IconGeneral
BrandIBM
ModelTSO/E REXX
CategoryComputer Hardware
LanguageEnglish

Related product manuals