GETFILE statement

Use the GETFILE statement to read a record from a QSAM file opened by the OPENFILE statement. One record is obtained by each execution of GETFILE.

After GETFILE executes, the file name variable contains the record obtained. If you use GETFILE to read data from the terminal, the data is translated to uppercase.

Note: The GETFILE statement must be issued in the same CLIST as the corresponding OPENFILE statement.

1 ? label:  GETFILE  file_name
label
A name the CLIST can reference in a GOTO statement to branch to this GETFILE statement. label is one-to-31 alphanumeric characters, beginning with an alphabetic character.
file_name
The file name (ddname) assigned to the file (data set) when it was allocated in the current session. Do not specify a symbolic variable containing the file name.