Printer file return codes

The major and minor return codes for printer files are set in the I/O feedback area of the printer file.

Return codes report the results of each operation. The appropriate return code is available to the application program that issued the operation. The program then checks the return code and acts appropriately. Refer to your high-level language documentation for information about how to access these return codes.

The return code is a 4-digit value: the first two digits contain the major code, and the last 2 digits contain the minor code. With some return codes, a message is also sent to the job log or the system operator message queue (QSYSOPR). You can refer to the message for additional information. Message IDs followed by an asterisk (*) can be received by applications while spooling output.

Note: Return codes that refer to a condition on the printer are available to the application program only when printing with SPOOL = *NO specified in the printer file. When SPOOL = *YES has been specified, the printer writer program is the program communicating with the printer, not your application program.