Tag: SAS

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 …

Using SAS for Data Management, Statistical Analysis, and Graphics

Our newest book, Using SAS for Data Management, Statistical Analysis and Graphics, will soon be shipping from Amazon, CRC Press, and other fine retailers. The book complements our SAS and R book, particularly for users less interested in R. It presen…

“call symputX” is the symput upgrade

SymputX is the upgrade from Call Symput. Syntax: call symputx(“macro_var_name”, character_value (or numeric to be converted to char), symbol table def); Where symput will produce a note about converting character values to numeric, symputx won’t produce such a note. Additionally it will strip leading and trailing spaces form the character value. Lastly, you can define […]

Sending an email from SAS

Have you ever wanted to know when your code completes? Or maybe you want to automate the report to include sending an email? Regardless, SAS is happy to send that email for you. The easiest way to do this is through the SMTP access method via filename statements. Example: filename sendemail email ‘toaddress@email.com’ subject=’This is […]

Computing Ages in SAS: New Function Needed

The following excerpt is from an e-mail message I sent to suggest@sas.com.  I know other people have suggested that we need a function designed specifically for computing ages, and I wanted to add my voice to that chorus. “I would like to make a suggestion for Base SAS.  SAS needs a function that is designed […]

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…

Impressed with SAS Text Miner Help Files

As a tech junkie, people in the office often come by to ask for help with various software.  As this is not a part of my job description and I have deadlines to meet, sometimes my response is “Press F1”.  Of course, this will usually open the…