Error types

Three of the error types—PROGRAM, SERVICE, and USER— are common to both APPCCMD CONTROL=SEND, QUALIFY=ERROR and the abnormal deallocation macroinstructions. (These errors are indicated on deallocation macroinstructions by the QUALIFY values of ABNDPROG, ABNDSERV, and ABNDUSER.) The PROGRAM and SERVICE types are defined in LU 6.2 architecture. The USER type is provided to give you more flexibility in reporting the cause of errors.

The distinction between PROGRAM and SERVICE errors is based on transaction programs. PROGRAM errors are reported to a transaction program. SERVICE errors are reported to a part of the application program that is implementing a component of the LU 6.2. Because the application program can implement LU 6.2 options in addition to transaction programs, VTAM® reports both types of errors to the application program. The application program must screen service errors from the processing threads in the application program that are analogous to transaction programs.

The application program might not need to report SERVICE errors unless it is implementing LU 6.2 options, such as mapped conversations. As an example, suppose an application program expects data (representing a date) from another application program in a format of mm/dd/yy, but instead receives the date in a dd/mm/yy format. If the conversation on which the data flowed is a basic conversation (the conversation level provided by VTAM), the error probably was caused by the processing thread in the partner LU using the conversation. (That processing thread is analogous to a transaction program). The application program used the conversation correctly, and VTAM transferred the data without error, but a misunderstanding occurred between the two LUs regarding the data to send and receive. To report this type of error, the application program could issue an APPCCMD SEND, QUALIFY=ERROR, TYPE=PROGRAM macroinstruction.

Suppose instead that the conversation type was a mapped conversation and that the application program discovers a problem with the format of the data it is receiving. Because the LU portion of the application determines how to format data for a mapped conversation, the error is probably in the mapping component of the partner LU. In such a case, the application program detecting the error would issue an APPCCMD CONTROL=SEND, QUALIFY=ERROR, TYPE=SERVICE macroinstruction, indicating that the error was caused by something within the LU itself.

For both the PROGRAM and SERVICE errors, the reporting application program specifies the type of error, and can optionally include error log data in the form of a formatted GDS variable.