Fetching some objects from a workfile page and fetching those same ones from a database

For questions regarding programming in the EViews programming language.

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

BigD
Posts: 28
Joined: Wed Jan 04, 2017 7:05 am

Fetching some objects from a workfile page and fetching those same ones from a database

Postby BigD » Fri Jan 13, 2017 1:56 pm

Hi,

I'm trying to fetch all the series excluding those called date, resid and c from a page in a workfile called Newdata. Then, I want to fetch the series with the same names (and not everything) from a different database called economic and renaming those by appending _01 to them.

How do I go about doing this?

Here's what I have:

Code: Select all

if(@pageexist("validateddata")==1) then pagedelete validateddata endif pagecopy(page=validateddata, dataonly) Delete * fetch * 'Not sure if fetching from the specific page (it's the most recent page) How do I make sure it does? fetch(d=economic) * 'Doesn't work rename * *.append _01 'Doesn't work
Thanks :)

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

Re: Fetching some objects from a workfile page and fetching those same ones from a database

Postby EViews Gareth » Fri Jan 13, 2017 3:33 pm

You can't (well, shouldn't) fetch from a workfile or workfile page. Fetch is for use with databases, and workfiles are not databases.

You should use the copy command to copy from one page to another, or workfile to another.

Once you have done the copy, you can use the @wlookup function to retrieve a list of all the series in your page, then loop through that list and fetch them from the database.

BigD
Posts: 28
Joined: Wed Jan 04, 2017 7:05 am

Re: Fetching some objects from a workfile page and fetching those same ones from a database

Postby BigD » Mon Jan 16, 2017 1:02 pm

@Eviews_Gareth

Thanks for the clarification and help!


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests