Tag: SAS

ISO 3166-1 alpha-2 (two-letter country code) format for SAS

Here is the widely-used ISO 3166-1 alpha-2 format for use in SAS. It is commonly called the two-letter country code format.

The PROC FORMAT code generates a character format, so where the raw data contains a code, such as US, it expands it to the pretty name, such as United States. As with any SAS format, applying the format does not change the underlying data.

Read more »

For more posts like this, see Heuristic Andrew.

Advanced Analytics Software’s Most Important Feature? Gartner Says it’s VCF

The IT research firm, Gartner, Inc. has released its February 2016 report, Magic Quadrant for Advanced Analytics Platforms. The report’s main graph shows the completeness of each company’s vision plotted against its ability to achieve that vision (Figure 1.) I … Continue reading

Undocumented SAS feature: Bulkloading to Netezza with ODBC interface

The SAS/ACCESS Interface to ODBC in SAS 9.4M4 states it supports bulk loading only to “Microsoft SQL Server data on Windows platforms.” However, in practice on the Windows platform it also supports bulk loading to Netezza.

Bulk loading is amazingly fast. In some of my benchmarks the duration of the whole bulk loading operation is independent of the number of rows inserted!

By default on Netezza the bulk loading interface delimits values using a pipe character, and for cases where the values contain a pipe, SAS Access Interface to ODBC unofficially supports the BL_DELIMITER option to specify an alternate delimiter. For the ODBC interface, this option is undocumented.

However, there are nuances with the BL_DELIMITER option. According to the SAS Access Interface to Netezza:

?p>Read more »

For more posts like this, see Heuristic Andrew.

Frequency of individual characters from SAS data set

This script counts the frequencies of individual ASCII characters in a single column in a SAS data set and then prints an easy-to-read report.

My initial motivation relates to delimiters. By default bulkloading data from Netezza to SAS (which is very fast) uses the pipe character as a delimiter, but my data set contained values with the pipe character, so this macro identifies alternative delimiters.

Another potential use is cracking a message encrypted using a simple letter substitution cipher.

To begin, this code creates an example data set courtesy of William Shakespeare.

Read more »

For more posts like this, see Heuristic Andrew.

Beyond the Credential – Testing: Are You Naughty or Nice?

We have all been there. You are face to face with a test question. You stare at the page or screen, your mind is racing, your eyes scanning the question and then the answer options and then the question again. Your brain is straining to recall the information. Time is ticking. Frustrated at […]

The post Beyond the Credential – Testing: Are You Naughty or Nice? appeared first on SAS Learning Post.

A short history of The Little SAS Book

In celebration of SAS Press’ 25th anniversary, Lora Delwiche and I reminisced about what it was like writing the first edition of The Little SAS Book.  You can read about it on The SAS Learning Post.