Major and minor return codes in files by the system
Major and minor return codes report errors and certain status information for ICF, display, and printer files. They are not used for other files. They typically appear as four characters: the first two refer to the major code and the second two refer to the minor code.
The major code indicates the general type of error, and the minor provides further detail. Minor codes, except zero, have the same or a similar meaning, regardless of the major code with which they are combined.
The application program can test the return code after each I/O operation. If the major return code is 00, the operation completed successfully and the minor return code contains status information that indicates whether a read or a write operation should be performed next. A major return code of 04 or higher indicates that an error occurred. The program can test for any specific errors for which it will attempt programmed recovery. The application program can test for a specific condition by comparing the major and minor codes as a unit, or can identify a class of conditions by testing the major code alone.
Most major and minor return codes are accompanied by any one of several message numbers, for which the typical recovery action is similar. The individual languages file status codes; they can set based on the major and minor return codes.
Table 1 defines the major return codes. See the Application Display Programming
book for specific definitions of the major and minor return codes as they are used for display files and the message numbers associated with each. Similar specific definitions for printer files and each of the communications types valid on an ICF file can be found in the Printing topic and the books for each communications type.
Parent topic:
Troubleshooting database file management
Related information