Sample 24706: Convert state postal codes to state name
Convert state postal codes to state name with either STNAME or STNAMEL functions.
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.
/* STNAME returns an uppercase state name. STNAMEL returns a mixed */
/* case state name. */
data a;
state=stname('NC');
put state=;
state=stnamel('NC');
put state=;
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
state=NORTH CAROLINA
state=North Carolina
Convert state postal codes to state name with either STNAME or STNAMEL functions.
| Type: | Sample |
| Topic: | SAS Reference ==> DATA Step SAS Reference ==> Functions ==> State and ZIP Code
|
| Date Modified: | 2005-12-16 03:02:57 |
| Date Created: | 2004-09-30 14:09:06 |
Operating System and Release Information
| SAS System | Base SAS | All | n/a | n/a |