Usage Note 19861: How to replace the Sashelp.Zipcode data set
The Sashelp.Zipcode data set contains information about ZIP codes. Because ZIP codes can change frequently, the Zipcode data set needs to be updated as well. Updated versions of the Zipcode data set are available from the Maps Online facility:
https://support.sas.com/en/knowledge-base/maps-geocoding/geocodes.html
You can download the CPORT file corresponding to the version of the Zipcode data set that you want. Once you have that file, you need to do the following in order to replace the existing Sashelp.Zipcode data set:
- Use the CIMPORT procedure to import the file into a SAS® data library. For example:
proc cimport file='zipcode.cpt' lib=sashelp;
run;
Note: You need to replace zipcode.cpt referenced above with the full path and name of the transport file that was downloaded. Each version of the file is named according to the date on which it was created.
- Use the DATASETS procedure to delete the existing Zipcode data set from the Sashelp library. Rename the new Zipcode data set and index from the unique name representing the version of the ZIP code file to Zipcode. For example:
proc datasets lib=sashelp;
delete zipcode;
run;
change zipcode_yyQn=zipcode;
run;
quit;
You need to replace zipcode_yyQn in the CHANGE statement above to reflect the name of the data set that is created from the transport file. The data set is named in the form: Zipcode_yy, where yy is the two-digit year and n is the quarter in which the data set was created.
You must have Write access to the Sashelp library in order to place the data set in the library.
To set Write permissions for your account to the Sashelp library, typically C:\Program Files\SAS\SASFoundation\9.x\core\sashelp, follow the seven steps only in the section entitled "Setting File and Folder Permissions" in the following Microsoft article.
If you have problems performing these steps, contact your company's IT staff or system administrator.
Note for z/OS sites: You should move the zipcode.cpt file to z/OS in binary mode, to a file with DCB characteristics of RECFM=FB, LRECL=80, and BLKSIZE=8000.
Operating System and Release Information
SAS System | SAS/GRAPH | z/OS | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M0 | |
Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M0 | |
Microsoft Windows XP Professional | 9.2 TS2M0 | |
64-bit Enabled AIX | 9.2 TS2M0 | |
64-bit Enabled HP-UX | 9.2 TS2M0 | |
64-bit Enabled Solaris | 9.2 TS2M0 | |
HP-UX IPF | 9.2 TS2M0 | |
Linux | 9.2 TS2M0 | |
OpenVMS Alpha | 9.2 TS2M0 | |
Tru64 UNIX | 9.2 TS2M0 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Usage Note |
Priority: | |
Topic: | Query and Reporting ==> Creating Reports ==> Graphical ==> Graph Types ==> Maps
|
Date Modified: | 2023-04-05 13:51:38 |
Date Created: | 2007-03-27 16:50:34 |