Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Trapping keys on a REXX panel

Status
Not open for further replies.

SowKan

Technical User
Mar 18, 2004
24
IN
My requirement is when I press a PF1 key on the main panel, the helpanel should be displayed.
In my panel definition, I have coded the following:
)INIT
)PROC
VER (&MMBR,NB)
VER (&A,NB,LIST,1,2)
VER (&B,NB,LIST,1,2)
&KEY = .PFKEY
)END
And in my REXX code I have the following:
if KEY = "PF01" then
do
"ispexec libdef ispplib dataset id('MYREXX.rexx.test')"
"ispexec display panel(helpanel)"
end
But still the helpanel doesn't get displayed when I press a PF1 on the main panel.
I am not able to figure out what went wrong in this.
 
I'm not clear as to why you would want to do what you are doing the hard way. Wouldn't it be easier to assign the help panel to the main menu panel:

)BODY
Command =>_zcmd
)INIT
.HELP = HELPPAN
)PROC

I know this has been posted before. If you wish to continue with your method, you need to be looking for the appropriate command (i.e. HELP) being issued on the command line (check the value of the 'zcmd' variable). Relying on every user to have their PF1 key assigned to HELP is a risky assumption.
 
Thanks for the help, Kevin.
But can I give my own help panel to be displayed by doing it this way?
 
Yes.....just change

.HELP = HELPPAN

to say

.HELP = yourpanl <==== this should be the name of your help panel member name
 
SowKan, I don't mean to sound condescending, but have you even bothered to go through the ISPF Dialog development models, particually the PANFORM models? They are a valuable source of information, that you can easily CUT and PASTE into your ISPF libraries, especially when you need to construct a particular type of panel.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top