Invoking an RSP

Both the client application programmer and the RSP programmer need to be aware of how client applications interact with RSPs. This section describes how to invoke RSPs, how to migrate from previous modes, and how to send data to the RSP.

How the RSP will be invoked (through Access Service Library, TRS, or both) or Gatewayless determines the command you use to invoke it. When a client application invokes an RSP, arguments are passed to the RSP on the USE PROCEDURE, EXECUTE, or EXEC statement. The RSP accesses these values through the SPAREA. When you write a client application to invoke an RSP, the format of the invocation command you use depends on:

NoteDirectConnect and Open ServerConnect support MDI Database Gateway TSQL modes of TSQL0, TSQL1, and TSQL2 for backward compatibility only. TSQL0 corresponds to PASSTHROUGH mode, and TSQL2 corresponds to SYBASE mode. For these modes, your SQL should not require any modification. TSQL1 and TSQL2 continue to work as they do in MDI Database Gateway for DB2, Version 2.05, but Sybase is planning to phase them out. These modes will not be defined or documented beyond what was provided for that version. See “Migrating from TSQL0, TSQL1, and TSQL2 modes” for more information.

When invoking an RSP, the client application can specify keyword variables, variable text, or input pipes to pass to the RSP. In turn, the RSP uses pointers in the SPAREA to access the values. Keyword variables have the typical MVS format of &VARNAME=value. The client application passes values according to the DirectConnect TSQL setting for SQL transformation.