Previous Page | Next Page

Functions and CALL Routines

FIPSTATE Function



Converts two-digit FIPS codes to two-character state postal codes.
Category: State and ZIP Code

Syntax
Arguments
Details
Comparisons
Examples
See Also

Syntax

FIPSTATE(expression)


Arguments

expression

specifies a numeric constant, variable, or expression that represents a U.S. FIPS code.


Details

If the FIPSTATE 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 FIPSTATE function converts a U.S. Federal Information Processing Standards (FIPS) code to a two-character state postal code (or world-wide GSA geographic code for U.S. territories) in uppercase.


Comparisons

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.


Examples

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


See Also

Functions:

FIPNAME Function

FIPNAMEL Function

STFIPS Function

STNAME Function

STNAMEL Function

Previous Page | Next Page | Top of Page