Use procedure SEND_MESSAGE to send a message from an application program to the Operations Sentinel server.
This is the declared exported procedure:
PROCEDURE SEND_MESSAGE(MESSAGEIN); EBCDIC ARRAY MESSAGEIN[0]; LIBRARY SPIAPISUPP;
Input
Initialize the array MESSAGEIN with the following input parameters:
MESSAGEIN Description
MESSAGEIN[0] Application program identification number (length=6
characters)
MESSAGEIN[6] Application message (length=900 characters)
If the application message does not fill the portion of the array following the 6-character identification number, it must be null-terminated.
Procedure Call Example
In this example, the array APPL_ID contains the program identification number returned by LINK_APPL_PROGRAM. The response is returned in the MESSAGEIN array. It is recommended that the program check the size to determine whether the array was resized by the call to this procedure.
REPLACE MESSAGEIN[0] BY APPL_ID FOR 6, "ENTER AX 'OK' TO CONTINUE PROCESSING"; SEND_MESSAGE(MESSAGEIN); MSGSIZE:=SIZE(MESSAGEIN); REPLACE PROCESS_RESPONSE[0] BY MESSAGEIN[0] FOR MSGSIZE UNTIL EQL 48"00";
Results
If an Operations Sentinel server is available and if the application program is linked to the API library, this procedure returns this message to the application program:
SPIAPI RECEIVED
If the caller passes a message longer than 900 characters to the API library, the message sent to the Operations Sentinel server is truncated, and the API library returns this message to the application program:
SPIAPI RECEIVED MESSAGE TRUNCATED
If an Operations Sentinel server is not available, this procedure prefaces the original message with SPIAPI SPODOWN and returns the message to the application program, up to a total length of 906 characters.
If the application program is not linked to the API library, this procedure prefaces the original message with SPIAPI NOT LINKED and returns the message to the application program, up to a total length of 906 characters.