How to convert a literal in to a variable name



IBM's Command List programming language & Restructured Extended Executor

How to convert a literal in to a variable name

Postby Mahesh_B03 » Tue Sep 08, 2015 12:09 pm

Hi All,

I have the following requirement in my project. I have 10 variables like ID1 =20,id2 = 10, ID3 = 40............ID10 = 30
I have to put this value of the variables to another variable using loop. I coded like this and I am not getting the desired output.

Do I = 1 to 10
x = Id||I
Say X
End


and Output is ID1,ID2,ID3......ID10
It is taking it as 'Literal ID1' instead of Variable name.

Can I have any other alternate solution to resolve this issue?

Thanks & Regards,
Mahesh Balasubramanian
Mahesh_B03
 
Posts: 1
Joined: Tue Sep 08, 2015 11:12 am
Has thanked: 0 time
Been thanked: 0 time

Re: How to convert a literal in to a variable name

Postby prino » Tue Sep 08, 2015 2:06 pm

Look at "interpret" and/or "value"
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post