Retrieves messages that DirectConnect or Adaptive Server Enterprise generate during SQL request processing.
Syntax varies with the programming language.
Test SPIND before issuing a GETMSG:
PERFORM UNTIL (SPIND NOT = 'M') CALL 'GETMSG' USING SPAREA PERFORM PROCESS-MSG END-PERFORM.
When the GETMSG command runs, Open ClientConnect supplies the next available message in the SPMSG (see page “SPMSG”) field in the SPAREA. If a message is not available, the SPIND (see page “SPIND”) and SPMSG fields are set to blanks. The CSA should continue to issue GETMSG commands until all messages are retrieved.
Before issuing this command, you can determine whether you received messages by examining the SPIND field in the SPAREA. SPIND contains one of the following values:
'M' indicates that additional messages are available.
[Blank] indicates that additional messages are not available.