Installing and Configuring CXGCONM

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:


Installing CXGCONM

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)

ACECALL

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.

ACEPCCOB

INCLUDE CXXLIB(ACEPCCOB)
INCLUDE USRLIB(CXGCIDEF)
INCLUDE CXGLIB(CXGCONM)
ENTRY ACEPCCOB
NAME ACEPCCOB(R)

ACEINT

INCLUDE CXXLIB(ACEINT)
INCLUDE USRLIB(CXGCIDEF)
INCLUDE CXGLIB(CXGCONM)
ENTRY ACEINT
NAME ACEINT(R)

Binder Options

These modules must be processed using the following binder options:

AMODE=31,RMODE=ANY,RENT

Configuring CXGCONM

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:

CXGCIDEF

The PREFIX parameter setting from the CXGINST macro is used to identify and load the runtime options module.

CXGCIOPT

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.

CXGCIACF

When necessary, the CXGCIACF module is loaded to process any security tokens, which are referenced by job definitions in the runtime options.

DB2 Code Translation

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.

Using CXGCONM

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:

Server Definitions

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).

Job Definitions

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).

CONNECT Statement

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.

ACEPCCOB

The syntax for usage with the precompiler is as follows:

//PCC      EXEC PGM=ACEPCCOB,PARM='-nserverID -ujobID '

ACEINT

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 ;

Error Handling

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.

CONNECT Statement Example

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.

ACEPCCOB Example

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.

ACEINT Example

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.

Configuration Example

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