ZIPFIPS Function


ZIPFIPS Function

Converts ZIP codes to two-digit FIPS codes

Category: State and ZIP Code

Syntax

ZIPFIPS ( zip-code )

Arguments

zip-code

  • specifies a numeric or character expression that contains a five-digit ZIP code.

  • Tip: If the value of zip-code begins with leading zeros, you can enter the value without the leading zeroes. For example, if you enter 1040, ZIPFIPS assumes that the value is 01040.

Details

The ZIPFIPS function returns the two-digit numeric U.S. Federal Information Processing Standards (FIPS) code that corresponds to its five-digit ZIP code argument.

Examples

The following SAS statements produce these results.

SAS Statements

Results

fips1=zipfips('27511');

put fips1;

37

fips2=zipfips('01040');

put fips2;

25

fips3=zipfips(1040);

put fips3;

25

fips4=zipfips(59017);

put fips4;

30

fips5=zipfips(24862);

put fips5;

54

See Also

Functions:

  • 'ZIPCITY Function' on page 919

  • 'ZIPNAME Function' on page 921

  • 'ZIPNAMEL Function' on page 923

  • 'ZIPSTATE Function' on page 924




SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
SAS 9.1 Language Reference Dictionary, Volumes 1, 2 and 3
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 704

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net