IMS to CICS using the RETRIEVE EXEC command

The following figure illustrates the general CICS® application program flow in asynchronous mode from IMS to CICS.

Figure 1. Application program flow using RETRIEVE from IMS to CICS
Begin figure. Program Flow: RETRIEVE, send to terminal (optional RETURN here), START (optional RETURN here), SYNCPOINT, RETURN. End figure.

Replies resulting from previous asynchronous input transactions and unsolicited asynchronous output from an IMS front-end to a CICS back-end are sent to CICS asynchronously (that is, with the ATTACH and SCHEDULER FM headers). When IMS is the front-end subsystem, asynchronous mode is the only flow supported. The CICS mirror transaction obtains the input, analyzes the incoming message, and schedules (using START) the transaction that is to be initiated as a result of the incoming DPN or the first four characters of the data. If this transaction is sending output to a terminal, the mirror transaction issues the START with the TERMID parameter (from the PRN parameter of the incoming FMH), so that the asynchronous transaction that is scheduled owns the terminal to which output is to be sent.

If a reply to IMS is required, the CICS application must wrap the incoming RTERMID and RTRANSID into the TERMID and TRANSID fields to be used in a subsequent START. These fields indicate, respectively, the destination LTERM or transaction within IMS and the IMS editor or MFS MID that is to receive the message. The START command to send this reply to IMS is processed.

If no reply to IMS is required, RETURN can be issued to terminate the session.