EXECIO Overview



All the non-mainframe REXX implementations, plus z/VM, support the concept of Stream I/O (Input Outout).

The z/VM CMS implementation of REXX also supports EXECIO for File Processing, as does the z/OS implementation.

Before discussing how files are manipulated, it is worth looking at the capabilities and limitations of EXECIO, as it is that command which is used to OPEN, READ, WRITE and CLOSE files.

What EXECIO can be used.



  • EXECIO will perform an implicit open of a file or data set, if it's not already open
  • Records can be read into either a STEM variable, or onto the Data / Program Stack
  • Records can be read into a sequence of numerically consecutive variables on z/OS.
  • Records can be read into a single variable on z/VM.
  • Records can be selected by matching text in a zone on z/VM.
  • Portions of records can be selected by matching text within margins on z/VM for both Read and Write operations.
  • Records can be written from a STEM variable, or the Data / Program Stack
  • Records can be written from a sequence of numerically consecutive variables on z/OS.
  • Records can be written from a single variable on z/VM.
  • Records can be written from an in-line STRING on z/VM.
  • Using the Data / Program Stack, allows records to be processed in either FIFO (First In First Out) or LIFO (Last In First Out) mode, although the former is the default.
  • EXECIO offers the ability to SKIP a number of records
  • EXECIO offers the ability to start processing at a specific record
  • EXECIO can be used to add records, delete records, and update records (DISKRU in z/OS). (Note that deletion requires the file to be copied, omitting records in the process.)
  • EXECIO can be used to close a data set

While accepting that existing EXEC2 and REXX routines in z/VM may contain EXECIO commands, IBM recommends CMS Pipelines, see "Appendix C" in "z/VM: CMS Pipelines User's Guide and Reference".

Copyright © Legac-e Education 2015-