Page 1 of 1

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

Posted: Fri Jan 13, 2017 1:56 pm
by BigD
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 :)

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

Posted: Fri Jan 13, 2017 3:33 pm
by EViews Gareth
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.

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

Posted: Mon Jan 16, 2017 1:02 pm
by BigD
@Eviews_Gareth

Thanks for the clarification and help!