SNAX/APN Application Programming Manual

SNAX/APN Application Programming Manual420111-001
B-1
B
Handling Errors in
SNAX/APN Applications
Programmers writing SNAX/APN applications must interpret two categories of error
codes:
File-system error codes, generated by the file system within the Tandem distributed
processor in which the application process is executing.
RU sense codes, most often generated by the remote LU with which the application
is communicating, but sometimes by SNA elements that exist within the network
path between the local LU and the remote LU.
This appendix briefly describes these two categories of error codes. For detailed
information about file-system error messages and how to recover, refer to the Guardian
Procedures Errors and Messages Manual. For more information on the RU sense codes,
refer to the IBM Systems Network Architecture: Network Product Formats manual.
File-System Error Codes
Your application processes call file-system procedures such as FILE_OPEN_,
WRITEREAD, and AWAITIO. Upon completion of each such call, the operating
system sets a hardware condition code to indicate whether or not the call was executed
successfully. The condition code has three states:
less than (CCL or <)
equal to (CCE or =)
greater than (CCG or >)
Within the context of SNAX/APN, only the first two are used. CCL indicates that an
error occurred, and CCE indicates successful completion.
When you write applications for Tandem systems in Transaction Application Language
(TAL) or FORTRAN, it is standard practice to test the condition code immediately
following each file-system procedure call to determine whether or not the requested
operation was performed successfully. This is usually done by a conditional transfer
statement that passes control to an error-handling routine elsewhere in your program (for
example, IF < THEN GOTO ERROR).
If the condition code is CCL, the error-handling routine should then call the
FILE_GETINFO_ procedure to obtain a specific error number and then perform the