View previous topic :: View next topic
|
Author |
Message |
POOJA KHADE
New User
Joined: 28 Dec 2006 Posts: 15 Location: mumbai
|
|
|
|
Can any body help me how to call second panel in REXX when i hit an enter key on first Panel. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Well, let's get one think straight from the start.
ISPF PANEL - ISPF PANEL - ISPF PANEL
No such animal as a REXX panel. It is important to use the correct terminology as you may well confuse others trying to help you if you do not.
What is the first panel, a primary menu panel or merely one displayed from within a REXX program. |
|
Back to top |
|
|
POOJA KHADE
New User
Joined: 28 Dec 2006 Posts: 15 Location: mumbai
|
|
|
|
Actually the first panel is taking some input after that when i hit enter key then second panel should get displayed. First panle is getting displayed through Rexx |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
the simplest way would be ...
Code: |
... display first panel
Address ISPEXEC "DISPLAY PANEL(YourFirstPanel)"
if RC = 0 then do
... continue with second panel
Address ISPEXEC "DISPLAY PANEL(YourSecondPanel)"
if RC = 0 then do
... process second panel data
end
else do
... tell the user that
... he hit PF3
... or some error has occurred
end
end
else do
... tell the user that
... he hit PF3
... or some error has occurred
end
|
|
|
Back to top |
|
|
POOJA KHADE
New User
Joined: 28 Dec 2006 Posts: 15 Location: mumbai
|
|
|
|
Now the case is like i have developed a panel in which i take input as an Job Card and load module library name. After taking input i want to hit enter and after hitting enter second panel should get displayed and ready to take input. So suggest me where i should put the code. Below is the screen shot for displaying first panel
Call Set_Popup
/*"LIBDEF ISPPLIB DATASET ID('CGEY.XPAND.CMMS')"*/
"ISPEXEC DISPLAY PANEL(AMBL001)",
"MSG("||vMessageID||") CURSOR("||vCursorID||")"
vLastRc = RC
vMessageID = ''
vErrorFound = ''
If vLastRc = 8 then
Signal End_All
If ZCMD <> '' then
Do
vCursorID = "ZCMD"
vMessageID = "AMBL011A"
vErrorFound = "Yes"
Call Remove_Popup
Signal Display_Panel
End |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10889 Location: italy
|
|
|
|
why don' t You stick to a simpler flow like the one I just showed You
is there something not clear in it ?
its impossible to design anything simpler |
|
Back to top |
|
|
POOJA KHADE
New User
Joined: 28 Dec 2006 Posts: 15 Location: mumbai
|
|
|
|
one more thing after pressing PF3 on second panel it should come on first panel.
Please help |
|
Back to top |
|
|
POOJA KHADE
New User
Joined: 28 Dec 2006 Posts: 15 Location: mumbai
|
|
|
|
Actually that is the requirement for my utility |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
So what is the requirement to go back to panel one after PF3 on panel 2 |
|
Back to top |
|
|
POOJA KHADE
New User
Joined: 28 Dec 2006 Posts: 15 Location: mumbai
|
|
|
|
now please see below. This is the code i have written. The problem is that after pressing Enter on first panel its going into infinite loop. Please suugest what i should do to correct that. Also just tell me the code such that when we press PF3 on panel 2 it must go back to panel 1.
JobRexx is my first panel and library is second one.
Display_Panel:
/************/
Call Set_Popup
"ISPEXEC DISPLAY PANEL(JOBREXX)",
"MSG("||vMessageID||") CURSOR("||vCursorID||")"
vLastRc = RC
vMessageID = ''
vErrorFound = ''
If vLastRc = 8 then
Signal End_All
If ZCMD <> '' then
Do
vCursorID = "ZCMD"
vMessageID = "JOBREXXA"
vErrorFound = "Yes"
Call Remove_Popup
Signal Display_Panel
End
if RC = 0 then
"ISPEXEC DISPLAY PANEL(LIBRARY)",
"MSG("||vMessageID||") CURSOR("||vCursorID||")"
vLastRc = RC
vMessageID = ''
vErrorFound = ''
If vLastRc = 8 then
Signal End_All
If ZCMD <> '' then
Do
vCursorID = "ZCMD"
vMessageID = "LIBRARYA"
vErrorFound = "Yes"
Call Remove_Popup
Signal Display_Panel
End |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Have you tried processing using TRACE ?R |
|
Back to top |
|
|
POOJA KHADE
New User
Joined: 28 Dec 2006 Posts: 15 Location: mumbai
|
|
|
|
no i didn't tried |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Off you go then, give it a whirl |
|
Back to top |
|
|
POOJA KHADE
New User
Joined: 28 Dec 2006 Posts: 15 Location: mumbai
|
|
|
|
Now i am able to go to panel 2nd after pressing enter. Can you help me to go back to panel 1 when i press PF3 |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
expat wrote: |
So what is the requirement to go back to panel one after PF3 on panel 2 |
I ask for a second time |
|
Back to top |
|
|
POOJA KHADE
New User
Joined: 28 Dec 2006 Posts: 15 Location: mumbai
|
|
|
|
the condition is like i m accepting some input from panel2 and if i want to exit and if i press PF3 i shld be able to go back to panel 1. IF i accept input from panel2 and press enter then also it shld go to panel1 |
|
Back to top |
|
|
POOJA KHADE
New User
Joined: 28 Dec 2006 Posts: 15 Location: mumbai
|
|
|
|
Will any body reply me. If we press PF3 on panel2 it should go back to Panel1 and should not exit from panel2 |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2596 Location: Silicon Valley
|
|
|
|
What is the purpose of this:
Code: |
If vLastRc = 8 then
Signal End_All |
It looks like it exits altogether after ending the second panel. If you do not want that, you need to change your logic. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
POOJA KHADE wrote: |
Will any body reply me. If we press PF3 on panel2 it should go back to Panel1 and should not exit from panel2 |
Interesting concept. You can display only one panel at a time, so which is it to be, one or two ??? |
|
Back to top |
|
|
POOJA KHADE
New User
Joined: 28 Dec 2006 Posts: 15 Location: mumbai
|
|
|
|
I want to display 1st panel when i press PF3 on panel 2nd. I dont want to end and exit after pressing PF3 on Panel 2nd |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Then code the controlling REXX to do as you require. |
|
Back to top |
|
|
POOJA KHADE
New User
Joined: 28 Dec 2006 Posts: 15 Location: mumbai
|
|
|
|
Thanks for the help you provided.
I got my goal and successfully executed the panel |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Use enrico template.
Here is another example I like to use:
Code: |
Do Forever
Address ISPEXEC "DISPLAY PANEL(Panel1)"
If RC <> 0 Then Leave
... /* check/process Panel1 */
Call Show_Panel2
End
Exit/Return
Show_Panel2:
Do Forever
Address ISPEXEC "DISPLAY PANEL(Panel2)"
If RC <> 0 Then Leave
... /* check/process Panel2 */
... /* data from Panel1 available as well */
End
Return |
Where did you learn to use the SIGNAL command??
With SIGNAL you can jump from place to place,
but after a while you won't know where you're coming from, and where to go back when you're finished... |
|
Back to top |
|
|
|