You are on page 1of 3

Basic CICS Commands For Intercommunication Basic CICS Commands for Intercommuncation helps a programmer to understand the communication

between front-end transactions and back-end system.
1. ALLOCATE The front-end transaction (or program) uses this command to acquire an intercommunication session to the back-end system, which could be based on MRO or LU6.2 protocol. At the normal completion of this command, a conversation session will be allocated. Format: The format of the allocate command is as follows EXEC CICS ALLOCATE SYSID(name) [NOQUEUE] END-EXEC. SYSID: defines the system identifier of the back-end system. In sysid we mention the name of the bureau we want to connect. For example if we want to connect to TRW we mention ‘PTRW’. NOQUEUE: if NOQUEUE is specified, and if the session is not available, the control will be returned to the next statement after the allocate command. If noqueue is not specified, and if the session is not available, the session will be queued until the session becomes available. COMMON EXCEPTIONAL CONDITIONS: SYSBUSY: All sessions assigned to the specified system are in use. 2. CONNECT PROCESS This command is used by the front-end transaction to request the back-end system to initiate a ‘process’ in the back end system. After the normal completion of the command, the front-end transaction will be in the send state, and it can proceed transaction with the backend system. For CICS LU6.2 ISC, process simply means a CICS transaction. Format: EXEC CICS CONNECT PROCESS CONVID(name) PROCNAME(name) PROCLENGTH(data-value) SYNCLEVEL(data-value) END-EXEC. CONVID: conversation identifier to identify the conversation session. PROCNAME: defines the name of the process in the back end system. PROCLENGTH: defines the length of the process name. SYNCLEVEL: level of synchronization for resource recovery in case of abends.  0 – None  1 – Commit only meaning the conversation partners handle synchronization by themselves  2 – All meaning complete synchronization will take place through normal CICS syncpoint. For TRW the backend process is ‘MPA4’. And the SYNCLEVEL we use is 0, which means that we cannot recover the resources in case of abends. 3. SEND This command is used to send data to the other partner transaction during the conversation. The conversation identifier must be specified to identify the conversation session. Format:

EXEC CICS SEND CONVID(name) FROM(data-area) LENGTH(data-value) [WAIT] END-EXEC. CONVID: conversation identifier to identify the conversation session. WAIT: means that the data will not be sent immediately. 4. RECEIVE This command is used to receive data from the other partner transaction during the conversation. As usual the conversation identifier must be specified. Format: EXEC CICS RECEIVE CONVID(name) INTO(data-area) LENGTH(data-value) END-EXEC. 5. FREE This command is used to free i.e. terminate the conversation session. The conversation identifier must be specified to identify the conversation session to be freed. The FREE command can be specified in the front-end transaction or the back end transaction, as long as the transaction is in the Send State. Format: EXEC CICS FREE CONVID(name) END-EXEC. 6. CONVERSE This command performs the combined function of send & receive. The converse command sends data to the other partner transaction during the conversion, automatically switches the communication state from the send to the receive, to receive data from the back-end transaction. Format: EXEC CICS CONVERSE CONVID(name) FROM(data-area) FROMLENGTH(data-value) INTO(data-area) TOLENGTH(data-value) END-EXEC.

7. EIB INFORMATION During the conversation between the front end and back end transactions, provide conversation control information in the EXEC Interface Block. The following is some of the information:  EIBRSRCE: Used by the front-end transaction to identify the conversation identifier. At the completion of the ALLOCATE command by the front-end transaction, this field contains the conversation identifier. This value must be saved immediately so as to use it later with the CONVID parameter for conversation.

EIBFREE: This represents the status of the conversation session. If it is off (X’00’), the session is still on by the partner transaction. If this is on (X’FF’), the session has been terminated by the partner transaction. EIBRECV: This field represents the communication state. If this is off (X’00’), the transaction is in the send state, so that it can send data to the partner transaction. If this is on (X’FF’), this transaction is in the receive state, so that it can receive data from the partner transaction.