I am just getting into mainframe development so excuse any ignorance, but is there a way to identify which map is being displayed or was last sent to the terminal?
For example, I have MAP1
& MAP2
in mapset MAPS
. The maps would alternate by the press of a PF key (PF7/PF8)
. On each map the user can enter a value to be evaluated by the program (SLCTOPTI)
. Is there a proper way to determine which map should be evaluated when receiving from the user?
Here's what I currently have to attempt this:
** some code before **
WHEN DFHENTER
+0103
%+0104 IF CURRENT-MAP-SCREEN = 1
%+0104 EXEC CICS RECEIVE
%+0104 MAP ('MAP1')
%+0104 INTO (MAP1I)
%+0104 RESP (WS-RESP)
%+0104 END-EXEC
%+0104 ELSE
%+0104 EXEC CICS RECEIVE
%+0104 MAP ('MAP2')
%+0104 INTO (MAP2I)
%+0104 RESP (WS-RESP)
%+0104 END-EXEC
%+0104 END-IF
+0103
%+0104 EVALUATE SLCTOPTI
+0103
%+0104 WHEN ' 1'
%+0104 WHEN '01'
%+0104 WHEN '1'
+0103
%+0104 MOVE 'XXXX' TO WS-START-TRAN
%+0104
%+0104 WHEN ' 2'
%+0104 WHEN '02'
%+0104 WHEN '2'
+0103
%+0104 MOVE 'XXXX' TO WS-START-TRAN
** some code after **
I'm not sure if this works yet, but I would like to know if there is already a command for this or a better way to do it.