Code: Select all
%vars="ovr_amt_m11 ovr_amt_m14 ovr_amt_m22 ovr_amt_m23 ovr_amt_ktk ovr_amt_oth ter_amt_m11 ter_amt_m22 ter_amt_m33 ter_amt_m34 ter_amt_m35 enr_amt_m11 enr_amt_m22 enr_amt_m33 enr_amt_m34 enr_amt_m35"
genr overflight = ovr_amt_m11+ovr_amt_m14+ovr_amt_m22+ovr_amt_m23+ovr_amt_ktk+ovr_amt_oth
genr terminal = ter_amt_m11+ter_amt_m22+ter_amt_m33+ter_amt_m34+ter_amt_m35
genr enroute = enr_amt_m11+ enr_amt_m22+enr_amt_m33+enr_amt_m34+enr_amt_m35
for %series {%vars}
if @left({%series},3)="ovr" then
{%series}_shr={%series}/overflight
endif
next
I would like the IF statement within the loop to check if the first 3 characters of the VARIABLE NAME contain something. In the case here, those first three are "ovr". If true, execute some statements. This does not work as EViews is looking at variables within the variable, asopposed top the variable name. How does one refer to characters within the variable name?