Page 1 of 1

wfcreate

Posted: Tue May 25, 2010 2:17 pm
by bhaupt
I am running eviews 7.1 and I am up to date with updates.


I have a header file in which I specify a path, the forecast version, and (ideally) the number of datalines being read in from an excel sheet.

If I explicitly specify 43787 unstructured lines as in: (Case 1: this works)

Code: Select all

wfcreate(wf={%netpath}\test\raw_fcst_{%cur_ver}.wf1,page=Raw) u 43787
the workfile creates without a hitch; however, if I attempt to include the number of lines in my header file as

Code: Select all

'# Current & Previous Forecasts %cur_ver="0510" !cur_vlen = 43787 'length of datafile
when I execute the wfcreate command I get an Illegal Date error: (Case 2: this fails)

Code: Select all

wfcreate(wf={%netpath}\test\raw_fcst_{%cur_ver}.wf1,page=Raw) u !cur_vlen
My include statement is called beforehand. The program runs with no errors if I specifcy the 43787 as the number of observations.

I have tested at the command line and the illegal date error occurs again, however in the popup, it says !cur_vlen in the number of observations field, meaning it seems to take it as a string literal instead of as a numeric variable I was hoping it would think it should be.

Is it a Bug, a feature, or am I doing it wrong?

Re: wfcreate

Posted: Tue May 25, 2010 2:21 pm
by EViews Gareth
Not sure I exactly follow what you're asking. But I just did the following steps, and it worked fine. I think it is what you are trying to do.

I created a program file called "DEFAULTS.PRG". In that file there is a single line:

Code: Select all

!n=100
I then create another program and in it are the lines:

Code: Select all

include default.prg wfcreate u !n
And that worked perfectly.

Re: wfcreate

Posted: Tue May 25, 2010 2:21 pm
by EViews Gareth
Not sure I exactly follow what you're asking. But I just did the following steps, and it worked fine. I think it is what you are trying to do.

I created a program file called "DEFAULTS.PRG". In that file there is a single line:

Code: Select all

!n=100
I then create another program and in it are the lines:

Code: Select all

include default.prg wfcreate u !n
And that worked perfectly.

Re: wfcreate

Posted: Wed May 26, 2010 6:24 am
by bhaupt
I'll try it again...

followup edit:
I changed my variable name to !n rewrote the line and, yes, it worked properly. I then reconstructed the line and it failed. I then rewrote the line and it worked. I don't have an explanation, but I do have a working program.