Oops had my ' in the wrong place

TRACE ?R                  
X='FIRST'                 
Y='SECOND'                
TEST= X'MAGIC'Y           
INTERPRET  TEST"='FRED'"  
INTERPRET 'SAY ' TEST     < this will show as 'say FIRSTMAGICSECOND' and the 
result will be FRED 

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of 
Veilleux, Jon L
Sent: Friday, November 05, 2010 2:25 PM
To: [email protected]
Subject: Re: Rexx question - Dynamic generation of variables?

Try this...although it is not great...

X='FIRST'                     
Y='SECOND'                    
TEST= X'MAGIC'Y               
INTERPRET  TEST"='FRED'"      
INTERPRET 'SAY TEST'    

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of 
Gibney, Dave
Sent: Friday, November 05, 2010 2:13 PM
To: [email protected]
Subject: Rexx question - Dynamic generation of variables?

I don't subscribe to the Rexx list and am not sure I'd survive another list :)

Is it possible to dynamically define Rexx variables? 

It doesn't work but I'd like something like:
X='first'
y='second'
x|magic|y='fred'
Say x|magic|yy

And get 'fred' as the output.

Really x is a dsname and y is the volser and I'd like a variable
dsn|magic|volser. 

Dave Gibney
Information Technology Services
Washington State University

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: GET IBM-MAIN INFO Search the archives at 
http://bama.ua.edu/archives/ibm-main.html
This e-mail may contain confidential or privileged information. If you think 
you have received this e-mail in error, please advise the sender by reply 
e-mail and then delete this e-mail immediately.
Thank you. Aetna   

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: GET IBM-MAIN INFO Search the archives at 
http://bama.ua.edu/archives/ibm-main.html
This e-mail may contain confidential or privileged information. If
you think you have received this e-mail in error, please advise the
sender by reply e-mail and then delete this e-mail immediately.
Thank you. Aetna   

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to