Started tasks
If the access program is pseudoconversational, after sending data it issues a FEPI START command to name the transaction that FEPI is to start when inbound data arrives.
At this point the conversation becomes “unowned” and the first task can no longer use it. However, the conversation does not end; when data arrives, the conversation ID is passed to the started task and that task issues FEPI ALLOCATE with the PASSCONVID option to get ownership of the conversation. Only then can the started task use the conversation to receive the inbound data.
While the conversation is unowned, it can be acquired by any task that knows the conversation ID. Acquiring the connection cancels the pending start request, and the task that acquired ownership has to continue the conversation as if no FEPI START had been issued. This technique is useful in a pass-through application to a front-end terminal to handle contention between inbound data and terminal input. The application issues a FEPI START command, specifying the front-end terminal, and then returns to CICS specifying a ‘next’ transaction. Inbound data arriving first causes FEPI to start the transaction on the front-end terminal, which causes CICS to cancel its wait for terminal input; if terminal input arrives first, the application, after using EXEC CICS ASSIGN STARTCODE to determine why it was started, issues FEPI ALLOCATE with PASSCONVID which cancels the FEPI START request.
Getting ownership also applies to the tasks started by the various handlers. The conversation may have been started by some access program (end-session), or by FEPI itself (begin-session, unsolicited-data). Either way, you must still issue a FEPI ALLOCATE command with PASSCONVID, quoting the conversation ID, to get ownership and continue the conversation.
When a handler has finished processing, it must tell FEPI by issuing a FEPI FREE command for the conversation. For the begin-session handler, this should specify the HOLD option to indicate that the session is ready to be used; if RELEASE is used, the session is ended. The end-session and unsolicited-data handlers can use any of the options according to requirements.