Copy command alternates between working and not working.

For questions regarding programming in the EViews programming language.

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

aarnon
Posts: 11
Joined: Thu Jun 20, 2013 7:31 am

Copy command alternates between working and not working.

Postby aarnon » Tue Jul 23, 2013 12:37 pm

Not really sure what's going on here: I have a program which uses the copy command to import and rename a bunch of series from a CEIC database in my registry. The first two lines of code:

Code: Select all

wfcreate(wf=ceic,page=annual) a 12/01/1950 12/01/2013 copy(c=nu) ceic::SR819309 gdp
This program worked fine yesterday, worked fine this morning, but when I went out to get a cup of coffee and came back to run it again:
SR819309 is not defined in "COPY(C=NU) CEIC::SR819309 GDP"
Same thing when I try the copy command from the command line.

Creating a series as equal to ceic::SR819309 works, as does the fetch command. In fact it seems like if I put all three in a program...

Code: Select all

wfcreate(wf=ceic,page=annual) a 12/01/1950 12/01/2013 fetch(c=nu,d=ceic) SR819309 series gdp1 = ceic::SR819309 copy(c=nu) ceic::SR819309 gdp
...they all execute. But if I comment out the 'fetch' and 'series' lines in that program, the error reappears.

I''m on EViews 7.2.

What is happening!!?? Thanks.

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Copy command alternates between working and not working.

Postby EViews Jason » Tue Jul 23, 2013 2:23 pm

It sounds as though you have a workfile and database both with the name 'CEIC'. When you call wfcreate use a name other than 'ceic'. For example use

Code: Select all

wfcreate(wf=ceic_wf,page=annual) a 12/01/1950 12/01/2013
Note this is a bug and we will get it fixed but it will only be fixed for EViews 8.

aarnon
Posts: 11
Joined: Thu Jun 20, 2013 7:31 am

Re: Copy command alternates between working and not working.

Postby aarnon » Tue Jul 23, 2013 2:52 pm

That did it, thank you!

EViews Jason
EViews Developer
Posts: 870
Joined: Tue Sep 16, 2008 3:50 pm

Re: Copy command alternates between working and not working.

Postby EViews Jason » Mon Aug 05, 2013 2:53 pm

Update: In my last post I mentioned that this would be fixed in EViews 8. Due to other implications (most notably copying from one workfile to another), this cannot be fixed. You must either 1)rename your workfile or 2)'fetch' the series from the database and rename it once it is in your workfile.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests