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
 

 

Reading function keys

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Wed May 31, 2006 11:56 pm    Post subject: Reading function keys
Reply with quote

Hi,
I am writing a rexx exec for accessing ISPF panels.
Can anyone can share a sample code about using and reading function keys from ISPF to rexx.

I mean I want to verify in rexx about the function key pressed on the panel and need to take certain action..

Thanks in advance,
Rags
Back to top
View user's profile Send private message

superk

Moderator Team Head


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

PostPosted: Thu Jun 01, 2006 12:10 am    Post subject: Re: Reading function keys
Reply with quote

I don't get what you're trying to do here.

ISPF panels intrinsically understand most of the basic ISPF commands, such as:

HELP
END
UP/DOWN (if designed to be scrollable)
<Enter>
PRINT
CANCEL
SPLIT/SWAP (these two can be programatically disabled)

Outside of these standard functions, most panels usually incorporate pre-determined menu options for other actions.
Back to top
View user's profile Send private message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Thu Jun 01, 2006 7:32 am    Post subject: Re: Reading function keys
Reply with quote

Superk,

I want to invoke(display) a panel if the user presses specific function key on another panel. I want read the function key which was pressed on the panel, and verify it in rexx and display different panel.

I think we can overwrite the command for the function keys right?
I want to use F6 or F4 for my panels ...I guess they will not invoke any ISPF command like UP/DOWN.

Please advice.

Regards
Rags
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1226
Location: Israel

PostPosted: Thu Jun 01, 2006 2:19 pm    Post subject:
Reply with quote

In the panel definition:
Code:
)PROC
   &PFKEY = .PFKEY

Then in the REXX:
Code:
    "DISPLAY PANEL(mypanel)"
    If RC > 4 Then
        Call PF3_WAS_HIT
    If PFKEY = 'PF05' Then
        Call PF5_WAS_HIT


Notes:
  • As Superk said, some functions like UP/DOWN/RIGHT/LEFT/SPLIT/SWAP are processed by the panel itself (the REXX is not entered)
  • Using KEYLISTS to redefine the PFKeys is not obvious at all.
  • If you must, it is safer to use the PF13-PF24 keys so it does not interfere with standard definitions.

To change the keys assignements,
Code:
    "VGET (ZPF16)"
    SavePF16 = ZPF16
    ZPF16 = "mycmd"
    "VPUT (ZPF16)"

Don't forget to restore at the end:
Code:
    ZPF16 = SavePF16
    "VPUT (ZPF16)"
Back to top
View user's profile Send private message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Fri Jun 02, 2006 2:14 pm    Post subject: Re: Reading function keys
Reply with quote

Marso,
Thanks for your reply...
I want to know that where should i use (in rexx or in panel definition) the code for changing key assignments.


Regards
Rags
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1226
Location: Israel

PostPosted: Sun Jun 04, 2006 3:12 pm    Post subject:
Reply with quote

The code for key assignement and restore goes into the REXX program.
In the example, I assumed "Address ISPEXEC" has been executed somewhere before.
Back to top
View user's profile Send private message
ragshere

New User


Joined: 20 Dec 2004
Posts: 70

PostPosted: Mon Jun 05, 2006 1:59 pm    Post subject: Re: Reading function keys
Reply with quote

Thanks Marso..
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Check System time(Minute) Using TIME1... balaji81_k DFSORT/ICETOOL 5 Fri Nov 11, 2016 10:53 am
No new posts Strange EXEC function call in z/VM Willy Jensen CLIST & REXX 3 Wed Oct 05, 2016 2:07 pm
No new posts Reading data from PS file and send it... rajatbagga All Other Mainframe Topics 18 Fri Sep 23, 2016 12:51 pm


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