Pathmaker Programming Guide
The Structure of Pathmaker Custom Services and Servers
Creating Services and Servers
067868 Tandem Computers Incorporated 4–11
Custom C Servers After you have created custom C services, you can package those services into a
custom C server and then initiate the generation and compilation of the server. When
you initiate the compilation of a custom C server, custom C services the server
contains are generated and compiled, and the resulting service object files are bound
into the C server.
When a C server generated by the Pathmaker product is run, the server receives a
message from a requester, invokes the appropriate function (that is, service) to process
the request, and returns a reply to the requester. To make this series of actions work,
the Pathmaker product provides appropriate code in each custom C server it
generates. The list below summarizes which portions of custom C servers and services
the Pathmaker product creates for you and which portions you are responsible for
creating.
What you do not need to code:
$RECEIVE handling
Overall server control logic
File OPEN and CLOSE statements
IPC definitions
The Pathmaker product creates the previous items using information that you enter on
Pathmaker screens.
Most I/O functions for Enscribe files
An error-handling function for file system errors
For NonStop SQL C servers, the Pathmaker product also supplies some embedded
NonStop SQL code for:
Statements to define NonStop SQL host variables (including appropriate NULL
and VARCHAR structures)
An error-handling function for SQL errors
What you do code in C custom services:
Application processing logic, including setting the required Pathmaker variables,
coding calls to needed functions from the Pathmaker common service utility
library, and coding Pathmaker macro language INVOKE statements for
application processing macros that you create
Application database input/output, including calls to needed functions from the
Pathmaker common service utility library and Pathmaker macro language
INVOKE statements for any macros you create to perform database I/O
Database referential integrity checks, including Pathmaker macro language
INVOKE statements for macros you create to perform referential integrity checks
See “Registered Macros” in Section 2 for information about creating a registered
macro.