Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
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    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

ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2360
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: 234

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

REXX Moderator


Joined: 13 Mar 2006
Posts: 1228
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts PA02 - Programmtically control attent... dodithegreat IMS DB/DC 1 Thu Apr 06, 2017 8:33 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us