WFSAVE Question

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Jason, EViews Moderator

BCNAV
Posts: 40
Joined: Tue Oct 31, 2017 9:06 am

WFSAVE Question

Postby BCNAV » Tue Oct 31, 2017 9:15 am

Sorry for this silly question. I have been away from EViews for a while and am now porting some V9 programs over to V10. My programs all work except for my WFSAVE commands. I have:

!annual1=2000
!annual2=2018
wfcreate random_walk_{!year}.{%m} u !annual1 !annual2

code here for forecasting

wfsave(2) R:\Traffic Forecasting\EViews\Workfiles\Stochastic\random_walk_{!year}.{%m}.wf1


This wfsave will not put my work file, which is random_walk_{!year}.{%m} in the right folder, which is R:\Traffic Forecasting\EViews\Workfiles\Stochastic . It is creating a Traffic.wf1 file in R:\


Thanks...

BCNAV
Posts: 40
Joined: Tue Oct 31, 2017 9:06 am

Re: WFSAVE Question

Postby BCNAV » Tue Oct 31, 2017 9:27 am

It would seem that EViews still does not like the spaces in the directory names. Is there a workaround for this?

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11774
Joined: Tue Sep 16, 2008 5:38 pm

Re: WFSAVE Question

Postby EViews Gareth » Tue Oct 31, 2017 9:39 am

You have to put quotes around paths with spaces.
Follow us on Twitter @IHSEViews

BCNAV
Posts: 40
Joined: Tue Oct 31, 2017 9:06 am

Re: WFSAVE Question

Postby BCNAV » Tue Oct 31, 2017 10:38 am

I have tried to no avail....where would they go with the wfsave:

wfsave(2) R:\Traffic Forecasting\EViews\Workfiles\Stochastic\random_walk_{!year}.{%m}.wf1

If I put quotes around the whole thing then _{!year}.{%m} comes out as _{!year}.{%m} and not, say 2017.10

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 11774
Joined: Tue Sep 16, 2008 5:38 pm

Re: WFSAVE Question

Postby EViews Gareth » Tue Oct 31, 2017 11:08 am

Code: Select all

%path = "R:\Traffic Forecasting\EViews\Workfiles\Stochastic\random_walk_" + @str(!year) + "." + %m + ".wf1"
wfsave(2) %path
Follow us on Twitter @IHSEViews


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 3 guests