@wlookup with loop variable
Posted: Thu Nov 29, 2012 3:45 pm
Hello - sorry if this a very basic question...
I'm trying to nest two for loops, where the inner loop selects a group of variables based on the value of the outer loop (in this case, country on the outer, product on the inner).
Unfortunately, I can't seem to make the line %prod = @wlookup(@wunion("in*",{%z})) work.
Any suggestions or advice appreciated, thanks.
----------------------------------------------------
%cntry = "be de uk"
for %z {%cntry}
%prod = @wlookup(@wunion("in*",{%z}))
for %y {%prod}
equation eq_{%y}.stepls {%y} econs
eq_{%y}.forecast {%y}_ls
next
next
-------------------------------------------------
I'm trying to nest two for loops, where the inner loop selects a group of variables based on the value of the outer loop (in this case, country on the outer, product on the inner).
Unfortunately, I can't seem to make the line %prod = @wlookup(@wunion("in*",{%z})) work.
Any suggestions or advice appreciated, thanks.
----------------------------------------------------
%cntry = "be de uk"
for %z {%cntry}
%prod = @wlookup(@wunion("in*",{%z}))
for %y {%prod}
equation eq_{%y}.stepls {%y} econs
eq_{%y}.forecast {%y}_ls
next
next
-------------------------------------------------