Hi All ,
i am new to ISPF panels & REXX , so i apologise if this is a basic question....
i have a ISPF panel where i need to key some details & based on the data received i would process them...
I have a generic error traping module to be executed if any unexpected inputs are keyed.
Eventhough F3 is pressed in the panel , the program enters error trapping module instead of performing tasks mentioned under (KEYPRESS=PF03) . Can any one guide me where i am going wrong.
Below is my sample code..
SIGNAL ON ERROR NAME TRAP
PANELLIB='XXX.SAMPLE.PANEL'
ADDRESS ISPEXEC
"LIBDEF ISPPLIB DATASET ID('"PANELLIB"')"
ADDRESS ISPEXEC
"DISPLAY PANEL(TESTPAN)" /* TESTPAN & TESTPAN1 are the panels used in this program */
X=OPTION /* Option is the input value Keyed in the panel TESTPAN */
IF X=1 THEN DO
ADDRESS ISPEXEC
"DISPLAY PANEL(TESTPAN1)"
IF KEYPRESS=PF03 THEN DO
SAY 'Log off...'
EXIT
END
SAY 'Choosed ' OPTION1 /* OPTION1 is the value keyed by user in panel TESTPAN1 */
END
TRAP:
SAY 'ENTERED TRAP...Input Keyed is Unexpected'
EXIT
Once i press F3 after entering panel TESTPAN .. I am getting message like 'ENTERED TRAP... Input keyed is unexpected..' Instead of getting message ' Log Off'...