When a LOCATE statement is used for the data set, the KEY condition for this LOCATE statement is not raised until the next WRITE or LOCATE statement for the file, or when the file is closed.
|
The file-reference must be a scalar reference.
If a file is closed in an ON-unit for this condition, the results of normal return are undefined. Exit from the ON-unit with the closed file must be achieved with a GO TO statement.