Page 1 of 1

repeatedly executing the same operations

Posted: Wed Dec 14, 2011 4:31 am
by loooooo
Hi,

I've been using Eviews for years but new to programming.
I've obtained a code from this forum and modified as follows:

Code: Select all

%file = "C:\Desktop\MyData.xls" wfopen(page=ALL) %file for %s MO AXP BMY CSX CSC CAG COP DOW DD FE GIS HIG HPQ HON IBM IP KFT MCD MET NWS SWY SPG TGT KR TWX UNP WMT DIS D pageload(page=%s) %file range=%s next
It's working perfectly fine except the sheet labelled as "D", for which Eviews reports an error. I don't know why.

In addition, there are few more things I'd like to carry out:
(1) For each tab (the name of which being "CAG" for example), I want to split them into three sub-sample periods (01/03/2005 - 06/30/2007, 07/01/2007 - 06/30/2009, 07/01/2009 - @last), and name each tab "CAG_pre", "CAG_crs", and "CAG_pst". This needs to be done over all 30 tabs in my Excel file.
(2) On each tab created from performing (1), I want to run VAR(3) and VEC(3). Suppose the variables are "prc", "vol","sp", and "dp".

Your help would be much appreciated, particularly for someone like me who tried to run the code above in the command line, instead of saving it as a prg file just an hour ago :(

Thanks,
Jason

Re: repeatedly executing the same operations

Posted: Wed Dec 14, 2011 7:25 am
by startz
D is a reserved word. Use another name.

Re: repeatedly executing the same operations

Posted: Wed Dec 14, 2011 7:34 am
by loooooo
Thanks startz. That was why!