Begin session
This program prepares sessions for use by the FEPI sample application programs.
Module name | DFH0VZUC |
Transaction name | CZUC |
TS queue name | SESSION |
The CZUC transaction is started by FEPI when it begins a new session.
The conversation started by FEPI must be accessed so that FEPI knows that the event is being handled. The processing required depends on the data mode and type that the session uses (this is obtained from the start data), and whether the back-end system is IMS or CICS.
For SLU P mode (necessarily IMS), processing depends entirely on local requirements, and is typically used for handling security applications. For illustration purposes, this program gets and discards the initial data. Note that the setup for these samples does not specify a begin-session transaction for SLU P mode.
For SLU2 mode with CICS using formatted data, there is a CICS “good morning” message waiting. The message is received, and the back-end screen is cleared and ready for a transaction ID to be entered.
For SLU2 mode with CICS using data stream, there may be a “read partition” request waiting which requires a reply—for example, if your pool has device T3279Mx or TPS55Mx specified, or if the logon mode table being used has “extended data stream” specified). Then there is a CICS “good morning” message to be received. A reply is sent to any “read partition” query request, the “good morning” message is received, and the back-end screen is cleared and ready for a transaction ID to be entered.
For SLU2 mode with IMS, no processing is illustrated.
date time CZUC Begin session completed
RESP........0 RESP2.......0
Target......TGTNAME Node........NODENAME
Pool........POOLNAME
If any errors occur, a report is written to the TS queue, and the conversation is freed with the RELEASE option, so that the session is ended.
Program logic
Main procedure:
RETRIEVE start data
Access conversation using FEPI ALLOCATE with PASSCONVID
Call PROCESS-LUP, PROCESS-FORMATTED, or
PROCESS-DATASTREAM according to data mode and type
Free conversation, keeping session
Write event details to TS queue
RETURN
PROCESS-LUP routine:
FEPI RECEIVE initial data
Handle data as required
PROCESS-FORMATTED routine:
FEPI RECEIVE initial data
Clear back-end screen and make ready for transaction ID
to be entered, using FEPI CONVERSE
PROCESS-DATASTREAM routine:
FEPI RECEIVE
If 'read partition' query
FEPI CONVERSE query reply and get acknowledgment
FEPI RECEIVE initial data
Clear back-end screen and make ready for transaction ID
to be entered, using FEPI CONVERSE