SLU P one-out one-in
This sample program demonstrates using FEPI to obtain information from a back-end IMS system, using SLU P mode and the FEPI CONVERSE command with the POOL option.
Module names | DFH0VZPS, DFH0AZPS |
Transaction name | CZPS |
Map names | DFH0MZ4, DFH0MZ8 |
On the first invocation of the program, a map is sent to the front-end terminal.
When there is input from the front-end terminal, CICS reinvokes the program. A simple inquiry is made to the back-end system—for illustration purposes, it asks the time—and the answer is displayed on the front-end terminal. Because the inquiry requires only a one-out one-in exchange with the back-end system, a temporary conversation can be used, so the FEPI CONVERSE command with the POOL option is used.
When PF3 or CLEAR is received from the front-end terminal, the transaction ends. If there is an error, the front-end map is reset. These situations are detected using HANDLE CONDITION.
If the back-end system sends an IMS message, it is sent on to the front-end terminal and the transaction ends.
For clarity, error checking is minimal except for the FEPI commands.
Program logic
MAIN procedure:
Test COMMAREA
If transaction not previously invoked
Call SEND-NEW-MAP
Set up exception condition handling:
Map error - SEND-NEW-MAP
CLEAR/PF3 - END-PROG
RECEIVE MAP from front-end terminal
Build SLU P data stream to request time from back-end IMS
system
FEPI CONVERSE to send data stream to the back-end and get
the message containing the time
If IMS message received from back-end system
SEND message to front-end terminal
RETURN
Build data for front-end terminal map
SEND map data to front-end terminal
RETURN TRANSID(CZPS) with COMMAREA
SEND-NEW-MAP routine:
SEND new map
RETURN TRANSID(CZPS) with COMMAREA
END-PROG routine:
Clear front-end terminal
RETURN