Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Handling PF keys in REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
Author Message
Aneesh

New User


Joined: 30 Sep 2006
Posts: 38

PostPosted: Sat Oct 28, 2006 10:13 am    Post subject: Handling PF keys in REXX
Reply with quote

Hi,

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.
Back to top
View user's profile Send private message
References
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 1930
Location: Israel

PostPosted: Sun Oct 29, 2006 11:14 am    Post subject:
Reply with quote

You can use the .PFKEY control variable of the panel.

You might want to read a little about all the available ISPF System Variables that hold information about function keys.

O.
Back to top
View user's profile Send private message
Kevin

Active User


Joined: 25 Aug 2005
Posts: 255

PostPosted: Mon Oct 30, 2006 9:09 pm    Post subject: Re: Handling PF keys in REXX
Reply with quote

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?
Back to top
View user's profile Send private message
Marso

Senior Member


Joined: 13 Mar 2006
Posts: 325
Location: Israel

PostPosted: Mon Oct 30, 2006 9:48 pm    Post subject:
Reply with quote

Hi Kevin,
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:
Code:
ZPF18 = "ZOOM"
Address ISPEXEC "VPUT (ZPF18)"

In the panel I pass the PFKey that was hit:
Code:
)PROC
  &PFKEY = .PFKEY

And in the REXX program I ask which key was hit:
Code:
Address ISPEXEC "DISPLAY PANEL(mypanel)"
If RC <> 0 Then Call Finish_Process
If PFKEY = 'PF18' Then Call Submit_Job
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1