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.

four characters: the first two refer to the major code and the second two refer to<br />

the minor code. The major code indicates the general type of error, and the minor<br />

provides further detail. Minor codes, except zero, have the same or a similar<br />

meaning, regardless of the major code with which they are combined.<br />

The application program can test the return code after each I/O operation. If the<br />

major return code is 00, the operation completed successfully and the minor return<br />

code contains status information that indicates whether a read or a write operation<br />

should be performed next. A major return code of 04 or higher indicates that an<br />

error occurred. The program may test for any specific errors for which it will<br />

attempt programmed recovery. The application program may test for a specific<br />

condition by comparing the major and minor codes as a unit, or may identify a<br />

class of conditions by testing the major code alone.<br />

Most major and minor return codes are accompanied by any one of several<br />

message numbers, for which the typical recovery action is similar. The individual<br />

languages file status codes; they may set based on the major and minor return<br />

codes.<br />

Table 7 defines the major return codes. See the Application Display Programming,<br />

SC41-5715-00 book for specific definitions of the major and minor return codes as<br />

they are used for display files and the message numbers associated with each.<br />

Similar specific definitions for printer files and each of the communications types<br />

valid on an ICF file can be found in the Printer Device Programming, SC41-5713-03<br />

book and the books for each communications type.<br />

Table 7. Major Return Code Definitions<br />

Code Definition<br />

00 The operation requested by your program completed<br />

successfully. The minor includes state information, such as<br />

change direction.<br />

02 Input operation completed successfully, but job is being<br />

ended (controlled). The minor includes state information.<br />

03 Successful input operation, but no data was received. The<br />

minor includes state information.<br />

04 Error occurred because an output operation was attempted<br />

while data was waiting to be read.<br />

08 An acquire operation failed because the device has already<br />

been acquired or the session has already been established.<br />

11 A read-from-invited-program-devices operation failed<br />

because no device or session was invited.<br />

34 An input exception occurred. The data length or record<br />

format was not acceptable for the program.<br />

80 A permanent (unrecoverable) system or file error occurred.<br />

Programmer action is required to correct the problem.<br />

81 A permanent (unrecoverable) device or session error<br />

occurred during an I/O operation.<br />

Chapter 2. <strong>File</strong> processing 27

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

Saved successfully!

Ooh no, something went wrong!