Communicates error and informational messages to the client application.
Syntax varies with the programming language.
Provide the message text:
MOVE 'E' TO SPSTATUS. MOVE 'DATA REQUESTED CANNOT BE FOUND' TO SPMSG. CALL 'MESSAGE' USING SPAREA.
Repeat the message previously stored in SPMSG:
MOVE 'E' TO SPSTATUS. CALL 'MESSAGE' USING SPAREA.
The MESSAGE command uses values from these SPAREA fields:
SPMSG (see “SPMSG”) specifies the message text. Message text can be up to 100 bytes long.
SPSTATUS (see “SPSTATUS”) specifies processing status. Use one of these codes:
OK indicates success.
E indicates an error.
W indicates a warning.
Your RSP can issue as many MESSAGE commands as you need. The RSP API sends the messages to the client application immediately.
To send messages and status to the client, the RSP places message text in an SPAREA field (SPMSG) and issues the RSP MESSAGE command, which signals to the RSP API that a message is ready to be sent.
A call to MESSAGE cannot be made
between an OPENPIPE and a PUTPIPE.