Application Programming Guide


 Return to Library  Contents  Previous Topic  Bottom of Topic  Next Topic  Index  Help


Chapter 2. Intercommunication Support

 

This chapter covers two aspects of intercommunication:


MRO and Sysplex Support

   

CallCoordinator provides support for multiregion operation (MRO) within CICS.     This allows your business applications to operate either in the same region as CallCoordinator or in a different region from CallCoordinator. When operating in different regions, application programs can still use the application programming interfaces (APIs) to access resources in the CallCoordinator region. This can help you to balance the load between regions and obtain optimal performance within CICS. Also this enables you to use a sysplex environment. For more information about MRO, refer to the CICS/MVS Intercommunication Guide. For more information about sysplex, refer to OS/390 V2R4.0 Parallel Sysplex Overview.

No additional application programming is needed for multiregion operation with CallCoordinator. The APIs themselves are coded to do the following:

MRO Environment

                     

In a MRO environment where there is one COR, all the AORs must have access to the connection ID (SysId) of the COR. This is done by defining a dummy remote program name (CAMIMROC) in all the AORs. The REMOTE SYSTEM name on the program definition is the connection ID of the COR.

MRO support uses the DPL command of CICS.     This allows the data in one CICS region to be available to programs running in another region. For each API, two complementary invocations of the API program (one in the calling program's region, one in CallCoordinator region) execute simultaneously to perform the API function, and return control and API-provided data to the calling application program (see Figure 1).

Multiple Application Owning Regions enables you to share selected system resources. Each region runs independently and is protected from errors that occur in other regions (see Figure 2). This sharing of resources is transparent to the end user.

CallCoordinator provides APIs that allow a transaction to access CallCoordinator data. The APIs, when invoked through a CICS LINK facility, first determine if the calling program resides in the same CICS region as the CallCoordinator application. If this is the case, the API processes the calling program's request and then returns data and control to the calling program. If the calling program is found to be in a region different from the CallCoordinator region, the API uses a Distributed Program Link command to the CallCoordinator region, which invokes the API with the original Commarea in the CallCoordinator region.  

When the API completes in the CallCoordinator region, control is returned to the calling region with the updated Commarea. This in turn is returned to the user's calling program. The API program executes in both the calling program's region and the CallCoordinator region simultaneously. This facilitates the communication required between regions for transmission of the calling program's request and the API program's response (see Figure 2).

Some APIs require a Terminal Definition

 

To identify the terminal with which to communicate, CallCoordinator must have a terminal definition including its characteristics and the region it belongs to. To meet this requirement, the Agent Sign On API is invoked in the remote region, which uses START to start a transaction in the CallCoordinator region (the V795 transaction). This causes the Terminal Control Table Terminal Entry (TCTTE) to be shipped to the CallCoordinator region. In subsequent INQUIRE commands, CallCoordinator requires the SysId of the TOR in order to start a transaction via Screen Presentation Manager. Terminal definitions for CallCoordinator agents must be defined as "shippable".

CICS Deletion of TCTTE

     

In CICS for MVS/ESA(TM) V4.1 and later there are two parameters: DSHIPIDL and DSHIPINT, which represent the Idle time and Interval, respectively, that CICS will use to determine if and when to delete TCTTE information. If an agent has been inactive for the period of time specified in the DSHIPIDL parameter, their TCTTE information may be removed from the CallCoordinator region. Subsequent INQUIRE requests will then fail. If the agent signs off from CallCoordinator and then signs back on again, the TCTTE information will be recreated.

DSHIPIDL and DSHIPINT should be set to zero for no deletion, within the CallCoordinator region. These parameters reside in the System Initialization Table (SIT) and can be checked or set using CEMT I DEL. Overtype one or both of the INT and IDL parameters and press ENTER to change.

Sysplex Environment

 

In a sysplex environment there may be more than one COR. The AOR must have access to the connection name (SysId) of all the CORs so that the APIs can be routed to the correct COR. This information is made available in shared Temporary Storage Queues (TSQs) and Coupling Facility Data Tables (CFDTs). The TSQs and CFDTs are created at CallCoordinator initialization. This arrangement allows multiple CORs to exist and for the API request to be processed by the appropriate COR.

CallCoordinator APIs can be put into the following categories:

1. AGENT ID required as input parameter
These APIs read the Agent's file to obtain the Switch ID. The switch CFDT is then read to obtain the SysId of the COR where that switch is active.

2. TERM ID required as input parameter
These APIs read a shared TSQ to obtain the Switch ID. The switch CFDT is then read to obtain the SysId of the COR where that switch is active.

3. SWITCH ID required as input parameter
These APIs read the switch CFDT to obtain the Switch ID. The switch CFDT is then read to obtain the SysId of the COR where that switch is active.

4. SysId required as input parameter
These APIs use the SysId directly.

5. CMCT-INDEX
Requires that the SysId is passed

6. No affinity to any COR
These APIs are directed to any active COR.

For more information about configuring for MRO, and sysplex, refer to the Installation part of the CallPath CallCoordinator/CICS System Management Guide

API Router

   

All APIs on entry call the API router program. This program returns a number of return codes to the APIs. If there is an error the API fails with a return code 8, and the following reason codes:

0
No errors detected.

81
C785-LOCAL-SYSID-ERROR. CICS error on SysId assign command.

82
C785-CAMTCORS-TSQ-ERROR. CICS error on reading CAMTCORS TSQ.

83
C785-CAMTTERM-TSQ-ERROR. CICS error on reading CAMTTERM TSQ.

84
C785-SWITCH-TAB-ERROR. CICS error on reading switch table.

85
C785-SWITCH-NOT-FOUND. Switch not found in switch table.

86
C785-SWITCH-INACTIVE. Switch not active.

87
C785-AGENT-READ-ERROR. CICS error on reading agent file.

88
C785-SYSID-NOT-FOUND. SysId passed not found in CAMTCORS TSQ.

89
C785-SYSID-INACTIVE. SysId passed is not active.

90
C785-DPL-LINK-ERROR. CICS error on DPL link.

90
C785-SYNC-ERROR. CICS error on syncpoint.

92
C785-SYSID-REQUIRED. COR SysId is required for this reset.

93
C785-CAMTCORS-TSQ-NOTFOUND. CAMTCORS TSQ not found

94
C785-SYSID-MISMATCH. The local SysId does not match the SysId in the CAMTCORS TSQ in a non-sysplex environment. This could mean that the remote system name on the definition for the API program is incorrect.

95
C785-BAD-SYSID-PASSED. In a non-sysplex environment, a COR SysId is passed which does not match the COR SysId.

96
C785-CAMTTERM-TSQ-NOTFOUND. Terminal TSQ not found.

97
C785-AGENT-NOTFND. Agent not found.

98
C785-NO-SYSID-AVAILABLE. In a sysplex environment, it cannot be established to which COR SysId to route the request.

For further information, see the book CallPath CallCoordinator/CICS Problem Determination.

Exit Programs

   

Application programs that use the CallCoordinator exits must be defined and installed in the CallCoordinator AOR.

Examples of MRO and Sysplex Environments

   

Here are some examples of CallCoordinator environment configurations.

Figure 1. Application Program Interface (API) MRO Support Structure (Non-Sysplex)

One AOR and one COR

Figure 2. The CallCoordinator MRO Environment

An AOR, a TOR, and a COR

Figure 3. A CallCoordinator Sysplex Environment

Two AORs and two CORs


LU 6.2 Support

   

The CallCoordinator APIs can also be invoked from a remote system (CICS, IMS(TM), RS/6000®, OS/2®, or any other platform/system) using LU 6.2/ CPIC mapped conversations. In order to accomplish this it is necessary to format a DTP record to consist of a header as follows:

DTP record

APINAME is the name of a CallCoordinator API., for example CAMI775C.
APICALEN is the length of the API Communications Data Area.

Figure 4. DTP record for COBOL

 01  DTP-RECORD-HEADER.
     05  TRANSID                      PIC X(04) VALUE 'V790'.
     05  APINAME                      PIC X(08).
     05  APICALEN                     PIC S9(4) COMP.

Figure 5. DTP record for Assembler

HEADER   DS    0H            ALIGN RECORD
TRANSID  DS    CL4'V790'     CICS TRANID OF BACKEND SERVER
APINAME  DS    CL8           NAME OF API TO LINK TO
APICALEN DS    H             LENGTH OF COMMAREA THAT FOLLOWS.

DTP record trailer

The API Communications Data Area then immediately follows the above header. The COBOL versions of these Communications Data Areas are shipped as source with CallCoordinator, so this can be accomplished by appending the COBOL version of the header with the following statement:

COPY CAMC775 REPLACING == 01 CAMC775-COMMAREA. ==
                    BY == 05 CAMC775-COMMAREA. ==.

To set the APICALEN field up correctly, the following COBOL statement could be used:

MOVE CAMC775-COMMAREA-LEN TO APICALEN.

where CAMC775 can be the name of any CallCoordinator API Communications Data Area.

For Assembler, write a DSECT that defines a data area that is exactly equivalent in layout to the COBOL copy book.

Having set up the DTP record as given above, issue the relevant LU 6.2/ CPIC verbs to complete the conversation.

The Conversation

Figure 6. Conversation held across the LU6.2 link with V790

      Remote system                CallCoordinator(V790)
      -------------                ---------------------
 
1.Allocate the conversation.
2.Send the DTP record
                                   3.Receive the DTP record
                                   4.Send the updated DTP rec.
5.Receive the updated DTP rec.
 
Below is an example where the COBOL application runs in a
CICS system CICSA and CallCoordinator runs on CICSB:
 
CICSA                                   CICSB(V790)
-----                                   -----------
1. EXEC CICS ALLOCATE
             SYSID(CICSB)
             NOHANDLE
   END-EXEC.
 
   MOVE EIBRSRCE TO SESS-NAME.
 
2. EXEC CICS CONVERSE
             SESSION(SESS-NAME)         EXEC CICS RECEIVE....
             FROM(DTPRECORD)            EXEC CICS LINK.......
             FROMLENGTH(DTPRLEN)        EXEC CICS SEND.......
             INTO(APICOMMAREA)          EXEC CICS FREE.......
             TOLENGTH(APICALEN)
END-EXEC.
 
(See Note 1. below)
 
3. EXEC CICS FREE
             SESSION(SESS-NAME)
   END-EXEC.
 

Notes:

  1. The application should check if the CONVERSE was satisfied by a syncpoint rather than the returned DTP record by checking EIBSYNC for a value of X'FF'. If syncpoint then an EXEC CICS SYNCPOINT followed by and EXEC CICS RECEIVE with the same INTO and TOLENGTH keywords as on the CONVERSE should be issued to receive the updated DTP record.

  2. The DTP record returned to the application does not incorporate the HEADER, but is the API Communications Data Area ONLY. That is why the TOLENGTH in the above example is coded as APICALEN and NOT DTPRLEN.

 Return to Library  Contents  Previous Topic  Top of Topic  Next Topic  Index  Help