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

Reading function keys


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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

Global Moderator


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

PostPosted: Thu Jun 01, 2006 12:10 am
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
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: 1353
Location: Israel

PostPosted: Thu Jun 01, 2006 2:19 pm
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
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: 1353
Location: Israel

PostPosted: Sun Jun 04, 2006 3:12 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Calling an Open C library function in... CICS 1
No new posts DATE2 function SYNCSORT 15
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts Use input file with OMIT rcd keys? DFSORT/ICETOOL 15
No new posts Help on PL/I jsonPutValue function PL/I & Assembler 8
Search our Forums:

Back to Top