Invocation of CICS Programs to Access DB2
You can write programs in COBOL, PLI, C, and Assembler to access DB2. For Substation ES to execute these programs, they must be able to take input and deliver output in one of following ways:
- COMMAREA: data is presented to the program in COMMAREA. Upon return from the program, the content of COMMAREA is considered the output of the program and is sent back to Substation ES.
The maximum input and output length of the COMMAREA is 32,000 characters.
- Container: data is presented to the program in CICS Container whose name is the same as the program name. The program returns its response in the same Container. In the absence of response from the user program, the program deletes the Container. Upon return from the program, the content of the Container is returned to Substation ES. If no Container is found, the response is
No Response.
A Container can be any length. A container size is constrained only by the available user storage in the CICS address space.
- TSQ name in COMMAREA: data is presented to the program in CICSTSQ. The eight-character TSQ name is in COMMAREA. The program reads the TSQ to obtain input. Output from the program is placed in the same TSQ. Upon program return, the content of the TSQ is used by Substation ES as the response. If the TSQ is not found, then a
NULL response is returned.
The size of input and output data is only limited by TSQ constraints and storage to support the size of the TSQ.
- Storage pointer in COMMAREA: data is presented to the program as a pointer to a storage area and length. Those two fields are in the COMMAREA. The program can access the storage directly. Upon return from the user program, the content of the storage area is used by Substation ES as the response.
- DB2 Access Considerations
The CICS region with which Substation ES interfaces is called the SOR. An application that runs the CICS region is called the AOR. - DB2Entry and DB2Tran for Programs That Access DB2
If your CICS program requires to use a DB2ENTRY object, do one of the following list: - Security Considerations
The user identifier under which that the program executes is the same as the parameter USERID defined in the CICS interface parameters member. The transaction identifier under which the program executes depends on the Substation ES recipe, as follows: - Scenarios of CICS DB2 Transaction Definition
Three DB2 transaction definition scenarios are described as follows:
Copyright © Cloud Software Group, Inc. All rights reserved.