IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Handling PF keys in REXX


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Aneesh

New User


Joined: 30 Sep 2006
Posts: 60

PostPosted: Sat Oct 28, 2006 10:13 am
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
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Sun Oct 29, 2006 11:14 am
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: 234

PostPosted: Mon Oct 30, 2006 9:09 pm
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

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Mon Oct 30, 2006 9:48 pm
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top