Page 1 of 1

Linkage between two types of codes, or "Join"

Posted: Fri Jun 05, 2009 10:51 am
by fnarita
Hi,

I'd like to connect numeric codes in one page with string codes in another page.
The procedure in my mind is what is called "JOIN" in a database language, such as SQL.

Specifically, I have one page that has two series of codes: one alpha series of 3 letter country codes, such as USA or JPN, and one numeric series of 3 digit country codes, such as 111, which is for USA. So, this page works as a reference between two types of codes. Name this page "Country_List".

On the other hand, I have one page of stacked panel data, which contain 3 digit country codes and variables of interest. Name this page "Stacked_Data".

What I want to do is to add one alpha series of 3 letter country codes in "Stacked_Data" page, and to let them correspond to the series of 3 digit codes that already exists in "Stacked_Data" page, using the information in "Country_List" page.

Can we do it by EViews 6?
(By the way, today I've just updated the EViews in my computer to version 6 from version 5.1. Colors in the program editor is very nice. :) )
I think it may be related with "Link" object, but I'm not sure how to do.

I will really appreciate it if anyone could give me any suggestion, reference, hint, or so.
I prefer to do it using "command", but a suggestion of using a dialog box will also be appreciated.

I attached my workfile up to the point I'm in trouble. (The filename is iip.wf1.)
The 3 letter code is "ccode" in "Country_List" page, and the corresponding 3 digit code is "ifs_code" in both "Country_List" and "Stacked_Data" page.

"ipnfa" in "Stacked_Data" page is the variable of interest. Eventually, I'd like to make unstacked series of "ipfna" for each country, such as USA_ipfna, JPN_ipfna, and so on.

Thank you very much for your time and consideration,
Futoshi

Re: Linkage between two types of codes, or "Join"

Posted: Fri Jun 05, 2009 11:09 am
by EViews Gareth

Code: Select all

copy country_list\ccode stacked_data\ccode @src ifs_code @dest ifs_code

Re: Linkage between two types of codes, or "Join"

Posted: Fri Jun 05, 2009 11:38 am
by fnarita
Thank you so much, QMS Gareth.
Your code works perfectly.
I really appreciate your help! :D

Many thanks,
Futoshi