View previous topic :: View next topic
|
Author |
Message |
sreejith2612
New User
Joined: 25 Jun 2007 Posts: 8 Location: India
|
|
|
|
I designed a panel. I need to differentiate between PF03 and ENTER keys. PF03 works fine by using the logic 'fkey='PF03'. Need to map ENTER key to process and all other PF keys to be made as invalid keys.
In a previos post by someone, I found that PF03 gives RC of 8 whereas ENTER '0'. But the RC for ENTER as well as PF03 is '0' as far as I could see. Please let me konw what can be done. |
|
Back to top |
|
|
Srihari Gonugunta
Active User
Joined: 14 Sep 2007 Posts: 295 Location: Singapore
|
|
|
|
Code: |
"ispexec vget (zpfkey) asis"
if zpfkey='PF03' then do
stmt1
end;
else do
stmt2
end; |
After displaying the panel, If PF3 is pressed then stmt1 is executed and If pf3 is not entered it is considered as ENTER. you can achieve all the pf key handling with this if-else if logic, I believe.
I am not sure of handling the ENTER key explicitly. |
|
Back to top |
|
|
sreejith2612
New User
Joined: 25 Jun 2007 Posts: 8 Location: India
|
|
|
|
Hi,
Thx for the reply. This works fine but we cant differentiate between PF keys other than PF03 (say PF04) and ENTER because the same statement gets executed when (say) PF04 and ENTER are pressed.
Regards,
Sreejith. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Once again, I need to ask why you want to do this.
When you use the DISPLAY service for a panel, there are only two normal return-codes that you need to deal with: RC=0 or RC=8.
When you call the DISPLAY service, and then press the ENTER key, the DISPLAY service ends with RC=0. When you call the DISPLAY service, and then enter an END or EXIT or RETURN command, then the DISPLAY service ends with RC=8.
Since each TSO/ISPF user has the option to specify which PF keys are mapped to which commands, then it doesn't make logical sense to look for specific PF keys to be pressed, when all that's really important is what command they issue, and what return-code that command generates back to the dialog. |
|
Back to top |
|
|
|