View previous topic :: View next topic
|
Author |
Message |
alexma
New User
Joined: 26 Feb 2009 Posts: 8 Location: Brazil
|
|
|
|
Hi, This is my first time that I'm trying to create a REXX program using ISPF Panel. I've been got some problems to setup PFKEY on specific panel (showing with "addpop" ispexec command). My Panel Source is:
)ATTR
> type(TEXT) intens(HIGH) skip(OFF)
< type(TEXT) intens(LOW) skip(OFF)
# type(OUTPUT) intens(LOW) caps(OFF)
@ type(INPUT) intens(LOW) caps(OFF)
)BODY smsg(MSG) lmsg(MSG) window(61,22)
< WebSphere MQ Tools for z/OS - V1.0 <WMQTP001
<
< COMMAND:@Z <
<
< >Local Queues Curdepth<
<
< >Queue Name< >Curdetph<
> ------------------------------------------------ --------
#Z < #Z <
#Z < #Z <
#Z < #Z <
#Z < #Z <
#Z < #Z <
#Z < #Z <
#Z < #Z <
#Z < #Z <
#Z < #Z <
#Z < #Z <
<
< #MSG
<
< F3=Return PF5=Refresh#Z #Z
)INIT
.zvars = '(ZCMD Queue1 CurD1 Queue2 CurD2 Queue3 CurD3 +
Queue4 CurD4 Queue5 CurD5 Queue6 CurD6 Queue7 CurD7 +
Queue8 CurD8 Queue9 CurD9 Queue10 CurD10 F7 F8)'
)PROC
&pfkey = .pfkey
)END
My REXX invocation panel is:
ShowPanel:
/*--( Display PANEL )-------------------------------------------------*/
call FirstPage
trace I
address ISPEXEC
"vget (ZPF07 ZPF08) profile"
zpf07_save = zpf07
zpf08_save = zpf08
/* pfkey = ' ' */
zpf07 = 'Bkwd'
zpf08 = 'Fwd'
"vput (zpf07 zpf08) profile"
"addpop"
do forever
select
when pfkey = 'PF03' | pfkey = 'PF15' then leave
when pfkey = 'PF05' | pfkey = 'PF17' then do
call SendWMQCmd
call FirstPage
end
when pfkey = 'PF07' | pfkey = 'PF19' then
call BkwdPage
when pfkey = 'PF08' | pfkey = 'PF20' then
call FwdPage
when substr(pfkey, 1, 2) = 'PF' then do
message = 'WMQTE002'
call SendPanel
end
otherwise nop
end
call SendPanel
end
"rempop"
zpf07 = zpf07_save
zpf08 = zpf08_save
"vput (ZPF07 ZPF08) profile"
return;
SendPanel:
/*--( Display PANEL )-------------------------------------------------*/
address ISPEXEC
if message /= '' then
'setmsg MSG('message')'
'display panel(WMQTP001)'
message = ''
return;
PF3 key and ENTER are working fine but when I press any PFKEY I've been received "Command is not active" message. My question is: How I can receive which PFKEY I'm choosing on panel?
I realy appreciate any response.
Thanks in advance,
Alexandre |
|
Back to top |
|
|
MBabu
Active User
Joined: 03 Aug 2008 Posts: 400 Location: Mumbai
|
|
|
|
Words of advice. Never check for a specific PF key. Also, never change the PF keys using the ZPFKEY variables.
Use return codes from DISPLAY and check for commands in the command line. If you need PF keys to send specific commands to your program look at either keylists or using your own application id (applid) to create custom PF key settings. It is a little complicated to get custom PF keys but if you do it wrong, like setting keys in the default applid profile, your users will be a very unhappy lot. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
You should not be checking which key was pressed. You should check the command they represent. For example, if the user changes the value of PF7 to be 'BKWD', they you should check for ZCMD to be 'BKWD'.
If you want to have your own PF key definition, you need to start your application with a four character APPLID. If you pick an applid of 'usr1' for example, in your ISPTLIB dataset you need to provide an usr1KEYS member.
Alternatively, you can create a keylist and refer to the keylist from the panel definition.
But please do not change the keys from within your program. They may also affect any split screen applications. |
|
Back to top |
|
|
alexma
New User
Joined: 26 Feb 2009 Posts: 8 Location: Brazil
|
|
|
|
Mabu, thanks for your explanation. How I can get which PFKEY was pressed from ISPF panel? When PF3 is pressed the REXX program receive this information, but when another PFkey is pressed the REXX program was not activated to receive this information. The ISPF panelo disply the error message described on my initial text.
Gest regards, |
|
Back to top |
|
|
alexma
New User
Joined: 26 Feb 2009 Posts: 8 Location: Brazil
|
|
|
|
Pedro, I created a new keylist and it's working fine to me. Thanks for your help. Do you know how I can specify my own ISPTLIB dataset to store my keylist? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Use ISPDTLC to create your keylist. The setup there should put it into a dataset.
Here is an example of the DTL.
Code: |
<:doctype dm system(
)>
<KEYL
NAME=ABCDKY01>
<KEYI KEY=F1 CMD=HELP FKA=no>Help
<KEYI KEY=F12 CMD=CANCEL FKA=no>Cancel
<KEYI KEY=F13 CMD=HELP FKA=no>Help
<KEYI KEY=F24 CMD=CANCEL FKA=no>Cancel
</KEYL> |
1. Allocate a PDS or use as ISPTLIB.
2. LIBDEF to that PDS |
|
Back to top |
|
|
alexma
New User
Joined: 26 Feb 2009 Posts: 8 Location: Brazil
|
|
|
|
Hi Pedro, I have good news! After some problems with DTL convert utility my PF map was generated and it's working fine!
I really appreciate your help! Thanks a lot.
Best regards,
Alex |
|
Back to top |
|
|
|