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 #182 background imageLoading...
Page #182 background image
EXECIO Example 1
/***************************** REXX ********************************/
/* This exec reads from the data set allocated to INDD to find the */
/* first occurrence of the string "Jones". Upper and lowercase */
/* distinctions are ignored. */
/*******************************************************************/
done = 'no'
lineno = 0
DO WHILE done = 'no'
"EXECIO 1 DISKR indd"
IF RC = 0 THEN /* Record was read */
DO
PULL record
lineno = lineno + 1 /* Count the record */
IF INDEX(record,'JONES') \= 0 THEN
DO
SAY 'Found in record' lineno
done = 'yes'
SAY 'Record = ' record
END
ELSE NOP
END
ELSE
done = 'yes'
END
EXIT 0
Figure 1. EXECIO Example 1
EXECIO Example 2
/***************************** REXX ********************************/
/* This exec copies records from data set 'my.input' to the end of */
/* data set 'my.output'. Neither data set has been allocated to a */
/* ddname. It assumes that the input data set has no null lines. */
/*******************************************************************/
"ALLOC DA('my.input') F(indd) SHR REUSE"
"ALLOC DA('my.output') F(outdd) MOD REUSE"
SAY 'Copying ...'
"EXECIO * DISKR indd (FINIS"
QUEUE '' /* Insert a null line at the end to indicate end of file */
"EXECIO * DISKW outdd (FINIS"
SAY 'Copy complete.'
"FREE F(indd outdd)"
EXIT 0
Figure 2. EXECIO Example 2
Using EXECIO to Process Information ...
164
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