Double looping
Posted: Thu Mar 11, 2021 11:19 am
Hi All,
I am trying to do double looping across regions and countries.
Now I have two regions (Europe and FSU) and I am trying to perform the same operation across regions and countries. If a specify the region (i.e. %r="Europe") then the code works well, however, I receive an error once I add a loop for the two regions.
%rgn="europe fsu"
for {%r} {%rgn}
if %r="Europe" then %ctry="deu fra ita esp nld pol bel aut fin nor che swe eu"
endif
if %r="FSU" then %ctry="rus ukr aze"
endif
for %x {%ctry}
group {%x} demand_{%x}*
next
next
Any ideas what the issue can be? The code has already given me quite a lot of headaches...
I am trying to do double looping across regions and countries.
Now I have two regions (Europe and FSU) and I am trying to perform the same operation across regions and countries. If a specify the region (i.e. %r="Europe") then the code works well, however, I receive an error once I add a loop for the two regions.
%rgn="europe fsu"
for {%r} {%rgn}
if %r="Europe" then %ctry="deu fra ita esp nld pol bel aut fin nor che swe eu"
endif
if %r="FSU" then %ctry="rus ukr aze"
endif
for %x {%ctry}
group {%x} demand_{%x}*
next
next
Any ideas what the issue can be? The code has already given me quite a lot of headaches...