Tag: tutorial

Import DBF in SAS

There are several ways to import DBF files in SAS. First, there is PROC DBF: filename dbfin ’employee.dbf’; proc dbf db5=dbfin out=employee; run; But in my environment (SAS 9.1.3 Windows XP; and SAS 9.2 on Windows Server 2008 with Enterprise Guide 4.2 …

Make SAS much faster with data set compression

R is fast at processing data sets, but it is limited by memory (physical RAM plus swap). SAS processes much larger data sets, but it is slow because it keeps the data sets on the hard drive. Although computer processors have become faster and memory la…

Make SAS PROC SQL UPDATE faster with CALL EXECUTE

I have an ETL job that updates 10,000 rows in a large, remote Microsoft SQL table with 700,000 rows (1.4%). (The specific brand of remote SQL database doesn’t matter: this should work equally well for any ODBC RDMS.) This tutorial shows two ways …

Connecting SAS to Access 2007 (.accdb)

Here is a working example of how to connect SAS 9.1.3 SP4 to a Microsoft Office Access 2007 .accdb data source. First, let’s use a pass through query. The file is called c:\saves.accdb and contains a table called table1. proc sql; /* create an OD…

Validating credit card numbers in SAS

Major credit card issuing networks (including Visa, MasterCard, Discover, and American Express) allow simple credit card number validation using the Luhn Algorithm (also called the “modulus 10″ or “mod 10″ algorithm). The follow…