Hi, MAPSGFK is a Library in SAS that comes with the SAS product installation(Most cases). In this Library you can find WORLD_ATTR tabel where you can find most of the well known countries with continent code. Here is my sample code( make sure the values are case-sensitive so the contries names has to be all upcase) data country;
infile datalines;
input country $15.;
datalines;
INDIA
CHINA
UNITED STATES
JAPAN
;
RUN;
/* 91-North America, 92-South America, 93-Europe, 94-Africa, 95-Asia, 96-South Pacific. */
PROC FORMAT ;
VALUE Cont 91="North America"
92="South America"
93="Europe"
94="Africa"
95="Asia"
96="South Pacific";
RUN;
PROC SQL;
CREATE TABLE WORK.QUERY_FOR_COUNTRY AS
SELECT t1.country,
t2.CONT format=cont.
FROM WORK.COUNTRY t1
INNER JOIN MAPSGFK.WORLD_ATTR t2 ON (t1.country = t2.ISONAME);
QUIT; Thanks, Suryakiran
... View more