Filepath metadata in EViews databases

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

lukevancleve
Posts: 18
Joined: Mon Apr 29, 2013 1:24 pm

Filepath metadata in EViews databases

Postby lukevancleve » Thu Nov 20, 2014 1:01 pm

Hi,

It seems that EViews stores file paths in its .edb databases... for example this is a snippet of the plaintext of the database file:

[History] Imported from 'C:\Users\.../..../.../.../file.txt' Modified: 2014Q3 2200Q4

Is there a way to create the databases without this data? If not is there a way to remove it? I tried a regular expression to excise the text but the database became corrupted.

Best,

Luke

EViews Chris
EViews Developer
Posts: 161
Joined: Wed Sep 17, 2008 10:39 am

Re: Filepath metadata in EViews databases

Postby EViews Chris » Thu Nov 20, 2014 2:27 pm

It's not really the database - it's that EViews objects often contain information about how they were generated in a 'history' section in the label view of the object. (Choose View/Label from the series menu to see a table containing the descriptive information attached to a series). You'll also see the same information saved inside an EViews .wf1 workfile.

You can clear this out *before* you store an object into a workfile or database using a command like:

myseries.clearhistory

where myseries is the name of the series.

Once the information is in a database, it's actually hard to get rid of. You can't directly modify the file with an external program because EViwes keeps checksums on all objects stored in a database (so that any damage to the file is detected quickly). I'm afraid you'd probably have to read the objects back into EViews, clear out the history then write them out again.

TimGrun
Posts: 36
Joined: Wed Sep 16, 2009 8:01 am

Re: Filepath metadata in EViews databases

Postby TimGrun » Fri Sep 23, 2016 1:56 pm

myseries.clearhistory worked in EViews 8.1, but no longer works in EViews 9.5.

Is this a known bug, or is there a new option in EViews 9.5?

Thanks,
Tim

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

Re: Filepath metadata in EViews databases

Postby EViews Gareth » Fri Sep 23, 2016 4:29 pm

Works for me:

Code: Select all

wfcreate m 1990 2000 series y=nrnd y=3 y=4 y=nrnd y.clearhistory show y.label

TimGrun
Posts: 36
Joined: Wed Sep 16, 2009 8:01 am

Re: Filepath metadata in EViews databases

Postby TimGrun » Sat Sep 24, 2016 11:02 am

Thanks for the reply Gareth.

Sorry, I should have been clearer.

I use the import command to read data from a file and create many series including "rff".
Then the following:
rff.clearhistory
store(d=dbout) rff

Creates a database with a Remarks line:
[Remarks] Imported from 'C:\Users\USERID\AppData\ev_temp\fame2txt.txt

When I do the same thing with EViews 8.1, there are no Remarks in the database.

Thanks,
Tim

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

Re: Filepath metadata in EViews databases

Postby EViews Gareth » Mon Sep 26, 2016 8:21 am

Use .clearremarks if you want to clear remarks.

TimGrun
Posts: 36
Joined: Wed Sep 16, 2009 8:01 am

Re: Filepath metadata in EViews databases

Postby TimGrun » Mon Sep 26, 2016 10:01 am

Thanks Gareth. I didn't see clearremarks in the documentation.
So does .clearremarks do the same thing as .labels(c) ?

Tim

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

Re: Filepath metadata in EViews databases

Postby EViews Gareth » Mon Sep 26, 2016 10:24 am

Yes.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests