View previous topic :: View next topic
|
Author |
Message |
Unique
New User
Joined: 10 Jul 2007 Posts: 24 Location: Blore
|
|
|
|
I have a panel in which
(a) I have to navigate to next panel when ENTER is pressed.
(b) PF3 to exit.
(c) PF12 to go back.
Using this forum, I was able to get the idea of using PFKEY using .ZPFKEY
But the PFKEY is not handling as I wanted. Also, I don't know how to use ENTER. |
|
Back to top |
|
|
saiprasadh
Active User
Joined: 20 Sep 2006 Posts: 154 Location: US
|
|
|
|
Hi Unique,
Can you post your Panel definition and the Rexx code.
Thanks
Sai |
|
Back to top |
|
|
Unique
New User
Joined: 10 Jul 2007 Posts: 24 Location: Blore
|
|
|
|
In my panel, code is
)BODY
%COMMAND ===>_ZCMD
%
% !Msg
% Enter => NEXT PF3 => Exit PF12 => Previous
)PROC
&KEY = .PFKEY
)END
and in the program, I have coded
"ispexec libdef ispplib dataset id('tsa9z.zarina.rexx.panels')"
"ISPEXEC DISPLAY PANEL (@Test2
if RC¬= 0 THEN
DO
IF KEY='PF03' THEN EXIT
ELSE
"ISPEXEC DISPLAY PANEL (@panel3"
END
ELSE
IF KEY='PF12' THEN
"ISPEXEC DISPLAY PANEL (@panel3"
ELSE
< I need to display INVALID KEY PRESSED in the same panel
But dont know how to do that >
END
Thanks
Unique |
|
Back to top |
|
|
ironmike
New User
Joined: 07 Aug 2005 Posts: 33
|
|
|
|
ENTER is handled like this, in the )PROC section of the panel:
Code: |
IF (.RESP = ENTER)
&ENTKEY = YES |
.RESP can be either ENTER or EXIT; EXIT would also handle your PF3 case. The panel code above sets the variable ENTKEY to YES if the user hits ENTER.
You display INVALID KEY PRESSED in the same panel by using the SETMSG service to set a message variable, then you DISPLAY the panel again, like this:
Code: |
zedsmsg = '';
zedlmsg = 'INVALID KEY PRESSED";
"ISPEXEC "SETMSG MSG(ISRZ000)"
"ISPEXEC DISPLAY PANEL(@panel3)"
|
You need to do some more work on this; READ THE ISPF MANUALS before you ask questions of others... |
|
Back to top |
|
|
Unique
New User
Joined: 10 Jul 2007 Posts: 24 Location: Blore
|
|
|
|
Hi,
This is how i solved .Its working for me .
I defined all PFKEY
ZPF03 = 'END'
ZPF12 = 'CANCEL'
"VPUT (ZPF03 ZPF12) PROFILE"
"ISPEXEC DISPLAY PANEL (@MAIN)"
Select
when Key = ' ' , Enter key is pressed
when Key = 'PF12' , Cancel logic
when Key = 'PF03' , Exit Logic
Any Suggestions/comments are welcome
Thanks |
|
Back to top |
|
|
|