z/OS TSO/E CLISTs
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Performing file I/O

z/OS TSO/E CLISTs
SA32-0978-00

CLISTs can perform I/O to a physical sequential data set, a member of a partitioned data set (PDS), or the terminal when allocated to a file. Four CLIST statements are available for opening, reading, writing, and closing files:
  • OPENFILE opens a previously allocated file for input, output, or updating. You may have allocated the file using the TSO/E ALLOCATE command or using step allocation (JCL statements in a logon procedure).
  • GETFILE reads a record from a file opened in the same CLIST.
  • PUTFILE writes a record to a file opened in the same CLIST.
  • CLOSFILE closes a file opened in the same CLIST.

Whenever a CLIST performs I/O, include an error routine that can handle end-of-file conditions and errors that may occur. End-of-File processing shows a CLIST with an error routine that handles end-of-file conditions.

Whenever CLISTs are nested, corresponding OPENFILE, GETFILE, PUTFILE, and CLOSFILE statements must be in the same CLIST.

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014