You can develop CICS programs, especially menus in the way mentioned below. Any menu driven program should have 3 layers of logic:
- Presentation Logic ==> 3270 Terminals
- Business Logic ==> COBOL programs
- Data Logic ==> Data bases IMS DB/DB2
3 Commands that you need for CICS Menu programs logic
- EXEC CICS Send command to send data to 3270 terminal
- EXEC CICS Receive command to receive data from 3270 terminal
- EXEC CICS Return command to exit from CICS program
The communication can happen in CICS through DFHCOMMAREA and CHANNEL
Link and XCTL to call sub programs
- EXEC CICS LINK (CICS to CICS, can be remote)
- EXEC CICS XCTL (CICS to CICS)
Related: List of Menu Navigation Commands in CICS
Sample Logic how to handle Menus:
PROCEDURE DIVISION EVALUATE TRUE WHEN EIBCALEN = 0 Send Initial MAP WHEN EIBAID = DFHENTER Process Screen Data WHEN EIBAID = DFHPF3 or DFHPF12 Exit Program WHEN OTHER Invalid key END-EVALUATE