Connecting the partner transaction

When the front-end transaction has acquired a session, the next step is to initiate the partner transaction.

The state tables show that, in the allocated state (state 1), one of the commands available is GDS CONNECT PROCESS. This command is used to attach the required back-end transaction. It should be noted that the results of the GDS CONNECT PROCESS are placed in the send buffer and are not sent immediately to the partner system. Transmission occurs when the send buffer is flushed, either by sending more data than fits in the send buffer or by issuing a GDS WAIT command.

A successful GDS CONNECT PROCESS causes the conversation state to switch to send state (state 2). Figure 1 is a program fragment showing an example of a GDS CONNECT PROCESS.

Note: For clarity, the EXEC CICS GDS ALLOCATE and GDS CONNECT PROCESS commands shown in Figure 1 identify the partner LU and transaction explicitly. To avoid doing this, you could use the PARTNER option of these commands. This specifies a set of definitions that include the names of the partner LU, the communication profile to be used on the session, and the partner transaction. Thus, in Figure 1 , the PARTNER option could be used instead of SYSID on the EXEC CICS GDS ALLOCATE command, and instead of PROCNAME and PROCLENGTH on the EXEC CICS GDS CONNECT PROCESS command. The advantage of using PARTNER is that it makes your DTP programs more maintainable: the details of each partner program can be held in a single definition.