Monitoring file status with the open and I/O feedback area

 

The system monitors the status of a file in feedback areas once it has successfully opened the file.

As the system performs operations on a file, it updates the feedback areas to reflect the latest status. These feedback areas give you greater control over applications and provide important information when errors occur. The feedback areas are established at open time, and there is one feedback area for each open file. One exception is for shared files, which share feedback areas as well as the data path between the program and the file. For more information about shared opens, see Shared files.

Some high-level languages on the system enable you to access the status and other information about the file against which operations are being performed. There are two feedback areas of interest to you:

The above information areas can be useful to you. For example, when an error occurs with a device file, the program can determine predefined error handling operations based on the major/minor return code in the file-dependent feedback area. If data is being received from a communications device and the application on the other end sends an error, the program can determine that the next operation should be to wait until the next block of data is sent indicating the error. Possibly, the next operation might be to close the file and end the conversation with the application on the other side or wait for the next request from the application.

Another way might include detecting the type of file that actually opened to determine the type of operations that are allowed. If the file type is printer, only output operations are allowed.

 

Parent topic:

Opened files

 

Related concepts


Shared files

 

Related reference


Open feedback area
I/O feedback area
I/O feedback area for ICF and display files
I/O feedback area for printer files