"EXECIO 1
DISKRU
..."
More about using DISKRU appears in “Updating Information in a Data Set” on
page 162.
How to access the data set:
An I/O data set must first be allocated to a ddname.
The ddname need not exist previously. In fact, it might be better to allocate it to a
new ddname, such as MYINDD, in order not to interfere with previously established
allocations. You can allocate before the exec runs, or you can allocate from within
the exec with the ALLOCATE command as shown in the following example.
"ALLOC DA(io.data) F(
myindd
) SHR REUSE"
"EXECIO * DISKR
myindd
(FINIS"
Option of specifying a starting line number:
If you want to start reading at other
than the beginning of the data set, specify the line number at which to begin. For
example, to read all lines to the data stack starting at line 100, add the following
line number operand.
"EXECIO * DISKR myindd
100
(FINIS"
To read just 5 lines to the data stack starting at line 100, write the following:
"EXECIO
5
DISKR myindd
100
(FINIS"
To open a data set at line 100 without reading lines to the data stack, write the
following:
"EXECIO
0
DISKR myindd
100
(OPEN"
Options for DISKR and DISKRU:
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 DISKR myindd
(OPEN
"
Note:
If the data set is already open, no operation is performed for OPEN.
v
FINIS - To close the data set after reading it. Closing the data set allows other
execs to access it and its ddname. It also resets the current positional pointer to
the beginning of the data set.
v
STEM - To read the information to either a list of compound variables that can be
indexed, or a list of variables appended with numbers. Specifying STEM with a
variable name ensures that a list of variables (not the data stack) receives the
information.
"EXECIO * DISKR myindd
(STEM newvar.
"
In this example, the list of compound variables has the stem
newvar.
and lines of
information or records from the data set are placed in variables
newvar.1
,
newvar.2
,
newvar.3
, and so forth. The number of items in the list of compound
variables is placed in the special variable
newvar.0
.
Thus if 10 lines of information are read into the newvar variables,
newvar.0
contains the number 10, indicating that 10 records have been read. Furthermore,
newvar.1
contains record 1,
newvar.2
contains record 2, and so forth up to
newvar.10
which contains record 10. All stem variables beyond
newvar.10
(for
example, variables
newvar.11
and
newvar.12
) are residual and contain the
value(s) held prior to entering the EXECIO command.
Using EXECIO to Process Information ...
156
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: ......