Functions and CALL Routines |
Converts two-digit FIPS codes to uppercase state names.
Category: |
State and ZIP Code
|
-
expression
-
specifies a numeric constant, variable,
or expression that represents a U.S. FIPS code.
If the FIPNAME function returns a value
to a variable that has not yet been assigned a length, by default the variable
is assigned a length of 20.
The FIPNAME function converts a U.S. Federal Information
Processing Standards (FIPS) code to the corresponding state or U.S. territory
name in uppercase, returning a value of up to 20 characters.
The FIPNAME, FIPNAMEL, and FIPSTATE functions
take the same argument but return different values. FIPNAME returns uppercase
state names. FIPNAMEL returns mixed case state names. FIPSTATE returns a two-character
state postal code (or world-wide GSA geographic code for U.S. territories)
in uppercase.
The examples show the differences when using FIPNAME,
FIPNAMEL, and FIPSTATE.
SAS Statements |
Results |
x=fipname(37);
put x;
|
NORTH CAROLINA
|
x=fipnamel(37);
put x;
|
North Carolina
|
x=fipstate(37);
put x;
|
NC
|
Copyright © 2011 by SAS Institute Inc., Cary, NC, USA. All rights reserved.