Sample 24616: Convert FIPS codes into state information
Convert FIPS codes into state information using the FIPNAME,
FIPNAMEL and FIPSTATE functions.
FIPNAME returns uppercase state names. FIPNAMEL returns mixed
case state names. FIPSTATE returns an uppercase, two-character state postal
code (or world-wide GSA geographic code for U.S. territories).
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
data a;
x=fipname(37);
put x=;
y=fipnamel(37);
put y=;
z=fipstate(37);
put z=;
run;
These sample files and code examples are provided by SAS Institute
Inc. "as is" without warranty of any kind, either express or implied, including
but not limited to the implied warranties of merchantability and fitness for a
particular purpose. Recipients acknowledge and agree that SAS Institute shall
not be liable for any damages whatsoever arising out of their use of this material.
In addition, SAS Institute will provide no support for the materials contained herein.
OUTPUT to SAS log
x=NORTH CAROLINA
y=North Carolina
z=NC
Demonstrate FIPNAME, FIPNAMEL and FIPSTATE functions.
| Type: | Sample |
| Topic: | SAS Reference ==> DATA Step SAS Reference ==> Functions ==> State and ZIP Code
|
| Date Modified: | 2005-12-16 03:02:54 |
| Date Created: | 2004-09-30 14:08:58 |
Operating System and Release Information
| SAS System | Base SAS | All | n/a | n/a |