Nesting loops
Posted: Wed Oct 15, 2014 2:00 pm
Hi,
I think I am trying to nest loops, but not successfully :(
This is a simplified version of what I have:
%x = "rd"
%z = "go"
for %j tot p
q_us{%z}{%j}_{%x}.label(S) BEA
for %k gdp private
q_US{%z}{%j}_{%x}.displayname US, GO $2009, {%k}
next
next
Ultimately, I want the label 'source' (S) for 'tot' and 'p' to be the same, but the display name should differ - 'tot' should correspond to 'gdp' and 'p' to 'private'. However, when I run this, 'private' shows up as the display name for both.
Can someone help, please? Thanks!!
I think I am trying to nest loops, but not successfully :(
This is a simplified version of what I have:
%x = "rd"
%z = "go"
for %j tot p
q_us{%z}{%j}_{%x}.label(S) BEA
for %k gdp private
q_US{%z}{%j}_{%x}.displayname US, GO $2009, {%k}
next
next
Ultimately, I want the label 'source' (S) for 'tot' and 'p' to be the same, but the display name should differ - 'tot' should correspond to 'gdp' and 'p' to 'private'. However, when I run this, 'private' shows up as the display name for both.
Can someone help, please? Thanks!!