Pathmaker Programming Guide

Coding Custom Services
Creating Services and Servers
067868 Tandem Computers Incorporated 4–45
For COBOL services, the following Pathmaker variables can be used in the Custom
Source File and do not need qualification:
T9154-ADVISORY-MSG-SEVERITY T9154-GUARDIAN-ERR
T9154-ADVISORY-MSG-TEXT T9154-REASON-CODE
T9154-FILE-ERROR-MSG T9154-REPLY-FLAG
T9154-FILE-STAT T9154-REPLY-FLAG-VALUES
T9154-FILE-STAT-REDEF T9154-TMF-ABORT-FLAG
T9154-FS-ERRORS T9154-SQL-SUBSYSTEM-CODE
T9154-FS-MESSAGES T9154-SQL-SUBSYSTEM-ID
For C services, the following Pathmaker variables can be used in the Custom
Source File and do not need qualification:
sqlcode
sqlca
You must set five required variables in your Custom Source File to successfully
return an IPC reply message to a requester. These required variables are fully
described in “Custom Source File Required Variables” under “Coding Custom
Services” earlier in this section.
If a COBOL service accesses a relative file in your application, the Pathmaker
product creates the variable T9154-RELATIVE-KEY in the Working-Storage
Section of the generated COBOL service. This variable is used to store the record
number of a record to be inserted into or read from a relative file.
For a COBOL server, T9154-RELATIVE-KEY is part of the record T9154-
EXTERNAL-GLOBAL-STORAGE in the Working-Storage Section of the server. In
the File Control section, T9154-RELATIVE-KEY is generated as the relative key of
any relative file the server accesses:
RELATIVE KEY IS T9154-RELATIVE-KEY
The structure of this field is:
02 T9154-RELATIVE-KEY PIC S9(9) COMP.
The Pathmaker product provides two functions in the common service utility
library file, PMSVCULC, that you can use when writing code for a C service that
accesses a relative file. One of these functions, lftell, can return the record number
of a relative file record. Another function, lfseek, can be used to position a relative
file to a specific record.