Pathmaker Programming Guide

Coding Custom Services
Creating Services and Servers
067868 Tandem Computers Incorporated 4–55
If you need to provide error handling routines, your service code should:
1. Check the file status at each file access.
2. Move the new message to T9154-ADVISORY-MSG-TEXT.
To check the file status, you can use the Level 88 declarations generated by Pathmaker
in your server. The following excerpt from generated server source code shows each
of these declarations and their associated values:
01 T9154-EXTERNAL-GLOBAL-STORAGE IS EXTERNAL IS GLOBAL.
...
88 T9154-SUCCESSFUL-COMPLETION VALUE IS ZEROS.
88 T9154-END-OF-FILE VALUE IS 10.
88 T9154-INVALID-KEY-SEQ VALUE IS 21.
88 T9154-INVALID-KEY-DUP VALUE IS 22.
88 T9154-INVALID-KEY-NO-REC VALUE IS 23.
88 T9154-INVALID-KEY-FILE-FULL VALUE IS 24.
88 T9154-PERMANENT-ERROR VALUE IS 30.
88 T9154-SEQUENTIAL-FILE-FULL VALUE IS 34.
88 T9154-PROGRAM-LOGIC-ERROR VALUE IS 90.
88 T9154-FILE-DESC-ERROR VALUE IS 91.
88 T9154-RECORD-LOCKED VALUE IS 97.
COBOL file error messages must be less than or equal to 29 characters. The messages
provided for Enscribe file errors in the Declarative Section of the server skeleton are
shown in Table 4-5.
Table 4-5. Enscribe File Error Messages
Error Code Message
10 End of File
21 Invalid Key: Sequence Error
22 Invalid Key: Duplicate
23 Invalid Key: No record found
24 Boundary Violation
30 Permanent Error (recoverable)
34 Boundary Violation: Seq. file
90 Program Logic Error
91 File Description Error
97 Record Locked Error
The PLACE-ORDER service described in “Creating a Custom Application” in Section
10 is an example of user-supplied error handling. In contrast, the CHECK-ORDER
service described in the same section is an example of error handling by the
Declaratives Section.