How to Write Logic for Screen Navigation in CICS

In CICS program, screen logic is popular. That means when user enters data the next step is how to process it. Here are guidelines of how to write screen logic.

CICS is OLTP. Like web application, it takes input from the screen and gives back output. Apart from this, you can navigate to other screen from the main screen. This is called screen navigation.

Stage 1:

We need to do mapping design as a first task.

Stage 2:

In the application program we can process it by using Handle Aid:

source: Publib

The following example shows a HANDLE AID command that specifies one label for the PA1 key, and a second label for PA2 and PA3, all the PF keys except PF10, and the CLEAR key. If a PF10 AID is received, control returns to the application program at the instruction that immediately follows the input command.

 

EXEC CICS HANDLE AID PA1(LAB1) ANYKEY(LAB2) PF10

If a task is initiated from a terminal by means of an AID, the first RECEIVE command in the task does not read from the terminal but copies only the input buffer, so that control can be passed by means of a HANDLE AID command for that AID.

The EIBAID field in the EXEC Interface Block (EIB) holds a code for the attention identifier that is associated with the last terminal control or Basic Mapping Support (BMS) input operation. To simplify testing the contents of the EIBAID field in your application program, CICS® provides a copy book that contains a list of symbolic names that are associated with the attention identifier constants. 

References:

Link1

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.