Specifying a file reference
A file reference can be a file constant, a file variable, or a
function reference which returns a value with the FILE attribute.
It can be used in the following ways:
- In a FILE or COPY option
- As an argument to be passed to a function or subroutine
- To qualify an input/output condition for ON, SIGNAL, and REVERT statements
- As the expression in a RETURN statement.
On-units can be established for a file constant through a file
variable that represents its value (see ON-units for file variables). In the
following example, the statements labelled L1 and L2 both
specify null ON-units for the same file.
dcl F file,
G file variable;
G=F;
L1: on endfile(G);
L2: on endfile(F);