You can route Static and Dynamic Structured Query Language (SQL) over OptiConnect through the use of Distributed Relational Database Architecture™ (DRDA®). This can be done using either the Fastpath OptiConnect method, or the Extended Function Path OptiConnect method. The Fastpath OptiConnect method is easier to begin using, but you cannot use commitment control, or Distributed Unit of Work (*DUW) for the connect method. If commitment control or *DUW is needed, you will need to route SQL over OptiConnect by using the Extended Function Path method.
OptiConnect supports the use of static Structured Query Language (SQL) with both Dynamic, and Extended Dynamic SQL. You can also route Extended Dynamic SQL statements over OptiConnect by using the QXDA set of APIs. For more information, see the Backup and Recovery topic.
Routing SQL using the fastpath OptiConnect method
To route SQL requests over OptiConnect using the Fastpath OptiConnect 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 parameter. On the application systems, the remote location 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 relational database directory:
The name on the application system must match the name on the database system.
On each application system, specify the name of the target system. On the database system, specify *LOCAL.
After creating the relational database directory entry, you will need to recompile the SQL program to point to the RDB entry. When recompiling specify:
Route SQL using the Extended Function Path Method
To route SQL requests over OptiConnect using the Extended Function Path method, you need to specify the Remote location and Local location in the relational database (RDB) directory. Ensure that these match the Extended Function Path descriptions (previously created in Configure 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.