Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 1243
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
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts How to Run Rexx Macro? Kalaivignesh CLIST & REXX 5 Fri Sep 01, 2017 9:08 pm
No new posts Return a Non Numeric value from REXX Learncoholic CLIST & REXX 3 Fri Sep 01, 2017 8:33 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us