Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to pass value from Panel to panel and then to rexx code.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: How to pass value from Panel to panel and then to rexx code.
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 11, 2009 6:31 pm    Post subject:
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    Post subject: Reply to: How to pass value from Panel to panel and then to
Reply with quote

Expat,

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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Thu Jun 11, 2009 6:59 pm    Post subject: Reply to: How to pass value from Panel to panel and then to
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 11, 2009 7:01 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Thu Jun 11, 2009 7:09 pm    Post subject: Reply to: How to pass value from Panel to panel and then to
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    Post subject: Reply to: How to pass value from Panel to panel and then to
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 11, 2009 7:16 pm    Post subject: Re: Reply to: How to pass value from Panel to panel and then
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    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
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 5 Wed Oct 04, 2017 6:54 am
This topic is locked: you cannot edit posts or make replies. Rexx to execute spool commands upendrasri CLIST & REXX 47 Fri Sep 29, 2017 1:08 pm
No new posts Speed-up/reduce CPU use of code prino PL/I & Assembler 0 Tue Sep 26, 2017 12:05 am
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us