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

How to handle PFkeys


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

Active User


Joined: 26 Nov 2008
Posts: 125
Location: chennai

PostPosted: Tue Dec 02, 2008 10:10 am
Reply with quote

I am displaying ISPF pannel through rexx code. but when user press enter key control is returning to rexx code after the next line of the display pannel statement. Now i would like to handle PFkeys in the rexx code. Not sure this topic has to be discussed in rexx or ispf.

more over can we handle PFkeys in ISPF pannel definition itself, if so kindly let me know.

thanks alot in advance
Back to top
View user's profile Send private message
MBabu

Active User


Joined: 03 Aug 2008
Posts: 400
Location: Mumbai

PostPosted: Tue Dec 02, 2008 11:14 am
Reply with quote

You should never check for specific keys. You should check for the function the user wants to perform because ISPF users can, and often do change PF keys.

For built in functions like END, check the DISPLAY return code. For scrolling and some other things, check the ZVERB variable. There may be other things you need to do to enable other variables like ZSCROLLN and others.

If you need your own specific functions, use your own application id or keylist to assign a default set of values to PF keys. Then in the Rexx, check the variable you are using as a command line, usually ZCMD, for those values.

NEVER use the ZPFxx variables or check for specific keys. If you do you will usually need to change the default ISPF keys just to intercept specific keys and you can very easily seriously harm your users' entire ISPF setup, you will probably break split screen, and you will lock your users into doing things your way instead of the way they prefer.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Tue Dec 02, 2008 10:08 pm
Reply with quote

Well said!
Back to top
View user's profile Send private message
ManojLenkaMainframes

New User


Joined: 22 May 2008
Posts: 14
Location: Chennai,India

PostPosted: Sun Dec 07, 2008 2:04 pm
Reply with quote

We can do it in ISPF
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun Dec 07, 2008 5:34 pm
Reply with quote

Hello,

Quote:
We can do it in ISPF
Do you have a question or are you trying to add some information?

The intention of your post is not clear.
Back to top
View user's profile Send private message
nkothako

Active User


Joined: 26 Nov 2008
Posts: 125
Location: chennai

PostPosted: Mon Dec 15, 2008 11:24 am
Reply with quote

Please provide links or code to handle ISPF pannel PFKEYS through rexx pgm

Ex: would like handle PFkeys through REXX when ever user try to press any PFkeys in displayed ispf pannel
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Mon Dec 15, 2008 10:24 pm
Reply with quote

It depends on the setting of the PFKey. If it is set to 'SPLIT' (or other ISPF commands), they will be handled by ISPF. If it an unknown command, your rexx program will get control.

After the panel ends and your rexx gets control again, you will have to check ZCMD to see what command was entered.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Wed Dec 17, 2008 3:06 am
Reply with quote

Quote:
If it an unknown command, your rexx program will get control.

I should add that you can create your own command table and have some ISPF commands ignored by ISPF so that your application program sees them.

Use ISPF option 3.9 to create an application command table.
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 DFSORT to handle in between specific ... DFSORT/ICETOOL 6
No new posts HANDLE AD2R CICS ABEND CICS 4
No new posts How to handle NULL in COBOL program COBOL Programming 8
No new posts How to handle different file length b... DFSORT/ICETOOL 15
No new posts hot to get details when "EXEC CI... CICS 11
Search our Forums:

Back to Top