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------'
Notes:
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.)
When the compiler generates code to block output records or unblock input records, file status values that are caused by operating system exceptions are set only when a block is processed. See Appendix F, File Structure Support Summary and Status Key Values for a description of the possible values. See the ILE COBOL for AS/400 Programmer's Guide for more information on blocking output records and unblocking input records.
+-------------------------------IBM Extension--------------------------------+
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.
+----------------------------End of IBM Extension----------------------------+
(C) Copyright IBM Corporation 1992, 2006. All Rights Reserved.