I am trying to write a ISPF popup panel to display messages. And when I will press PF3 or ENTER key, popup screen should be closed and control should return back to the main panel.
However, during debug I saw that popup panel is not identifying or capturing keystrokes for PF3 and ENTER. Could you please help me for this issue.
part of REXX code:
ARG R,DISDATE,DISTIME,KEY,RES,A,PDS,KEY1
DO UNTIL INVLD_OP = 0
INVLD_OP = 0
IF (KEY = PF03) THEN
DO
EXIT
END
SELECT
WHEN R = '1' THEN
DO
ADDRESS ISPEXEC
"DISPLAY PANEL(FLUPLDPN)"
"SETMSG MSG(ISRZ001)"
END
WHEN R = '2' THEN
DO
ADDRESS ISPEXEC
"DISPLAY PANEL(CPYILAPN)"
"SETMSG MSG(ISRZ001)"
IF (KEY = PF03) THEN
DO
EXIT
END
ELSE
DO
CALL VLD_CPY_DATA
CALL RTRV_GIB_ILA
END
END
OTHERWISE
DO
KEY1 = ' '
RES = ' '
MSG01 = 'PLEASE ENTER CORRECT OPTION'
"ADDPOP ROW(5) COLUMN(10)"
"DISPLAY PANEL(MSG001)"
"REMPOP"
INVLD_OP = 1
SAY KEY1
SAY RES
IF RES = ENTER THEN
DO
"DISPLAY PANEL(MSTRPNL1)"
"SETMSG MSG(ISRZ001)"
END
ELSE
DO
EXIT
END
END
END
END
popup ISPF panel
)ATTR
$ TYPE(OUTPUT) INTENS(HIGH) COLOR(GREEN)
~ TYPE(INPUT) INTENS(HIGH) COLOR(GREEN)
)BODY WINDOW(35,2)
$MSG01
)END
)PROC
&KEY1 = .PFKEY
&RES = .RESP
)END
$ TYPE(OUTPUT) INTENS(HIGH) COLOR(GREEN)
~ TYPE(INPUT) INTENS(HIGH) COLOR(GREEN)
)BODY WINDOW(35,2)
$MSG01
)END
)PROC
&KEY1 = .PFKEY
&RES = .RESP
)END
debug screen
93 *-* OTHERWISE
94 *-* DO
95 *-* KEY1 = ' '
>L> " "
96 *-* RES = ' '
>L> " "
97 *-* MSG01 = 'PLEASE ENTER CORRECT OPTION'
>L> "PLEASE ENTER CORRECT OPTION"
98 *-* "ADDPOP ROW(5) COLUMN(10)"
>L> "ADDPOP ROW(5) COLUMN(10)"
99 *-* "DISPLAY PANEL(MSG001)"
>L> "DISPLAY PANEL(MSG001)"
***
100 *-* "REMPOP"
>L> "REMPOP"
101 *-* INVLD_OP = 1
>L> "1"
102 *-* SAY KEY1
>V> " "
103 *-* SAY RES
>V> " "
104 *-* IF RES = ENTER
>V> " "
>L> "ENTER"
>O> "0"
109 *-* ELSE
110 *-* DO
111 *-* EXIT
***