Routing SQL over OptiConnect

 

You can route static and dynamic Structured Query Language (SQL) over OptiConnect through Distributed Relational Database Architecture™ (DRDA®).

You can use either the fast path method or the extended function path method to route SQL over OptiConnect. The fast path method is easier to use, but you cannot use commitment control or distributed unit of work (*DUW) for this method. If commitment control or *DUW is needed, you need to use the extended function path method.

OptiConnect supports the use of static SQL with both dynamic and extended dynamic SQL. You can also use the Extended Dynamic Remote SQL (EDRS) APIs to route extended dynamic SQL over OptiConnect.

 

Routing SQL using the fast path method

To route SQL requests over OptiConnect using the fast path method, you need to specify special keywords in the relational database (RDB) directory.

The database system must have an RDB entry that matches the relational database name specified on the application systems with *LOCAL for the remote location (RMTLOCNAME) parameter. On the application systems, the RMTLOCNAME parameter must point to the system where the database resides. Each relational database name must be unique within the distributed network. Each entry identifies the method of accessing the relational database as well as other parameters.

To add an entry to the RDB directory, follow these steps:

  1. Enter the Add Relational Database Directory Entry (ADDRDBDIRE) command.

  2. Press F4 (Prompt) and then F9 (Show all parameters).

    1. Enter a name for the RDB parameter. The name on the application system must match the name on the database system.

    2. Enter the RMTLOCNAME parameter. On each application system, specify the name of the target system. On the database system, specify *LOCAL.

    3. Enter QYCTSOC for the APPC device description (DEV) parameter.

    4. Enter *LOC for the local location (LCLLOCNAME) parameter.

After creating the RDB directory entry, you need to recompile the SQL program to point to the RDB entry. When you recompile the SQL program, specify commitment control as *NONE and RDB connect method as *RUW.

The RDB parameter must match the RDB parameter in the RDB entry.

 

Routing SQL using the extended function path method

To route SQL requests over OptiConnect using the extended function path method, you need to specify the RMTLOCNAME and LCLLOCNAME parameters in the RDB directory. Ensure that these parameter values match the extended function path descriptions previously created in Configuring extended function path routing.

Recompiling the SQL program pulls the target system name from the RDB entry, creates an SQL package, and runs the program on the target system.

 

Parent topic:

Advanced OptiConnect customization