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.

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

Table 6. OS/400 <strong>File</strong> <strong>Management</strong> Message Number Ranges<br />

Message IDs Operation Message Type<br />

CPF4001-40FF Open Diagnostic and status.<br />

CPF4101-43FF Open Escapes that make the file<br />

unusable.<br />

CPF4401-44FF Close Diagnostic and status.<br />

CPF4501-46FF Close Escapes that make the file<br />

unusable.<br />

CPF4701-48FF I/O, Acquire, and Release Notify with a default reply of<br />

cancel, status and escapes<br />

that do not make the file or<br />

device unusable.<br />

CPF4901-49FF I/O, Acquire, and Release Notify with a default reply of<br />

ignore or go.<br />

CPF5001-50FF I/O, Acquire, and Release Notify with a default reply of<br />

cancel.<br />

CPF5101-53FF I/O, Acquire, and Release Escapes that make the file or<br />

device unusable.<br />

CPF5501-56FF I/O, Acquire, and Release Escapes that make the file or<br />

device unusable.<br />

Some status messages, CPF4018 for example, are preceded by a diagnostic message<br />

that provides additional information. Diagnostic messages may be kept in the job<br />

log, depending on the message logging level of the job. If a CL program monitors<br />

for CPF4018, CPF5041, or similar messages, it can retrieve the accompanying<br />

diagnostic message from the program message queue.<br />

If an error occurs for which an escape message is issued and the message is not<br />

monitored, your program will be ended and the message displayed for the<br />

operator. You can also monitor status messages, but if you do not monitor them<br />

the program continues. Most high-level languages except CL monitor for all the file<br />

errors that you are likely to encounter, and provide some standard recovery.<br />

Depending on the severity of the error, the high-level language may simply end<br />

the program and issue a message of its own. Alternatively, the application<br />

programmer may code an error recovery routine to handle errors that are<br />

anticipated in that particular application.<br />

Within these error-handling routines, it is usually necessary to examine the file<br />

status or major and minor return codes to determine the cause of the error. The<br />

books for the language you are using explain how to access file status and major<br />

and minor return codes. The information for each language also explains the file<br />

status codes as each language defines them.<br />

Major and minor return codes in files by the system<br />

Major and minor return codes report errors and certain status information for ICF,<br />

display, and printer files. They are not used for other files. They usually appear as

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

Saved successfully!

Ooh no, something went wrong!