Using EXECIO
EXECIO can be used to read or write zero or more lines in a file. EXECIO differs from readfile and writefile in that it operates on open files. The file must be opened in a mode consistent with the requested read or write operation. Read operations will read from the current file cursor position. Write operations will write from the current file cursor position, or, if the file is opened for append, write operations will append to the end of the file.
address mvs 'execio * diskr 7 (stem data. fini'The data can come from and go to the stack or a stem. You can also use it to read or write an entire file. As shown in the following syntax diagram, z/OS UNIX supports all the TSO/E REXX operands except OPEN, DISKRU, and linenum.
- File descriptors 0 to 7
- STDIN, STDOUT, STDERR
When using EXECIO to read a file, the maximum allowable length of a line in the file is 1024 characters, including the newline character. For information about reading blocks of data, see .
When using EXECIO to write to a file, there is no maximum for the amount of
characters to write. One newline character is appended to the end of the written
data.
For information about EXECIO, see Using the EXECIO command in z/OS® TSO/E REXX User's Guide.
