Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


FILE STATUS clause

The FILE STATUS clause monitors the execution of each input-output operation for the file.

When the FILE STATUS clause is specified, the system moves a value into the file status key data item after each input-output operation that explicitly or implicitly refers to this file. The value indicates the status of execution of the statement. (See the file status key description under Common processing facilities.)

data-name-1
The file status key data item can be defined in the working-storage, local-storage, or linkage section as one of the following:

data-name-1 must not contain the PICTURE symbol 'P'.

data-name-1 can be qualified.

The file status key data item must not be variably located; that is, the data item cannot follow a data item that contains an OCCURS DEPENDING ON clause.

data-name-8
Represents information returned from the file system. Because the definitions are specific to the file systems and platforms, applications that depend on the specific values in data-name-8 might not be portable across platforms.

You must define data-name-8 with PICTURE 9(6) and USAGE DISPLAY. However, you can define an additional field with PICTURE X(n). The file system defines the feedback values, which are converted to the six-digit external decimal representation with leading zeros when the file systems feedback value is less than 100000. If you have defined an additional field using PICTURE X(n), then X(n) contains additional information that describes any nonzero feedback code. (For most programs, an n value of 100 should be adequate to show the complete message text. If the file is defined with a large number of alternate keys, then allow 100 bytes plus 20 bytes per alternate key.)


Terms of use | Feedback

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