Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Setting up a field for file status

Establish a file status key by using the FILE STATUS clause in the FILE-CONTROL paragraph and data definitions in the DATA DIVISION.

ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
    . . .
    FILE STATUS IS file-status
WORKING-STORAGE SECTION.
01  file-status  PIC 99.

Specify the file status key file-status as a two-character category alphanumeric or category national item, or as a two-digit zoned decimal (USAGE DISPLAY) (as shown above) or national decimal (USAGE NATIONAL) item.

Restriction: The data item referenced in the FILE STATUS clause cannot be variably located; for example, it cannot follow a variable-length table.

related tasks
Using file status keys

related references
FILE STATUS clause (COBOL for Windows Language Reference)


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)