When you specify *, the EXECIO command will continue to pull items off the data
stack until it finds a null line. If the stack becomes empty before a null line is found,
EXECIO will prompt the terminal for input until the user enters a null line. Thus
when you do not want to have terminal I/O, queue a null line at the bottom of the
stack to indicate the end of the information.
QUEUE '
If there are null lines (lines of length 0) throughout the data and the data stack is
not shared, you can assign the built-in QUEUED() function to a variable to indicate
the number of items on the stack.
n = QUEUED()
"EXECIO" n "DISKW outdd (FINIS"
How to access the data set:
An I/O data set must first be allocated to a ddname.
The ddname does not need to exist previously. In fact, it might be better to allocate
to a new ddname, such as MYOUTDD, in order not to interfere with previously
established allocations. You can allocate from within the exec with the ALLOCATE
command as shown in the following example, or you can allocate before the exec
runs.
"ALLOC DA(out.data) F(
myoutdd
) OLD REUSE"
"EXECIO * DISKW
myoutdd
..."
Options for DISKW:
Options you can use are:
v
OPEN - To open a data set. When you specify OPEN with EXECIO 0, it opens
the data set and positions the file position pointer before the first record.
"EXECIO 0 DISKW myoutdd
(OPEN
"
Note:
If the data set is already open, no operation is performed for OPEN.
v
FINIS - To close the data set after writing to it. Closing the data set allows other
execs to access it and its ddname. When you specify FINIS, it forces the
completion of all I/O operations by physically writing the contents of any partially
filled I/O buffers to the data set.
"EXECIO * DISKW myoutdd
(FINIS
"
v
STEM - To write the information from compound variables or a list of variables
beginning with the name specified after the STEM keyword. The variables,
instead of the data stack, holds the information to be written.
"EXECIO * DISKW myoutdd
(STEM newvar.
"
In this example, the variables would have the stem
newvar.
and lines of
information from the compound variables would go to the data set. Each variable
is labeled
newvar.1
,
newvar.2
,
newvar.3
, and so forth.
The variable
newvar.0
is not used when writing from compound variables. When
* is specified with a stem, the EXECIO command stops writing information to the
data set when it finds a null value or an uninitialized compound variable. In this
case, if the list contained 10 compound variables, the EXECIO command stops
at
newvar.11
.
The EXECIO command can also specify the number of lines to write from a list
of compound variables.
"EXECIO
5
DISKW myoutdd
(STEM newvar.
"
In this example, the EXECIO command writes 5 items from the
newvar
variables
including uninitialized compound variables, if any.
Using EXECIO to Process Information ...
158
z/OS V1R1.0 TSO/E REXX User’s Guide
Содержание TSO/E REXX
Страница 1: ...z OS TSO E REXX User s Guide SA22 7791 00 ...
Страница 2: ......
Страница 3: ...z OS TSO E REXX User s Guide SA22 7791 00 ...
Страница 10: ...viii z OS V1R1 0 TSO E REXX User s Guide ...
Страница 12: ...x z OS V1R1 0 TSO E REXX User s Guide ...
Страница 14: ...xii z OS V1R1 0 TSO E REXX User s Guide ...
Страница 18: ...xvi z OS V1R1 0 TSO E REXX User s Guide ...
Страница 20: ...2 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 58: ...Tracing Expressions with the TRACE Instruction 40 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 78: ...60 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 86: ...Built In Functions 68 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 128: ...Issuing Other Types of Commands from an Exec 110 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 136: ...Debugging Execs 118 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 170: ...Protecting Elements in the Data Stack 152 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 201: ...Part 3 Appendixes Copyright IBM Corp 1988 2001 183 ...
Страница 202: ...184 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 222: ...Using Variables 204 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 226: ...208 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 238: ...220 z OS V1R1 0 TSO E REXX User s Guide ...
Страница 241: ......