using brackets around a % variable
Posted: Fri Jun 29, 2012 7:59 am
I have a program that worked in eviews 4, trying to get everything working in eviews 7.
The problem I have is when I write a file to excel and want the name to reflect the list that has the variables currently being written, I try the following:
FOR %j ListA ListB
WRITE(t=xls, a2, nodates, names) "c:\model\data\Output\US{!j}A" year qtr {%s}
I get 1 file written out named: US{!j}A.XLS
when there should be 2, named USListAA.xls and USlistBA.xls
(the %s is defined in other code and works fine, the data in the file writes correctly, it just doesn't name properly)
I'm pretty sure I have a problem with the way I have the {!j} in the write statement, but can't figure out what.
Thanks for any ideas.
The problem I have is when I write a file to excel and want the name to reflect the list that has the variables currently being written, I try the following:
FOR %j ListA ListB
WRITE(t=xls, a2, nodates, names) "c:\model\data\Output\US{!j}A" year qtr {%s}
I get 1 file written out named: US{!j}A.XLS
when there should be 2, named USListAA.xls and USlistBA.xls
(the %s is defined in other code and works fine, the data in the file writes correctly, it just doesn't name properly)
I'm pretty sure I have a problem with the way I have the {!j} in the write statement, but can't figure out what.
Thanks for any ideas.