FILE STATUS Clause
The FILE STATUS clause monitors the execution of each input-output request for the file.
FILE STATUS Clause - Format >>-+------+--STATUS--+----+--data-name-1--+-----------------+-->< '-FILE-' '-IS-' | (1) | '-data-name-5-----'
- IBM® Extension
When the FILE STATUS clause is specified, the system moves a value into the status key data item after each input-output request that explicitly or implicitly refers to this file. The value indicates the status of execution of the statement. (See the "Status Key" description under Common Processing Facilities.)
- data-name-1
- The status key data item must be defined in the Data Division as a 2-character alphanumeric item. Data-name-1 must not be defined in the File Section. Data-name-1 can be qualified.
- data-name-5
- An optional status key data item may be specified for file processing.
For transaction files, the data item must be a 4-character alphanumeric item.
For non-transaction files, the data item must be a 6-byte group item. The item is treated as documentation for all non-transaction files except for those that are dynamically created. Extended file status is set to 0900 for files that are created dynamically when OPEN OUTPUT is specified. Data-name-5 can be qualified.
