Aneesh New User Joined: 30 Sep 2006 Posts: 60
While accepting user inputs at an ISPF panel display, how can we identify the function key(PF key) that was pressed by the user?
Currently i am using the ZCMD value to control the flow of the application:
WHEN ZCMD = '1' THEN
display panel 2
I need to perform the same function when user presses a particular PF key. How can we do this?
Thanks in advance.
ofer71 Global Moderator Joined: 27 Dec 2005 Posts: 2360 Location: Israel
Kevin Active User Joined: 25 Aug 2005 Posts: 234
Aneesh, I'm curious to know what is gained by knowing what PF key was pressed, and where that sort of information would be used?
Thinking of a standard ISPF panel display, the user is typically limited to which PF keys (and their corresponding commands) can be processed by ISPF: HELP, SPLIT, END, RETRIEVE, SWAP or just ENTER. What difference does it make which PF key is used as long as the end result is the same?
Marso REXX Moderator Joined: 13 Mar 2006 Posts: 1284 Location: Israel
You may want to add other functions to the panel, like SUBMIT, SAVE, VIEW or anything like that.
I usually use keys between PF13 and PF24 to do that.
I override the original key value. It is necessary because some key values (like UP, DOWN, LEFT, RIGHT) are processed by ISPF and are not returned to the REXX program:
ZPF18 = "ZOOM"
Address ISPEXEC "VPUT (ZPF18)"
In the panel I pass the PFKey that was hit:
&PFKEY = .PFKEY
And in the REXX program I ask which key was hit:
Address ISPEXEC "DISPLAY PANEL(mypanel)"
If RC <> 0 Then Call Finish_Process
If PFKEY = 'PF18' Then Call Submit_Job
All times are GMT + 6 Hours