EasyManuals Logo
Home>IBM>Computer Hardware>TSO/E REXX

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 #183 background imageLoading...
Page #183 background image
EXECIO Example 3
/**************************** REXX *********************************/
/* This exec reads five records from the data set allocated to */
/* MYINDD starting with the third record. It strips trailing blanks*/
/* from the records, and then writes any record that is longer than*/
/* 20 characters. The file is not closed when the exec is finished.*/
/*******************************************************************/
"EXECIO 5 DISKR myindd 3"
DOi=1to5
PARSE PULL line
stripline = STRIP(line,t)
len = LENGTH(stripline)
IF len > 20 THEN
SAY 'Line' stripline 'is long.'
ELSE NOP
END
/* The file is still open for processing */
EXIT 0
Figure 3. EXECIO Example 3
EXECIO Example 4
/**************************** REXX *********************************/
/* This exec reads first 100 records (or until EOF) of the data */
/* set allocated to INVNTORY. Records are placed on data stack */
/* in LIFO order. If fewer than 100 records are read, a message is */
/* issued. */
/*******************************************************************/
eofflag = 2 /* Return code to indicate end of file */
"EXECIO 100 DISKR invntory (LIFO"
return_code = RC
IF return_code = eofflag THEN
SAY 'Premature end of file.'
ELSE
SAY '100 Records read.'
EXIT return_code
Figure 4. EXECIO Example 4
Using EXECIO to Process Information ...
Chapter 12. Processing Data and Input/Output Processing 165

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