The samples form an integrated set. The setup program provides the FEPI resource definitions that the other samples use. The monitor and the various handlers support and complement the access programs, to form a complete FEPI communication package, just as you need to provide. Remember, however, that these are samples designed for illustration purposes. Although they give a great deal of help, and include suggestions about writing FEPI programs, for any particular circumstance you must consider exactly what your requirements are.
The two back-end programs (one for CICS® and one for IMS™) provide applications for the front-end programs to access. The back-end CICS program is for access by the front-end SLU2 mode programs, and the back-end IMS program is for access by the front-end SLU P mode programs; no SLU2 mode access to IMS is provided. Although the back-end programs are supplied in source form, it is not necessary for you to understand the internal logic--only the external operations, as is the case for a "real" existing back-end application.
The FEPI sample front-end and back-end transactions assume that the datastream sent from the back-end application is received unaltered by the front-end application. For example, FEPI samples may perform unexpectedly if the datastreams are compressed after having been sent from the back-end application.
This program is the CICS back-end application used by the FEPI sample programs.
Module name: DFH0AZBC
Transaction name: CZBC
Abend code: USZA
Map name: DFH0MZ3
CZBC Customer Inquiry Please type a customer number in the range 1 to 9999, then Enter. Customer Number . . . . . Name . . . . . : Balance. . . . : Address. . . . : Last Transaction Date . : F3=EXIT to CICS
On the first invocation of the transaction, a map is sent to the terminal.
When there is input from the terminal, CICS invokes the transaction again. The customer data for the customer number from the input is found and sent to the terminal, and further input is awaited. PF3 or CLEAR ends the transaction.
Certain customer numbers cause special processing such as abends and delays, to show how a front-end application could manage such events. The valid customer numbers are:
Main procedure:
Set up exception condition handling:
Map error - SEND_NEW_MAP
CLEAR/PF3 - END_PROG
Test COMMAREA
If transaction not previously invoked
Call SEND_NEW_MAP
RECEIVE map
If customer number not valid
SEND message
RETURN
If customer type is 'ABEND before MAP'
ABEND
Build map with customer data
If customer type is 'LONG DELAY'
DELAY
SEND map
If customer type is 'ABEND after MAP'
ABEND
RETURN
SEND_NEW_MAP routine:
SEND new map
RETURN
END_PROG routine:
Clear terminal
RETURN
This program is the IMS back-end application used by the FEPI sample programs.
Module name: DFH0AZBI
Transaction name: CZBI
This is a simple IMS back-end response mode program that is driven by input from a front-end FEPI application. It modifies the time stamp in the input message and returns the message to the front-end application.
IMS schedules this transaction when an input message is queued for it. It addresses the I/O PCB, DLI call function, and I/O area to build the parameter list for the GU call to retrieve the queued input message.
The time field of the input message is updated and the program then issues an ISRT call to place the message on the output queue. IMS then sends the output message to the front-end FEPI application.
Output messages from this program are all prefixed with a 5-byte function management header.
If any errors occur, the program ends with a nonzero return code.
GETMAIN storage areas for reentrancy
Address PCB
Issue GU call to get input message
Use TIME to obtain system time
Update I/O area
Issue ISRT call to send output message
RETURN
[[ Contents Previous Page | Next Page Index ]]