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

How to pass value from Panel to panel and then to rexx code.


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
samedesh
Currently Banned

New User


Joined: 22 May 2007
Posts: 46
Location: India

PostPosted: Thu Jun 11, 2009 6:28 pm
Reply with quote

Hi,

I have three panels say A and B and C. All are selection panels. B and C panels are called from panel A by ZSEL command. B and C panels both call same rexx program say REXXPROG.

Panel A:
Code:
)ATTR DEFAULT(%+_)                                   
      $ TYPE(TEXT) INTENS(LOW) SKIP(ON) COLOR(GREEN) 
      ! TYPE(INPUT) INTENS(LOW) PAD(_) color(white)   
)BODY  Expand(\\)                                     
+-\-\- Code Generator -\-\-                           
+                                                     
%OPTIONS ===>!opt                                   
+                                                     
+                                                     
+   Select below options to continue..               
                                                     
+  %1.$ Call Panel B.                             
+                                                     
+  %2.$ Call Panel C.                             
)PROC                                                 
    &ZSEL=TRANS(TRUNC(&opt,'.')                     
             1,'panel(B)'                           
             2,'panel(C)'                         
             ' ',' '                                 
             *,'?')                                   
)END


Panel B :
Code:
)ATTR DEFAULT(%+_)                                             
)BODY                                                           
%------------------  TITLE FOR MENU SELECTION PANEL  -----------
%SELECTION ===>_ZCMD                                           
+                                                               
+   THIS DIRECTION LINE TELLS THE USER HOW TO USE THE PANEL:   
                                                               
+   Enter below details:                                       
                                                               
+   Enter dataset name: _V1                                     
                                                               
+  %1+ Call Code REXXPROG                                       
   %2+ Call Dummy rexx                                         
)PROC                                                           
   &ZSEL=TRANS(TRUNC(&ZCMD,'.')                                 
             1,'CMD(REXXPROG)'                                 
             2,'CMD(PANEL1)'                                   
             ' ',' '                                           
             *,'?')                                             
)END


Panel C is somewhat same as panel B.
Rexx Code:
Code:
/* rexx */                     
if opt=2                       
   say 'You are correct'       
else                           
   say 'Option incorrect'     


My query is: I am not getting value opt = 2 in rexx program when I am selecting option 2 in panel A. Can any one please help me? I am getting value of opt as OPT.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jun 11, 2009 6:31 pm
Reply with quote

And where do you enter 2 as an option ?
Back to top
View user's profile Send private message
samedesh
Currently Banned

New User


Joined: 22 May 2007
Posts: 46
Location: India

PostPosted: Thu Jun 11, 2009 6:57 pm
Reply with quote

Expat,

in Panel A
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jun 11, 2009 6:59 pm
Reply with quote

then... no way to get it in a rexx invoked by panel B

but why, please tell us, You keep mixing selection panels with data entry panels?
after being advised against it
do You realize that You are making life harder for everybody
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jun 11, 2009 7:01 pm
Reply with quote

Unless the panels are all displayed from within the same REXX code, which in this case I think not, then you will need to store the variable using VPUT from some code in the PROC section, and then retrieve the value in the next called panel.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Jun 11, 2009 7:09 pm
Reply with quote

Yup that' s right expat,

but I was adamant to suggest advanced techniques to somebody who , IMHO, still needs to grasp the basics
Back to top
View user's profile Send private message
samedesh
Currently Banned

New User


Joined: 22 May 2007
Posts: 46
Location: India

PostPosted: Thu Jun 11, 2009 7:09 pm
Reply with quote

Thanks expat for your valuable suggestion. I will surely try and let you know.
Thanks once again. icon_razz.gif
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jun 11, 2009 7:16 pm
Reply with quote

enrico-sorichetti wrote:
but why, please tell us, You keep mixing selection panels with data entry panels?
after being advised against it
do You realize that You are making life harder for everybody

A sentiment I agree with 110%.

I always build my panels to all be called and controlled from within one REXX EXEC. That way it is clear what is happening and simpler to maintain or debug.

I guess Enrico and I and numerous others have been where you are now and know from bitter experience the easiest and cleanest way to do these things.
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 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
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top