GMAP Procedure

Using Formats for Traditional Map Data Set Variables

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
Continent
CNTRY
Country
GLC
Geographic Location Code, distributed by Government Services Administration, USA
ISO
International Standard Organization
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 “***” .
Formats for Maps
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 or city name appended by || as a delimiter, followed by the country's GLC alpha code. This will output a province||country code, the province or city code, and the country's GLC alpha numeric code
provname='TEHRAN||IR'
put(provname,$glcprov.);
8250460
8250 — province or city code
460 — country GLC numeric code
$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