Executing a Remote Procedure Call via SQL
To execute a RPC via SQL:
1. Select the RPC Interface Table check box while you have selected a table in a CDD in the CONNX Data Dictionary Manager window.
2. Specify the name of the program you want to execute in the File Name field.
a. For VSAM running under CICS, specify the name of the CICS program.
b. For VSAM running as started task, specify the name of the TSO program.
c. For VMS, specify the name of the DCL program (prefixed by a $), or the name of the VMS RPC (see CONNX Remote Procedures).
3. Under Table Columns, create a set of columns to map over the input and output buffers for the RPC.
For VSAM running under CICS, specify the a set of columns to map over the COMMAREA on input, and another set of columns to map over the COMMAREA on output.
4. Under Table Properties, specify the total number of bytes for RPC input.
5. Specify the total number of bytes for the input and output as the Record Length.
6. To execute the RPC, issue a select statement against the CONNX SQL Table that holds the RPC information. For example, the following statement will execute the RPC, and return the output columns.
Select * from CNXTime
7. To specify data for the input columns, supply where criteria for them in the SQL Statement. For example, the following statement will execute the RPC, and return the output columns.
Select * from CNXTime where inputtime = '12:33:01'