Eviews 7.2:
Does wfopen provide some sort of error trapping that would allow me to test to see if a workfile exists, and load it, otherwise wfcreate such a workfile?
Currently, when I open a non-existant workfile I get the message:
[path]\[filename].wf1 not found on disk in "[disk name]
No workfile exists - Use NEW or OPEN to create or load a workfile in "PAGESELECT DAILY".
Pageselect Daily
is the first command after the workfile fails to open.
test wfopen or wfcreate
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
test wfopen or wfcreate
There's nothing more than the general error trapping in programming.
You could use the @fileexist function to test whether the file exists or not.
You could use the @fileexist function to test whether the file exists or not.
Re: test wfopen or wfcreate
@fileexist will provide the functionality that I want.
Quick followup:
Ideally if the workfile is already open when I execute my code, I would prefer to *not* re-open the workfile.
is there a workfile command that will identify whether the workfile is already open? I have considered testing the equality of the @wfname property, but that only checks the default (current) workfile.
Quick followup:
Ideally if the workfile is already open when I execute my code, I would prefer to *not* re-open the workfile.
is there a workfile command that will identify whether the workfile is already open? I have considered testing the equality of the @wfname property, but that only checks the default (current) workfile.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13585
- Joined: Tue Sep 16, 2008 5:38 pm
Re: test wfopen or wfcreate
You could try wfuse. That selects the workfile if it is currently open, and opens it if it is not currently open. You have to give it the full path and file name though (see documentation...)
Re: test wfopen or wfcreate
Perfect. Thank you very much.
Who is online
Users browsing this forum: No registered users and 2 guests
