FILE STATUS Extensions

The compiler supports the specification of a second FILE STATUS item, which is treated as commentary. The FILE STATUS phrase of the File-Control paragraph supports the following format:

[ File STATUS Is status-variable [status-variable-2] ]

Status-variable must be the name of an alphanumeric (or USAGE DISPLAY numeric) Working-Storage or Linkage data item with a size of 2 characters. Status-variable-2 must be the name of a group item that is 6 characters in length (this is not checked by the compiler).

When the FILE STATUS clause is specified, a value will be moved into status-variable after the execution of every statement that references the corresponding file. This value indicates the status of the statement.