IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to call second panel in REXX


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
POOJA KHADE

New User


Joined: 28 Dec 2006
Posts: 15
Location: mumbai

PostPosted: Fri Jul 17, 2009 2:05 pm
Reply with quote

Can any body help me how to call second panel in REXX when i hit an enter key on first Panel.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 17, 2009 2:08 pm
Reply with quote

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

New User


Joined: 28 Dec 2006
Posts: 15
Location: mumbai

PostPosted: Fri Jul 17, 2009 2:13 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jul 17, 2009 2:14 pm
Reply with quote

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

New User


Joined: 28 Dec 2006
Posts: 15
Location: mumbai

PostPosted: Fri Jul 17, 2009 2:31 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jul 17, 2009 2:38 pm
Reply with quote

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

New User


Joined: 28 Dec 2006
Posts: 15
Location: mumbai

PostPosted: Fri Jul 17, 2009 2:38 pm
Reply with quote

one more thing after pressing PF3 on second panel it should come on first panel.
Please help
Back to top
View user's profile Send private message
POOJA KHADE

New User


Joined: 28 Dec 2006
Posts: 15
Location: mumbai

PostPosted: Fri Jul 17, 2009 2:40 pm
Reply with quote

Actually that is the requirement for my utility
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 17, 2009 2:54 pm
Reply with quote

So what is the requirement to go back to panel one after PF3 on panel 2
Back to top
View user's profile Send private message
POOJA KHADE

New User


Joined: 28 Dec 2006
Posts: 15
Location: mumbai

PostPosted: Fri Jul 17, 2009 3:04 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 17, 2009 3:07 pm
Reply with quote

Have you tried processing using TRACE ?R
Back to top
View user's profile Send private message
POOJA KHADE

New User


Joined: 28 Dec 2006
Posts: 15
Location: mumbai

PostPosted: Fri Jul 17, 2009 3:11 pm
Reply with quote

no i didn't tried
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 17, 2009 3:28 pm
Reply with quote

Off you go then, give it a whirl
Back to top
View user's profile Send private message
POOJA KHADE

New User


Joined: 28 Dec 2006
Posts: 15
Location: mumbai

PostPosted: Fri Jul 17, 2009 4:25 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Jul 17, 2009 4:32 pm
Reply with quote

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

New User


Joined: 28 Dec 2006
Posts: 15
Location: mumbai

PostPosted: Fri Jul 17, 2009 5:00 pm
Reply with quote

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

New User


Joined: 28 Dec 2006
Posts: 15
Location: mumbai

PostPosted: Fri Jul 17, 2009 7:01 pm
Reply with quote

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

Global Moderator


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

PostPosted: Fri Jul 17, 2009 9:17 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Jul 18, 2009 12:30 am
Reply with quote

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

New User


Joined: 28 Dec 2006
Posts: 15
Location: mumbai

PostPosted: Tue Jul 21, 2009 12:40 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Jul 21, 2009 1:41 pm
Reply with quote

Then code the controlling REXX to do as you require.
Back to top
View user's profile Send private message
POOJA KHADE

New User


Joined: 28 Dec 2006
Posts: 15
Location: mumbai

PostPosted: Tue Jul 21, 2009 3:09 pm
Reply with quote

Thanks for the help you provided.
I got my goal and successfully executed the panel
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue Jul 21, 2009 7:01 pm
Reply with quote

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... icon_confused.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top