Opening Aremos Tsd files with @rename

For questions regarding programming in the EViews programming language.

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

blonggovnl
Posts: 16
Joined: Thu Aug 22, 2013 7:45 am

Opening Aremos Tsd files with @rename

Postby blonggovnl » Tue Apr 22, 2014 6:24 am

Hi,

I'm trying to open some aremos tsd files in EViews. I can open them fine using either import or wfopen, except when I I want to use the @rename command. Some variable names in our old model are not allowed in EViews.

So for instance,

Code: Select all

import(type=a) pridat.tsd @rename c ctot
doesn't actually rename anything, and I am still prompted with a window asking me to change the variable name.


Any ideas?

Thanks,

BL

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

Re: Opening Aremos Tsd files with @rename

Postby EViews Chris » Tue Apr 22, 2014 9:43 am

I'm afraid that the @rename step in the import command currently happens too late to get the effect you're after.

What's actually going on is that EViews loads all the data from the Aremos TSD file into an invisible intermediate workfile, and then imports all this data into the destination workfile.

It's during this second step that the @rename option is applied. It was really intended to support the case where you are importing a set of files containing the same series names (eg. one file for each country) and you need to adjust the names during the import step so that they don't all land on top of eachother (for example by adding a country suffix such as "_US", "_UK" etc.)

Unfortunately, it's during the first step that the illegal object names in the Aremos TSD file (like 'C') are being forced into legal EViews object names and that step is when the prompt is coming up.

There's no good reason for this - it's just historical legacy in the way the code currently works. I agree that it would be desirable for the @rename option to be able to change incoming names in the way that you thought it would, but it would be a significant change to how things currently work.

Note that in a program the illegal name prompt shouldn't come up. EViews will automatically rename 'C' to a valid name without prompting (typically to 'C01") so in a program you could use something like this:

import(type=a) pridat.tsd @rename c01 ctot

to make the C series in Aremos (which will have been renamed to C01) import into the series CTOT.

Chris


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests