Exchanging information between RSPs and the client

There are three methods for exchanging information between the RSP and the client application: the SPAREA (keywords or variable text) and the data pipe.

SPAREA

The SPAREA contains all the pointers, codes, and command details that the RSP needs to exchange with the RSP API. Every RSP receives or sends information using the SPAREA.

When an RSP processes through TRS, it creates its own SPAREA through the RPSETUP call. When an RSP processes through Access Service Library, it uses an existing SPAREA on the mainframe to send parameters or data to or from MainframeConnect.

RSP commands (OPENPIPE, PUTPIPE, STATUS, and so on) are small assembler programs that call Open ServerConnect. The RSP commands use the values of fields in the SPAREA as parameters.

Before you issue an RSP command, you first move values to the relevant fields in the SPAREA, then issue a standard system CALL statement. The syntax used for these operations varies with the programming language used. For more information, see Appendix A, “RSP Commands” and Appendix F, “The SPAREA.”

Data Pipes

When processing, the RSP uses a data pipe to pass rows of data to or from the client application. The RSP can open a data pipe either to receive or send data. The RSP can only receive data from an input pipe through Access Service Library. Examples of data pipes are provided in “Using data pipes”.