Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Reading a record from a file z/OS TSO/E CLISTs SA32-0978-00 |
|
To read a record from an open file, use a GETFILE statement. The CLIST creates a variable of the same name as the file name and places the record into it. As long as the file remains open, successive GETFILE statements read successive records from the file. When the end of the file has been reached, &LASTCC contains the error code 400. For information about how to detect and handle end-of-file conditions, see End-of-File processing. Assume a data set called D58TAN1.CHECKS.DATA contains the following
records:
To read the records into three variables,
you can code the following:
If you use GETFILE to read data from the terminal, the data is translated to uppercase, and the terminal user must end the data with a symbol that the CLIST recognizes as an end-of-file. |
Copyright IBM Corporation 1990, 2014
|