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
 

 

Using PF keys in ISPF

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
naveenvetrivel

New User


Joined: 15 May 2007
Posts: 8
Location: Bangalore

PostPosted: Tue Jun 26, 2007 10:07 pm    Post subject: Using PF keys in ISPF
Reply with quote

Hi,

Can anyone tell me how to use PF keys in a panel definition and in REXX program.

For example, if I have coded PF1 - Help PF3 - Exit PF10 - Process in the panel definition, what are all the things I need to do in REXX program to capture the Key pressed.
Back to top
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Tue Jun 26, 2007 11:58 pm    Post subject: Re: Using PF keys in ISPF
Reply with quote

How are the PF keys defined to the application?

If I were to run your application on my system, I use the following definitions for my PF keys:

PF1 = HELP
PF2 = SPLIT
PF3 = END
PF4 = EXIT
PF5 = FIND
PF6 = RFIND
PF7 = UP
PF8 = DOWN
PF9 = SWAP
PF10 = LEFT
PF11 = RIGHT
PF12 = RETRIEVE

Normally, if I code a panel, I think that there are two options - either go back to a previous panel or process, or go forward to the next panel or process. A standard ISPF service call to DISPLAY will generate a return-code of zero for a key-press of the ENTER key (i.e. go forward), or a return-code of 8 for either the END or EXIT commands (PF3 or PF4 in my case), i.e. go backward. If I were to enter LEFT or press PF10, I'd get an error because left-right scrolling is not allowed in panels.

I don't know if it's possible to assign ENTER to a PF key. I also don't know why you'd want to make it harder for a normal ISPF user to do their work when they're already used to using their own PF key defintions for their designated functions.
Back to top
View user's profile Send private message
naveenvetrivel

New User


Joined: 15 May 2007
Posts: 8
Location: Bangalore

PostPosted: Wed Jun 27, 2007 9:53 pm    Post subject: Re: Using PF keys in ISPF
Reply with quote

Hi Superk,

Thanks for your reply. I am taking about the user defined panels. One can define his own ISPF panel.

The context is, I have enter some values in my panel that I designed and for processing it will use a REXX program at the backend. I want only if the user press PF10 it should process the inputs entered and if the user press PF1, it should throw the help.

My question is how to capture the keys that user pressed in the program so that I can call some subroutines for processing.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4649
Location: Raleigh, NC, USA

PostPosted: Wed Jun 27, 2007 11:30 pm    Post subject: Re: Using PF keys in ISPF
Reply with quote

I don't know how to do what you're asking. I'm going to end my involvement with this quote from an ISPF expert:

Quote:

PF keys are nothing more than a means of typing a command on the command line and pressing enter. That means that resolution of the command is the same as if you typed it on the command line and pressed enter.

Commands are resolved by first looking at the command table for the the current application id, followed by the ISPCMDS command table with user command tables thrown into the mix if they are configured.

When a command other than ALIAS is processed from the command table, it is handled by ISPF and with few exceptions, your application never even sees it. For example SWAP, PRINT, LIST, RETRIEVE, etc are ISPF commands found in the command table that your program never sees. Others, such as the scrolling commands, END, and some others can sometimes be seen by the application in one way or another but not directly.

The way PF keys should work is that you define what commands in your application do, understanding that ISPF built in commands (actually anything in the command tables other than maybe scrolling and CANCEL) will not be handled by your code. Your application should respond to commands, never to specific PF keys. If you need to define your own set of default keys, create your own application id and start your application with the NEWAPPL keyword. Another option is KEYLISTs, though I personally hate keylists because they tend to make applications inconsistent even within the same application.

Why all this fuss? Because users should be able to, can and do redefine their keys, and because having the system handle the tasks that are not specific to any one application provides for a consistent user experience.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Fri Jul 06, 2007 8:01 pm    Post subject: Re: Using PF keys in ISPF
Reply with quote

Code for using PF keys in REXX.

ADDRESS "ISPEXEC"
"ISPEXEC VGET (ZPFKEY) ASIS"
IF ZPFKEY = 'PF03' THEN
DO
SAY 'exiting from the tool......'
EXIT(0)
END
ADDRESS "ISPEXEC"
"ISPEXEC VGET (ZPFKEY) ASIS"
IF ZPFKEY = 'PF04' THEN
DO
statements
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 PA02 - Programmtically control attent... dodithegreat IMS DB/DC 1 Thu Apr 06, 2017 8:33 pm
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts ISPF - How to come out of ISPF Panel parasmalik20 TSO/ISPF 5 Tue Feb 21, 2017 7:44 pm
No new posts Design of ISPF panel prino TSO/ISPF 2 Wed Jan 25, 2017 10:31 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm


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