The MODELRSP program uses these RSP commands: OPENPIPE, PUTPIPE, CLOSPIPE, STATUS, and MESSAGE. In all the supported programming languages, the RSP commands are invoked with a standard CALL statement.
In COBOL II, the RSP command can be enclosed in single quotes; in the other supported languages, quotes are not necessary. The following COBOL II statements show how your RSP code must use the RSP commands.
Single quotes in a COBOL CALL statement
indicate a “static call.”
CALL 'OPENPIPE' USING SPAREA. CALL 'PUTPIPE' USING SPAREA CALL 'CLOSPIPE' USING SPAREA. CALL 'STATUS' USING SPAREA. CALL 'MESSAGE' USING SPAREA.
The previous sample shows:
Data pipe mode and format values are moved to the corresponding SPAREA fields. Then the command is issued
CALL ‘OPENPIPE’ USING SPAREA.
Each PUTPIPE generates one result row. Therefore, your code must issue the PUTPIPE command for every row of data you send.
A STATUS command always follows the CLOSPIPE command. This ensures the processing status is communicated to the client application and clears out the data pipe and all messages.
For more information on the RSP commands, their formats and results, see Appendix A, “RSP Commands.”