Using Execio To Process Information To And From Data Sets; When To Use The Execio Command; Using The Execio Command - IBM TSO/E REXX User Manual

Table of Contents

Advertisement

Dynamic Modification of a Single REXX Expression
answer = 5 + 5
INTERPRET 'say' answer '"= 5 + 5"'
You can also group a number of instructions within a string, assign the string to a
variable, and use the INTERPRET instruction to execute the instructions assigned
to the variable.
action = 'DO 3; SAY "Hello!"; END'
INTERPRET action
Because the INTERPRET instruction causes dynamic modification, use it very
carefully. For more information about the INTERPRET instruction, see z/OS TSO/E
REXX Reference.

Using EXECIO to Process Information to and from Data Sets

An exec uses the EXECIO command to perform the input and output (I/O) of
information to and from a data set. The information can be stored in the data stack
for serialized processing or in a list of variables for random processing.

When to Use the EXECIO Command

The various operands and combination of operands of the EXECIO command
permit you to do many types of I/O. For example, you can use the EXECIO
command to:
v Read information from a data set
v Write information to a data set
v Open a data set without reading or writing any records
v Empty a data set
v Copy information from one data set to another
v Copy information to and from a list of compound variables
v Add information to the end of a sequential data set
v Update information in a data set one line at a time

Using the EXECIO Command

EXECIO reads information from a data set with either the DISKR or DISKRU
operands. Using these operands, you can also open a data set without reading its
records. Refer to Reading Information from a Data Set for more information about
the DISKR and DISKRU operands. EXECIO writes information to a data set with
the DISKW operand. Using this operand, you can also open a data set without
writing records or empty an existing data set. Refer to "Writing Information to a Data
Set" on page 157 for more information on the DISKW operand.
Before an exec can use the EXECIO command to read from or write to a data set,
the data set must meet the following requirements. An I/O data set must be:
v Either sequential or a single member of a PDS.
v Previously allocated with the appropriate attributes for its specific purpose. Some
If you use EXECIO to read information from a data set and to the data stack, the
information can be stored in FIFO or LIFO order on the data stack. FIFO is the
154
z/OS V1R1.0 TSO/E REXX User's Guide
examples of the various uses of EXECIO and the type of data set allocation
appropriate for these uses are shown in and after "Copying Information From
One Data Set to Another" on page 159.
/* displays 10 = 5 + 5 */
/* results in:
Hello!
Hello!
Hello!
*/

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents