To use the API library, the library and its exported procedure entry points must be declared in the application program. Within the application program, declare the API library as LIBACCESS=BYFUNCTION with FUNCTIONNAME=SPIAPISUPPORT. This example illustrates declaring a library in an ALGOL program:
LIBRARY SPIAPISUPP (LIBACCESS=BYFUNCTION, FUNCTIONNAME="SPIAPISUPPORT.");
The following exported procedures provide entry points into the API library:
LINK_APPL_PROGRAM links the application program to the API library.
SEND_MESSAGE sends a message from the application program to Operations Sentinel.
SEND_STATUS sends a status message from the application program to the API library, indicating that the application is present and active. The application program should call this procedure if it has requested the API library to set up a heartbeat timer to monitor its link to the API library, and it has no specific message to send to the Operations Sentinel server and wants to reset the timer before it expires.
UNLINK_APPL_PROGRAM unlinks the application program from the API library.
These are examples of procedure declarations in an ALGOL program:
PROCEDURE LINK_APPL_PROGRAM(LINKREQUEST); EBCDIC ARRAY LINKREQUEST[0]; LIBRARY SPIAPISUPP; PROCEDURE UNLINK_APPL_PROGRAM(LINKREQUEST); EBCDIC ARRAY LINKREQUEST[0]; LIBRARY SPIAPISUPP; PROCEDURE SEND_MESSAGE(MESSAGEIN); EBCDIC ARRAY MESSAGEIN[0]; LIBRARY SPIAPISUPP; PROCEDURE SEND_STATUS(STATUSIN); EBCDIC ARRAY STATUSIN[0]; LIBRARY SPIAPISUPP;
For information on declaring an MCP library in other languages, refer to the appropriate MCP language manual.