In the table I have several columns named Yr1, Yr2, Yr3, Yr4, etc.

set var xx text = &yr2

R>show var xx
99

So instead of having a variable for each column, I create it by incrementing 
YrNo
set var vYr = ('Yr' + (ctxt(.YrNo)))
So if YrNo = 2 then I would expect vYr to contain the value Yr2, so now to get 
the contents of the col Yr2 I would use:
R>set var vvyr text = &vYr
But instead of getting 99, I get
R>show var vvyr
Yr2


R>show var &vvyr
99

So how do I get 99 into a var?
R>set var abc = &vvYr

R>show var abc
Yr2

Reply via email to