30.06.2013 Views

File Management - IBM

File Management - IBM

File Management - IBM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The open feedback area also contains information about each device or<br />

communications session that is defined for the file.<br />

v Input/output feedback area<br />

There are two sections of the I/O feedback area that are updated on the<br />

successful completion of input and output operations:<br />

– Common area<br />

This area contains information about I/O operations that were performed on<br />

the file. This includes the number of operations and the last operation<br />

performed. See “I/O feedback area” on page 179 for a complete list of the<br />

information that you can retrieve from the common I/O feedback area.<br />

– <strong>File</strong>-dependent feedback area<br />

This area contains file-specific information for display, database, printer, and<br />

ICF files; for example, the major and minor return code and amount of data<br />

received from the device. See “I/O feedback area for ICF and display files” on<br />

page 185, “I/O feedback area for printer files” on page 188, and “I/O<br />

feedback area for database files” on page 189 for a complete list of the<br />

information that you can retrieve from the file-dependent I/O feedback area.<br />

The above information areas can be useful to you. For example, when an error<br />

occurs with a device file, the program could determine predefined error handling<br />

operations based on the major/minor return code in the file-dependent feedback<br />

area. If data is being received from a communications device and the application<br />

on the other end sends an error, the program could determine that the next<br />

operation should be to wait until the next block of data is sent indicating the error.<br />

Possibly, the next operation may be to close the file and end the conversation with<br />

the application on the other side or wait for the next request from the application.<br />

Another way might include detecting the type of file that actually opened to<br />

determine the type of operations that are allowed. If the file type is printer, only<br />

output operations are allowed.<br />

<strong>File</strong> error detection and handling by the system<br />

24 <strong>File</strong> <strong>Management</strong> V4R5<br />

The system can detect errors when a file is opened, when a program device is<br />

acquired or released, during I/O operations to a file, and when the file is closed.<br />

When appropriate, the system will automatically try to run a failing operation<br />

again, up to a retry limit. When a retry is successful, neither operator nor program<br />

action is required.<br />

How the system reports errors:<br />

The system reports errors that can affect the processing of the program in any or<br />

all of the following ways:<br />

v A notify, status, diagnostic, or escape message may be sent to the program<br />

message queue of the program using the file. These messages may also appear<br />

in the job log, depending on the message logging level that is set for the job. See<br />

“Messages and message monitors in files by the system” on page 25 for more<br />

information.<br />

v The high-level language may return a file status code.<br />

v A major and minor return code is returned in the I/O feedback area for<br />

intersystem communications function (ICF), display, and printer files. See “Major<br />

and minor return codes in files by the system” on page 26 for more information.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!