CICS using EIBCPOSN to select an item on a map without typing
I think I know of a solution to your cursor selection question.
There is an option that can be set in the DFHMSD macro of the map
(this macro is at the top of the map definition). This option is
CURSLOC=YES. This option will allow the 'A' map attribute to
indicate the cursor is in the map field. In order to check the 'A'
attribute you need to move the 'A' attribute to DFHBMFLG. DFHBMFLG is
a field in the DFHBMSCA copybook. There are two 88 level variables
under DFHBMFLG. They are DFHCURSR and DFHERASE. You can check the
DFHCURSR flag to see if the cursor is in the particular map field.
Example:
MOVE MFIELDA TO DFHBMFLG (MFIELDA is an example map field)
IF (DFHCURSR)
THEN
SET WS-CURSOR-ON-MAP-FIELD TO TRUE
END-IF
You will need to change any references to DFHBMEOF to DFHERASE. This
is because the cursor indicator and the Erase EOF indicator are
sharing the "A" attribute.
Also, MAPFAIL does not occur when receiving the map and nothing has
been typed on the screen. This may require some minor changes in
processing.
I hope this helps.