Pathmaker Programming Guide

Modifying a Server Skeleton or Service Skeleton
Advanced Pathmaker Programming Topics
067868 Tandem Computers Incorporated 9–43
Adding to the List of Level 88 Condition Clauses
Status information in NonStop SQL is placed in a special data area called the SQL
communication area (SQLCA). Application developers can use SQLCA to receive
status information in host language programs after SQL statement execution. SQLCA
includes an array that contains error codes for each subsystem. The field in SQLCA
that contains NonStop SQL error codes is called SQLCODE.
NonStop SQL has a special feature for handling error messages that is specifically
designed for the Pathmaker product. NonStop SQL moves SQLCODE to a special
data area called SQLCODEX. SQLCODEX is available so that you can use Level 88
declarations in Pathmaker COBOL service code. The list of default Level 88
declarations available in Pathmaker service modules is listed here.
The Pathmaker product creates two Level 88 declarations, T9154-SQL-ERROR and
T9154-SQL-WARNING, that you can use to catch all error and warning messages not
included in the default list of Level 88 declarations. If you want, you can add to the
list of Level 88 declarations in the COBOL server skeleton. The following excerpt lists
the portion of the COBOL server skeleton code in which the Level 88 condition clauses
for NonStop SQL errors are declared. Again, the code shown here is slightly
reformatted for reproduction in this manual:
EXEC SQL INCLUDE SQLCODEX END-EXEC
*01 SQLCODEX PIC S9(4) COMP.
88 T9154-SQL-SUCCESSFUL VALUE IS ZEROS.
* Successful SQL operation.
88 T9154-SQL-ERROR VALUE IS
-9999 THRU -1.
88 T9154-SQL-WARNING VALUE IS
1 THRU 9999.
88 T9154-SQL-NOT-FOUND VALUE IS 100.
* No rows selected or modified.
88 T9154-SQL-NO-DEFINE VALUE IS -200.
* There is no DEFINE for <value>.
88 T9154-SQL-NO-EXTENDED-MEMORY VALUES ARE
-206 -251.
* 206-Could not obtain extended memory
* (ALLOCATESEGMENT error <value>).
*
* 251-An error occurred trying to allocate extended
* memory (DEFINEPOOL error <#value>).
88 T9154-SQL-PROGRAM-NOT-COMPILED VALUE IS -8025.
* The program was not SQL compiled.