Sample 56546: View National Language Support (NLS) characters in a map
The sample code on the Full Code tab uses the $UESC50. format with the map attribute Unicode variable to view the national language characters in an English SAS UTF-8 session. The sample code must be run in a UTF-8 SAS session.
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
The sample code below uses the $UESC50. format with the map attribute Unicode variable to view the national language characters in an English SAS UTF-8 session. This sample must be run in a UTF-8 SAS session.
/* Subset the map to a smaller area */
data maparea;
set mapsgfk.china;
where id1='CN-54';
run;
/* Make the annotate macros available */
%annomac;
/* Determine the center of the map areas */
%centroid(maparea,centers,id);
/* Define an annotate data set to label the map areas */
/* with the national and English characters */
data names;
merge centers(in=a) mapsgfk.china_attr;
by id;
if a;
retain xsys '2' ysys '2' when 'a' function 'label';
length text $20 color $8;
text=input(IdnameU, $uesc50.);
position='5'; color='black'; size=2;
output;
text=trim(idname);
position='8'; color='gray11'; size=1.5;
output;
run;
/* Use a UTF8 SAS session to display the map with labels */
title 'Label map areas with national characters';
proc gmap data=maparea map=maparea;
id id1 id ;
choro id / anno=names coutline=graybb statistic=first nolegend;
run;
quit;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
This sample uses the $UESC50. format with the map attribute Unicode variable to view the national characters in an English SAS UTF-8 session.
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> GMAP Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Elements ==> Annotation
|
Date Modified: | 2015-09-11 15:58:35 |
Date Created: | 2015-09-04 10:09:25 |
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9.4 TS1M0 | |
Z64 | 9.4 TS1M0 | |
Microsoft® Windows® for x64 | 9.4 TS1M0 | |
Microsoft Windows 8 Enterprise x64 | 9.4 TS1M0 | |
Microsoft Windows 8 Pro x64 | 9.4 TS1M0 | |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M0 | |
Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M0 | |
Microsoft Windows 8.1 Pro | 9.4 TS1M0 | |
Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M0 | |
Microsoft Windows Server 2008 R2 | 9.4 TS1M0 | |
Microsoft Windows Server 2008 for x64 | 9.4 TS1M0 | |
Microsoft Windows Server 2012 Datacenter | 9.4 TS1M0 | |
Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M0 | |
Microsoft Windows Server 2012 R2 Std | 9.4 TS1M0 | |
Microsoft Windows Server 2012 Std | 9.4 TS1M0 | |
Windows 7 Enterprise x64 | 9.4 TS1M0 | |
Windows 7 Professional x64 | 9.4 TS1M0 | |
64-bit Enabled AIX | 9.4 TS1M0 | |
64-bit Enabled Solaris | 9.4 TS1M0 | |
HP-UX IPF | 9.4 TS1M0 | |
Linux for x64 | 9.4 TS1M0 | |
Solaris for x64 | 9.4 TS1M0 | |