i have few questions regarding cics screens.
1,if i have 10 fields in the cics screen how can i find my cursor in the 6th field as soon as i enter into the screen?
2,which EIB field will tell that whether we are entering into the screen for the first time or not?if it is not
the EIB field what other will tell that?
Joined: 03 Nov 2006 Posts: 87 Location: Plymouth, MN USA
You may use following to check CURSOR position:
DIVIDE EIBCPOSN BY 80 GIVING WS-ROW REMAINDER IN WS-COL.
ADD 1 TO WS-ROW.
ADD 1 TO WS-COL.
Now, WS-ROW contains the ROW number and WS-COL contains the Column number of the cursor. You can manipulate it as per your requirement.
80 is maximum column number of screen. You may change it in accordance to your screen size.
Generally people use EIBCALEN for checking whether its first time or not. It's value is 0 if first time. It represents the length of COMMAREA. Thus once you processing is complete move some data to commarea to change EIBCALEN.