Copy only a given type of object

For questions regarding programming in the EViews programming language.

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

jfgeli
Posts: 72
Joined: Fri Jan 30, 2009 6:29 pm

Copy only a given type of object

Postby jfgeli » Tue Mar 04, 2014 1:54 am

Hi,

I have a page with many different objects types(scalars, series, samples, etc). Is it possible to copy only ALL series to a different page? I only know, I could do copy page1\* page2\*.I do not know in advance which is the name of the series.

Thanks,

Fede

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

Re: Copy only a given type of object

Postby EViews Gareth » Tue Mar 04, 2014 9:07 am

Use the wlookup command to find the names of all series in the workfile, then loop through that list copying one at a time.

jfgeli
Posts: 72
Joined: Fri Jan 30, 2009 6:29 pm

Re: Copy only a given type of object

Postby jfgeli » Tue Mar 04, 2014 9:44 am

:)

EViews Glenn
EViews Developer
Posts: 2682
Joined: Wed Oct 15, 2008 9:17 am

Re: Copy only a given type of object

Postby EViews Glenn » Tue Mar 04, 2014 10:32 am

I think that something like the following will work

Code: Select all

group all * all.drop resid copy(d) page1\all page2\all delete all
creates a group with all of the series, drops the residual. The copy with the "d" option should copy all of the series in ALL from the source to the destination. I then delete the ALL group, but you can leave it if you wish.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest