The ConnecX Connect Manager (CXGCONM) allows applications to use the CXGCICS runtime options and user identification schema to access data via the CONNX JDBC server.
This document covers the following topics:
Link-edit the routines and include the following CXGCONM objects appropriately.
Object | Library Name | ACECALL | ACEPCCOB | ACEINT |
---|---|---|---|---|
CXGCIDEF | USRLIB | | | |
CXGCONM | CXGLIB | | | |
CXGCODE | CXGLIB | Optional | --- | --- |
The following table describes the libraries used.
Library Name | Description |
---|---|
CXGLIB | The ConnecX Attachment Facility Object Library |
CXXLIB | The Adabas SQL Gateway (Embedded SQL) Object Library |
USRLIB | ConnecX Attachment Facility Object Library (site-specific modifications) |
INCLUDE CXXLIB(ACE3GL) INCLUDE USRLIB(CXGCIDEF) INCLUDE CXGLIB(CXGCONM) INCLUDE CXGLIB(CXGCODE) ENTRY ACECALL NAME ACECALL(R)
Note:
The INCLUDE statement for CXGCODE is optional; it is only needed for
DB2 code translation.
INCLUDE CXXLIB(ACEPCCOB) INCLUDE USRLIB(CXGCIDEF) INCLUDE CXGLIB(CXGCONM) ENTRY ACEPCCOB NAME ACEPCCOB(R)
INCLUDE CXXLIB(ACEINT) INCLUDE USRLIB(CXGCIDEF) INCLUDE CXGLIB(CXGCONM) ENTRY ACEINT NAME ACEINT(R)
These modules must be processed using the following binder options:
AMODE=31,RMODE=ANY,RENT
The following modules are used to configure CXGCONM:
Default options in module CXGCIDEF;
Runtime options in module CXGCIOPT; and
Security definitions in module CXGCIACF.
This section covers the following topics:
The PREFIX parameter setting from the CXGINST macro is used to identify and load the runtime options module.
CXGCONM uses the server and job definitions defined in the CXGCIOPT runtime options to establish a connection with the JDBC server and to identify the user.
When necessary, the CXGCIACF module is loaded to process any security tokens, which are referenced by job definitions in the runtime options.
The ESQ DB2 Code Translation feature is implemented and used as follows:
The code translation table is located in the configuration module (CXGCIOPT).
The table entries are defined via the CXGMCODE macro in CXGCIOPT.
The module CXGCODE implements the translation feature.
Link-edit the ACECALL routine and include the CXGCODE object as described in the section Installation.
CXGCONM generates and executes CONNECT statements at runtime. Its connection information is derived from the definition names provided in your application program and from the server and job definitions defined in the CXGCIOPT runtime options.
This section covers the following topics:
An application can connect to any server definition specified as TYPE=CXX. The server definition provides the information necessary to connect to a specific CONNX JDBC server (the GATEWAY clause of the server identifier).
An application can connect using any batch job definition. The job definition provides the catalog information and user identification schema to be used for the connection (for example, the DDNAME clause of the server identifier and the user ID and password).
The syntax of the CONNECT statement has the following format:
CONNECT TO serverID USER jobID
The following table describes the parameters in this syntax.
Parameter | Description |
---|---|
serverID | Specify the name of the server definition with TYPE=CXX. This is the value specified by the CXGMSRV macro’s NAME parameter. |
jobID | Specify the name of the job definition. This is the value specified by the CXGMJOB macro’s NAME parameter. |
The syntax for usage with the precompiler is as follows:
//PCC EXEC PGM=ACEPCCOB,PARM='-nserverID -ujobID '
The syntax for usage with the ACEINT utility is as follows:
//INT EXEC PGM=ACEINT,PARM='-nserverID -ujobID '
Alternatively, the CONNECT statement can also be used and has the same format as described above:
> CONNECT TO serverID USER jobID ;
The ConnecX Connect Manager provides the following diagnostic information when an error is encountered: SQLCODE, SQLSTATE, and SQLCA. These messages are described in Runtime Messages.
GET DIAGNOSTICS statements cannot be used in your application to retrieve additional information about an error that originates in the ConnecX Connect Manager (for example, when the SQLCODE is less than -10000).
In addition, the ConnecX Connect Manager issues console messages when processing CONNECT statements. These messages provide details on how the CONNECT parameter has been translated.
For example, consider the following sample CONNECT statement:
EXEC SQL CONNECT TO BATCH USER JB01 END EXEC
The values used as server and user name in the statement are the names of CXGMSRV and CXGMJOB definitions in the CXGCIOPT module.
For example, consider the following JCL sample for executing the precompiler:
//PCC EXEC PGM=ACEPCCOB,PARM='-nserverID -ujobID '
The values used as server and user name in the PARM statement are the names of CXGMSRV and CXGMJOB definitions in the CXGCIOPT module.
For example, consider the following JCL sample for executing the ACEINT utility:
//INT EXEC PGM=ACEINT,PARM='-nserverID -ujobID '
The values used as server and user name in the PARM statement are the names of CXGMSRV and CXGMJOB definitions in the CXGCIOPT module.
The values used as server and user name in the examples above are the names of CXGMSRV and CXGMJOB definitions in the CXGCIOPT module:
JBCXX CGMSRV SYSID=BATCH,TYPE=CXX,HOSTNAME=host.jdbc,PORT=5678 JOB001 CXGMJOB NAME=JB01, X AUTHTYPE=AUTHID, X AUTHID=tk00001, (ACF: User ID) X AUTH=tk00815, (ACF: Password) X DSN=mydsn, X OPTION=’APPLICATION=ONDEMAND’
In this example, the CXGMJOB definition of JB01 security tokens are used. These tokens are defined in the CXGCIACF module:
TK00001 CXGMACF TYPE=ENTRY, X NAME=tk00001, X VALUE=myuid TK00815 CXGMACF TYPE=ENTRY, X NAME=tk00815, X VALUE=mypsw
Console messages are issued when the CONNECT statement is executed. These messages show the input values and the generated CONNECT parameters. The following are sample results:
+CXGK090 (I) CONNECT Parameter: +CXGK090 (I) Server Name: BATCH +CXGK090 (I) User Name..: JB01 +CXGK090 (O) CONNECT Parameter: +CXGK090 (O) Server Name: DD=mydsn,GATEWAY=host.jdbc,PORT=5678;APPLICATION=ONDEMAND +CXGK090 (O) User Name..: tk00001