Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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: 10211
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: 10211
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 Capture the Max return code of... anilkumar922 All Other Mainframe Topics 0 Thu Jan 12, 2017 12:02 pm
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts find particular member name in PDS us... ravi243 CLIST & REXX 10 Mon Dec 19, 2016 6:44 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us