The main activities involved in processing CICS transactions with SQL calls are:
These main activities are performed for each transaction.
An SQL session is created when the application executes the first SQL statement. The following activities occur, when creating an SQL session:
The CICS system ID is used to retrieve the server definition (CXGMSRV TYPE=CXX) to locate the CXGSERV connection.
The CICS System ID is used to retrieve the server definition (CXGMSRV TYPE=CXX) to locate the JDBC Server connection.
The transaction ID is used to determine the following transaction attributes (CSGMTRAN):
User identity schema;
Security tokens are used to retrieve security definitions from the CXGCIACF module.
A CXGSERV session is created.
An SQL session is created by generating and executing a CONNECT statement.
The following activities occur when processing an SQL statement:
The SQL statement is forwarded to the CXGSERV session.
CXGSERV passes the statement to the JDBC server, where the SQL statement is processed.
The results of the SQL statement are returned to the CXGSERV session.
CXGSERV forwards the results to CXGCICS, where they are posted in the application.
A COMMIT or ROLLBACK process is executed when a syncpoint is requested by CICS. The following activities occur when processing a COMMIT or ROLLBACK request:
CICS passes a syncpoint request to CXGCICS.
CXGCICS passes either a COMMIT or a ROLLBACK statement, depending upon the request type, to CXGSERV.
CXGSERV passes the statement to the JDBC server.
The JDBC Server executes the statement and returns a completion code .
CXGSERV forwards the completion code to CXGCICS, where it is evaluated.
CXGCICS returns control to CICS.
The SQL session is terminated when the task terminates; the CICS termination managers indicate an end-of-task. The following activities occur when terminating an SQL session:
A DISCONNECT statement is executed to terminate the JDBC server connection.
A DELETE SESSION command is issued to terminate the CXGSERV thread.