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
 

 

REXX and Panel PFKEY problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
alexma

New User


Joined: 26 Feb 2009
Posts: 8
Location: Brazil

PostPosted: Thu Jul 16, 2009 8:05 pm    Post subject: REXX and Panel PFKEY problem
Reply with quote

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
View user's profile Send private message

MBabu

Active User


Joined: 03 Aug 2008
Posts: 401
Location: Mumbai

PostPosted: Thu Jul 16, 2009 8:24 pm    Post subject: Reply to: REXX and Panel PFKEY problem
Reply with quote

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
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2038
Location: Silicon Valley

PostPosted: Thu Jul 16, 2009 9:18 pm    Post subject: Reply to: REXX and Panel PFKEY problem
Reply with quote

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
View user's profile Send private message
alexma

New User


Joined: 26 Feb 2009
Posts: 8
Location: Brazil

PostPosted: Thu Jul 16, 2009 9:20 pm    Post subject: Reply to: REXX and Panel PFKEY problem
Reply with quote

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. icon_sad.gif

Gest regards,
Back to top
View user's profile Send private message
alexma

New User


Joined: 26 Feb 2009
Posts: 8
Location: Brazil

PostPosted: Thu Jul 16, 2009 9:58 pm    Post subject: Reply to: REXX and Panel PFKEY problem
Reply with quote

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
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2038
Location: Silicon Valley

PostPosted: Fri Jul 17, 2009 3:29 am    Post subject: Reply to: REXX and Panel PFKEY problem
Reply with quote

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
View user's profile Send private message
alexma

New User


Joined: 26 Feb 2009
Posts: 8
Location: Brazil

PostPosted: Fri Jul 17, 2009 7:40 am    Post subject: Reply to: REXX and Panel PFKEY problem
Reply with quote

Hi Pedro, I have good news! After some problems with DTL convert utility my PF map was generated and it's working fine! icon_biggrin.gif

I really appreciate your help! Thanks a lot.

Best regards,
Alex
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 -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am
No new posts Problem reading GTF trace output danik56 ABENDS & Debugging 7 Thu Mar 16, 2017 1:02 pm


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