Using SAS to convert IP addresses into numerical IP values

As citizens of the Internet, we are all familiar with IP addresses — probably more so than our Internet founding fathers had ever intended. These addresses are typically represented in a 4-piece segmented list of numbers separated by dots. Here is an example: “149.173.5.120″. Each segment is called an octet [...]

Post a Comment

Comparing data set schemas in SAS

The project that I’m currently working on requires several input data tables, and those tables must have a specific schema. That is, each input table must contain columns of a specific name, type, and length in order for the rest of the system to function correctly. The schema requirements aren’t [...]

Post a Comment

How to get your SAS data set attributes into Excel

I’m working on a SAS programming project with a large team. Each team member is responsible for a piece of the overall system, and the “contract” for how it all fits together is The Data. For example, I’ve got a piece that performs some data manipulation and produces several output [...]

Post a Comment

Take SAS program editor abbreviations to the next level

Rick posted a tip today about using abbreviations in the SAS program editor window (often referred to as the “enhanced editor”). Defining abbreviations is a great way to save keystrokes and re-use “templates” of code that you’ve squirreled away. (One of Rick’s readers also picked up on the tip, and [...]

Post a Comment

Do you mind if we dance with your DATEs (or DATETIMEs)?

I’ve been working with date-time data on a recent project, and I’ve come across a few SAS programs that have “opportunity for improvement” when it comes time to create reports. (Or maybe I haven’t, and I contrived this entire blog post so that I could reference one of my favorite [...]

Post a Comment

Calling Windows PowerShell from SAS: a simple example

As I mentioned in my introductory post about Windows PowerShell, you can use PowerShell commands as a simple and concise method to collect data from your Windows systems — information that is ripe for analysis within SAS. In this example, I’ll show a technique for using a SAS program to [...]

Post a Comment

Google Reader bundles for SAS-related blogs

I use Google Reader to keep up with SAS-related conversations on the blogosphere.   I thought it would be nice to share the lists of blogs that I follow as "shared bundles".  If you also use Google Reader, it will be very easy for you to add these bundles to [...]

Post a Comment

Using 3rd party shape files to build map charts in SAS

While talking to SAS users in Australia earlier this month, I often demonstrated the capabilities of the new Map Chart task in SAS Enterprise Guide 4.3. Creating map charts has never been easier: select your map data source, then select your response data source, and click Run. Voila! You’ve got [...]

Post a Comment

Computing age in SAS 9.3

It seems like such a simple problem: how can you reliably compute the age of someone or something? Susan lamented the subtle issues using the YRDIF function exactly 1.0356164384 years ago. Sure, you could write your own function for calculating such things, as I suggested 0.1753424658 years ago. Or you [...]

Post a Comment

How to assign a library to the same path as your SAS Enterprise Guide project

SAS Enterprise Guide sets values for several useful SAS macro variables when it connects to a SAS session, including one macro variable, &_CLIENTPROJECTPATH, that contains the name and path of the current SAS Enterprise Guide project file. (To learn about this and other macro variables that SAS Enterprise Guide assigns, [...]

Post a Comment