Code: Select all
logmode msg
'Just generating a bunch of empty series
for %x amuse auto miscnr pub rel warenm
genr {%x}_12v1 = 0
genr {%x}_35v1 = 0
genr {%x}_610v1 = 0
genr {%x}_10plusv1 = 0
next
!i = area.@count
%name = area.@seriesname(!i) 'Setting up a way to query all the variables in the group called 'area'
!k = @obs({%name}) 'Setting up a way to look at the time series of each of the variables we care about
for !i = 1 to area.@count 'For all the series in the group named area....
%right = @right(area.@seriesname(!i),6) 'Grabs the last six characters of the series name
%stories = @left(%right,1) 'Then grabs the first character of the chunked off version, isolating the number of stories present
!stories = @val(%stories) 'Converts that stories number from a scalar to a number
for %x amuse auto miscnr pub rel warenm
if !stories <=2 then
smpl @all
{%x}_12v1 = {%x}_12v1 + {%x}{%right} 'Program Breaks here - it doesn't want to iterate through, just grabs the zero stories data (ie amuse0_area) then quits
else
if !stories <=5 then
smpl @all
{%x}_35v1 = {%x}_35v1 + {%x}{%right}
else
if !stories <=10 then
smpl @all
{%x}_610v1 = {%x}_610v1 + {%x}{%right}
else
smpl @all
{%x}_10plusv1 = {%x}_10plusv1 + {%x}{%right}
next
next
endif
endif
endif