Note that this page was written using SAS 9.1.3 for Windows.
Crosswalk.com USA. NEW COMPILATION of some Sunday School (Bible study) lessons I wrote weekly (before 2017 retirement). Report: Iran planning to launch a barrage of missiles against Israel (Jerusalem Post. MSA-USC Hadith Database. I know some Holy Scriptures and believe the Bible Codes are authentic.
SAS comes with many helpful datasets. One of these is called sashelp.zipcode, which contains information aboutcity names, FIPS codes , ZIP code centroids (latitude and longitude coordinates) and more. This page will take you through the process of accessing and using this data set and ZIPcode related functions.
Finding and updating the SAS ZIP code data file
First let’s figure out which version of the zip code data set is stored in the sashelp library.
From the output of proc contents, we can tell that this version of zipcode data set was created in June of 2004, and it has 16 variables and 41,988 observations. Since SAS updates the zipcode dataset on a regular basis, it is very likely that our version is very out of date. Updates can be foundhere.
(At the time this page was created the latest version was created in October 2007.)
Clearly the version on file is out of date and needs to be updated. Follow the link above to the SAS page. You will need a SAS profile in order to download the current version. Once you have downloaded and unzipped the new file you will need to use proc cimport to
import the new data file. The file= statement tells SAS where the file you want to import is stored. The library= statement tells SAS where you want the new file to be read into.
After running the program the log file tells us what has happened running proc cimport. First make sure that there are no errors. Since the file was imported successfully the log file shows that the file zipcode_oct07.cpt actually contains three files. The new file that contains unique ZIP codes, zipcode_0704_unique, now contains 18 variables and 41,759 observations.
Now that the new file has been imported correctly let’s save a permanent copy of the old file before it is replaced. First we use the libname statement to define a permanent library where the old data files can be stored. Then we use a data step to place a copy of the old data file into the permanent library. Look at the log file to make sure it was copied successfully.
Now that you have a backup copy of the original file saved in a different location you can replace it with the newer version. Make sure to check the log output to ensure that everything was copied successfully. As seen below the file sashelp.zipcode now contains 41,759 observations and 18 variables and has been successfully replaced. Remember if there are any problems replacing the file the original is still saved in a permanent library and you can start over.
Using the SAS ZIP code data file
Let’s take a look at the first ten observations in the data set to get a better understanding on what the data set has.
Besides the data file sashelp.zipcode that SAS offers in its sashelp library, SAS also offers a few ZIP code related functions. The list of functions listed below take a single ZIP code or a variable containing ZIP codes as an argument and return related information. Note that individual ZIP codes can be used with or without quotations for all the functions. However, when using a variable as the argument only the ZIPCITY function will accept a string variable. All of the functions accept numeric variables. Additional information including county, area code, latitude and longitude are contained in the datasetsashelp.zipcode as we have seen from the above proc print or from the output of proc contents.
ZIPCITY(‘90024’) will return 'Los Angeles, CA'
ZIPNAME(90024) will return 'CALIFORNIA'
ZIPNAMEL(‘90024’) will return 'California'
ZIPSTATE(‘90024’) will return 'CA'
ZIPFIPS(‘90024’) will return 6
ZIPNAME(90024) will return 'CALIFORNIA'
ZIPNAMEL(‘90024’) will return 'California'
ZIPSTATE(‘90024’) will return 'CA'
ZIPFIPS(‘90024’) will return 6
The following is a short example showing how to use the ZIP functions. First create the data set zipcode. Next create a new data set called info that defines new variables with city, state and FIPS information. Finally print the new data set to make sure we have the correct results.
Other resources
Louise Hadden and Mike Zdeb. 'ZIP Code 411: A Well-Kept SAS Secret', SUGI 31.
Conforming or Transforming?
by Meghan Kleppinger
by Meghan Kleppinger
And do not be conformed to this world, but be transformed by the renewing of your mind, so that you may prove what the will of God is, that which is good and acceptable and perfect.
Romans 12:2, NAS
Romans 12:2, NAS
“Character is always lost when a high ideal is sacrificed on the altar of conformity and popularity.” -- Charles Spurgeon
Reading down a top magazine’s list of the 100 best English-language novels published since 1923 made my pulse quicken and my heart sink. As an avid and admittedly often obnoxiously-distracted-in-public reader (I always have a book on me in case the opportunity to read arises – like when I’m waiting for coffee, caught up in traffic, or standing in a line at the department of motor vehicles, to name a few examples), I just couldn’t believe what I was seeing.
I nearly had a panic attack, not because of any distaste or disagreement over the books chosen, but because of the number of books listed that I haven’t read yet. Quickly, I made my way to both the local library and Amazon.com websites and planned to start building my reserve list and filling my online shopping cart. As I moved my mouse to the search box so I could enter my selection, a little something I like to call “common sense” came over me.
Scolding myself, I whispered with clenched teeth, “Meghan, get a hold of yourself!”
Scolding myself, I whispered with clenched teeth, “Meghan, get a hold of yourself!”
After a few deep breaths, there was a point of rational thinking when I realized that I didn’t even know who wrote the list and that more than half of the books selected would never have been personal choices simply because of my dislike for the authors or the types of literature. I know and read what I like. Occasionally, I’ll try something new or especially challenging just for fun, but mostly I’m loyal to a small circle of favorite authors.
Isn’t easy to get caught up in what everybody is doing? Polls, magazines, television advertisements and movies are constantly telling us how to think, what to wear, who to vote for, what to watch, and in this case, what to read.
As Christians, we need to be especially careful with messages dictating what is “in.” This list of books, for example, had several titles I shouldn’t read simply because I am a Christ follower. It’s not about whether I can “handle” the content, it’s about living a life that reflects and pleases Christ. When I choose to read a book, I’m making a decision to commit hours and hours engrossed in that story.
As we choose what to wear, listen to, watch, or read, we need to be remember what Scripture says about how we spend our time and what we spend our time focusing on.
As we choose what to wear, listen to, watch, or read, we need to be remember what Scripture says about how we spend our time and what we spend our time focusing on.
“…Whatever is true, whatever is honorable, whatever is right, whatever is pure, whatever is lovely, whatever is of good repute, if there is any excellence and if anything worthy of praise, dwell on these things.” (Philippians 4:8)
A friend shared with me that a literature teacher at her Christian college was constantly putting down Christian authors and their books, and encouraging the students to read “good” literature instead. Our discussion concluded with a couple of great thoughts.
First, just because something is written well, doesn’t make it “good” or appropriate for Christians. In the same way, just because something is written by a Christian, doesn’t mean it makes for a good read. Most importantly, however, how can we justify spending time on books that don’t glorify God when there are countless wholesome and well written books available… written by both Christian and non-Christian authors?
In light of eternity, when I face Jesus one day, I don’t think the excuse that I “dwelt” on something that didn’t glorify God was because, “It was an award-winning book or movie,” will fly. Actually, I would be ashamed to say I let popularity or a good story get in the way of my relationship with Him.
Basically, when my time on earth is through, I want it to be clear that transforming into the likeness of Christ was more important to me than conforming to the culture
First, just because something is written well, doesn’t make it “good” or appropriate for Christians. In the same way, just because something is written by a Christian, doesn’t mean it makes for a good read. Most importantly, however, how can we justify spending time on books that don’t glorify God when there are countless wholesome and well written books available… written by both Christian and non-Christian authors?
In light of eternity, when I face Jesus one day, I don’t think the excuse that I “dwelt” on something that didn’t glorify God was because, “It was an award-winning book or movie,” will fly. Actually, I would be ashamed to say I let popularity or a good story get in the way of my relationship with Him.
Basically, when my time on earth is through, I want it to be clear that transforming into the likeness of Christ was more important to me than conforming to the culture
Intersecting Faith & Life: As Christians, we need to remember that everything we have belongs to God… and with that in mind, consider how we are spending His time
Further Reading
Psalms 90:12
Choose This Day
How God Develops Christian Character
Choose This Day
How God Develops Christian Character
![Crosswalk Crosswalk](/uploads/1/2/6/3/126345264/910075512.png)
Check out fantastic resources on Faith, Family, and Fun at Crosswalk.com!