Here is the following code with the proc gproject in it. options leftmargin=0.5in rightmargin=0.5in topmargin=0.5in bottommargin=0.5in; data world; /*Don't delete missing values*/ length region country $50.; set mapsgfk.world mapsgfk.china(in=b keep =id long lat where=(id="CN-8100")); *country=put(id,glcnsm.); x=Long; y=lat; /*Moved unprojected to x,y*/ country=strip(idname); region=strip(put(cont,contfmt.)); if b then do;country="Hong Kong";region="Asia Pacific";id="HK";segment=1; end; %let SouthKorea=%nrstr("Korea, Democratic People's Republic of"); %put &SouthKorea; if country ='Dominican Republic' then country='Dominican Rep.';else if country =&SouthKorea. then country='South Korea'; else if country ='Trinidad and Tobago' then country='Trinidad,Tobago';else if country ='Taiwan, Province of China' then country='Taiwan';else if country ='Russian Federation' then country='Russia'; else if country ='United Arab Emirates' then country='Utd.Arab Emir.'; else if country ='South Africa' then country='South Africa'; if region in ('Europe','Africa') then region='EMEA'; else if region in ('Asia','Oceania') then region='Asia Pacific'; else if region in ('North America','South America') then region='Americas'; if country='Japan' then region='Asia Pacific'; else if country in ('Utd.Arab Emir.','Russia','Israel','Saudi Arabia','Yemen','Oman') then region='EMEA'; else if country='Bonaire, Saint Eustatius and Saba' then region='Americas'; ord=_n_; run; data final_; set final1; if country='Dutch Antilles' then country='Bonaire, Saint Eustatius and Saba'; if country='Bermuda' then region='Americas';else if country='Japan' then region='Asia Pacific'; else if country='Australia' then region='Asia Pacific'; else if country='Utd.Arab Emir.' then region='EMEA'; run; proc sql noprint; create table world1 as select distinct a.*,b.unit1 from world as a left join final_ as b on a.region=b.region and a.country=b.country order by a.ord,a.region,a.country,a.segment,b.unit1; quit; proc gproject data=world1 out=world1 nodateline project=none; id region country id; run; proc sort; by region country id segment unit1; run; %annomac; %centroid(world1,repl,region country id segment unit1,SEGONLY=1); proc sql feedback undo_policy=none noprint; create table repl as select distinct a.*,b.ord from repl as a natural join (select distinct region,country,ord from world1) as b order by a.region,a.country,b.ord; quit; %macro region(region); data repl_(where=(region="®ion.")); set repl(where=(region="®ion." and unit1 ne . )) ; by region country ord; if last.country; run; proc sort; by ord; run; data repl_; length position $8. function style color text $100.; set repl_; flag=1; xsys='2'; ysys='2'; hsys='3'; function='pie'; when ='a'; rotate= 360; style='solid'; size=sqrt(unit1/3.14)*.008; %if ®ion=EMEA or ®ion=Japan %then %do;size=sqrt(unit1/3.14)*.002;%end; color='light green';position='1'; output; function='label';style='Albany AMT'; position='4';color='CXFF00FF'; text=strip(id); size=1; output; position='8';color='blue'; text=strip(put(unit1,8.)); size=1; output; run; proc sort data=world1 out=world2; by ord; where region="®ion."; run; title;footnote; ods listing close;ods graphics on; ods pdf file="C:\Users\ppothine\Desktop\Report\f®ion..pdf" ; title3 j=r 'page 1 of 1';title4 j=c "Graphical Representation for ®ion.";title5; footnote2 j=r "&sysdate. &systime."; pattern c='white'; proc gmap data=world2 map=world2 anno=repl_; id region id segment; choro unit1 / levels=1 stat=first nolegend; run; quit; ods _all_ close; %mend; %region(Americas); %region(Asia Pacific); %region(EMEA); I tried with the proc gproject in the above code but still the output remains the same as before. Could you please guide me? Thanks in advance.
... View more