The GMAP Procedure |
You can specify an output map area name or numeric value using one of the predefined formats for maps. The following prefixes are used in the names of the formats for maps:
CONT | |
CNTRY | |
GLC |
Geographic Location Code, distributed by Government Services Administration, USA |
ISO |
The formats for maps are located in the SASHELP.MAPFMTS catalog. See the MAPS.NAMES table to view all the continent and country names and corresponding GLC, ISO, and numeric representation for the continent values.
To use one of the formats for maps, you must specify the SASHELP.MAPFMTS catalog on the FMTSEARCH= option on a SAS OPTIONS statement:
options fmtsearch=(sashelp.mapfmts);
In addition to using the PUT statement (as shown in the examples in the following table), the formats can also be invoked using a FORMAT statement.
Note: If the input to a format is invalid, the format is "**" or "***" .
FORMAT | DESCRIPTION | EXAMPLE | OUTPUT |
---|---|---|---|
contfmt | use a continent's numeric value to output the continent's name |
cont= 91
put(cont,contfmt.); |
North America |
glcna | use the country's GLC numeric code to output the country's GLC alpha code |
id=460
put(id,glcna.); |
IR |
glcnlu | use the GLC numeric code to output the country's long name in uppercase |
id=460
put(id,glcnlu.); |
IRAN, ISLAMIC REPUBLIC OF |
glcnsu | use the GLC numeric code to output the country's short name in uppercase |
id=460
put(id,glcnsu.); |
IRAN |
glcnsm | use the GLC numeric code to output the country's name in mixed case |
id=460
put(id,glcnsm.); |
Iran |
ison2a | use the country's ISO numeric code to output the country's ISO alpha2 code |
iso=364
put(iso,ison2a.); |
IR |
ison3a | use the country's ISO numeric code to output the country's ISO alpha3 code |
iso=364
put(iso,ison3a.); |
IRN |
isonlu | use the country's ISO numeric code to output the country's long name in uppercase |
iso=364
put(iso,isonlu.); |
IRAN, ISLAMIC REPUBLIC OF |
isonsu | use the country's ISO numeric code to output the country's short name in uppercase |
iso=364
put(iso,isonsu.); |
IRAN |
$cntrysl | use a country's short name in uppercase to output the country's long name in uppercase |
name='IRAN'
put(name,$cntrysl.); |
IRAN, ISLAMIC REPUBLIC OF |
$glcalu | use the GLC alpha code to output the country's long name in uppercase |
country='IR'
put(country,$glcalu.); |
IRAN, ISLAMIC REPUBLIC OF |
$glcan | use the country's GLC alpha code to output the country's GLC numeric code |
country='IR'
put(country,$glcan.); |
460 |
$glcsua | use the country's short name in uppercase to output the GLC alpha code name |
name='IRAN'
put(name,$glcsua.); |
IR |
$glcsun | use the country's short name in uppercase to output the country's GLC numeric code |
name='IRAN'
put(name,$glcsun.); |
460 |
$glcsma | use the country's short name in mixed-case to output the country's GLC alpha code |
mixname='Iran'
put(mixname,$glcsma.); |
IR |
$glcsmn | use the country's short name in mixed-case to output the country's GLC numeric code |
mixname='Iran'
put(mixname,$glcsmn.); |
460 |
$glcprov | use a province/city name appended by || as a delimiter, followed by the country's GLC alpha code to output a province||country code, the province/city code, and the country's GLC alpha numeric code |
provname='TEHRAN||IR'
put(provname,$glcprov.); |
8250460 |
$isosu2a | use the country's short name in uppercase to output the country's ISO alpha2 code |
name='IRAN'
put(name,$isosu2a.); |
IR |
$isosu3a | use the country's name in uppercase to output the country's ISO alpha3 code |
name='IRAN'
put(name,$isosu3a.); |
IRN |
$isosun | use the country's short name in uppercase to output the country's ISO numeric code |
name='IRAN'
put(name,$isosun.); |
364 |
$isoa2lu | use the country's ISO alpha2 code to output the country's long name in uppercase |
alpha2='IR'
put(alpha2,$isoa2su.); |
IRAN, ISLAMIC REPUBLIC OF |
$isoa2n | use the country's ISO alpha2 code to output the country's ISO numeric code |
alpha2='IR'
put(alpha2,$isoa2n.); |
364 |
$isoa2su | use the country's ISO alpha2 code to output the country's short name in uppercase |
alpha2='IR'
put(alpha2,$isoa2lu.); |
IRAN |
$isoa3lu | use the country's ISO alpha3 code to output the country's long name in uppercase |
alpha3='IRN'
put(alpha3,$isoa3lu.); |
IRAN, ISLAMIC REPUBLIC OF |
$isoa3n | use the country's ISO alpha3 code to output the country's ISO numeric code |
alpha3='IRN'
put(alpha3,$isoa3n.); |
364 |
$isoa3su | use the country's ISO alpha3 code to output the country's short name in uppercase |
alpha3='IRN'
put(alpha3,$isoa3su.); |
IRAN |
$isosm2a | use the country's short name in mixed-case to output the country's ISO alpha2 code |
mixname='Iran'
put(mixname,$isosm2a.); |
IR |
$isosm3a | use the country's short name in mixed-case to output the country's ISO alpha3 code |
mixname='Iran'
put(mixname,$isosm3a.); |
IRN |
$isosmn | use the country's short name in mixed-case to output the country's ISO numeric code |
mixname='Iran'
put(mixname,$isosmn.); |
364 |
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.