View previous topic :: View next topic
|
Author |
Message |
ragshere
New User
Joined: 20 Dec 2004 Posts: 70
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
ragshere
New User
Joined: 20 Dec 2004 Posts: 70
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
ragshere
New User
Joined: 20 Dec 2004 Posts: 70
|
|
|
|
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 |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
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 |
|
|
ragshere
New User
Joined: 20 Dec 2004 Posts: 70
|
|
|
|
Thanks Marso.. |
|
Back to top |
|
|
|