Copying Information To And From A List Of Compound Variables - IBM TSO/E REXX User Manual

Table of Contents

Advertisement

Appending 5 Lines of Data to an Existing Data Set
"ALLOC DA(weekly.input(mar28)) F(myindd) SHR REUSE"
"ALLOC DA(yearly.output) F(myoutdd) MOD"
"EXECIO 5 DISKR myindd (FINIS"
"EXECIO 5 DISKW myoutdd (FINIS"
Note: Do not use the MOD attribute when allocating a member of a PDS to which
you want to append information. You can use MOD only when appending
information to a sequential data set. To append information to a member of a
PDS, rewrite the member with the additional records added.

Copying Information to and from a List of Compound Variables

When copying information from a data set, you can store the information in the data
stack, which is the default, or you can store the information in a list of compound
variables. Similarly, when copying information back to a data set, you can remove
information from the data stack, which is the default, or you can remove the
information from a list of compound variables.
Copying Information from a Data Set to a List of Compound Variables: To
copy an entire data set into compound variables with the stem newvar., and then
display the list, write the following instructions.
Copying an Entire Data Set into Compound Variables
"ALLOC DA(old.data) F(indd) SHR REUSE"
"EXECIO * DISKR indd (STEM newvar."
DO i = 1 to newvar.0
SAY newvar.i
END
When you want to copy a varying number of lines to compound variables, you can
use a variable within the EXECIO command as long as the variable is not within
quotation marks. For example, the variable lines can represent the number of lines
indicated when the exec is run.
Copying a Varying Number of Lines into Compound Variables
ARG lines
"ALLOC DA(old.data) F(indd) SHR REUSE"
"EXECIO" lines "DISKR indd (STEM newvar."
Copying Information from Compound Variables to a Data Set: To copy 10
compound variables with the stem newvar., regardless of how many items are in
the list, write the following instructions.
Note: An uninitialized compound variable will default to the value of its name. For
example, if newvar.9 and newvar.10 do not contain values, the data set will
receive the values NEWVAR.9 and NEWVAR.10.
Using EXECIO to Process Information ...
Chapter 12. Processing Data and Input/Output Processing
161

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents