Posts Tagged ‘ sas programming ’

The GCD and LCM functions in SAS

November 10, 2013
By
The GCD and LCM functions in SAS

My daughter's middle school math class recently reviewed how to compute the greatest common factor (GCF) and the least common multiple (LCM) of a set of integers. (The GCF is sometimes called the greatest common divisor, or GCD.) Both algorithms require factoring integers into a product of primes. While helping
Read more »

Tags: , ,
Posted in SAS | Comments Off

Your data ain’t good looking, but it has a nice cardinality

October 16, 2013
By
Your data ain’t good looking, but it has a nice cardinality

Data cardinality is an important topic for for data analysis. In mathematical terms, cardinality is simply the number of elements in a set. But in data applications, cardinality signifies the number of unique values for a given field of data. Related terms include number of levels (thank you, PROC FREQ
Read more »

Tags: , ,
Posted in SAS | Comments Off

Put them back the way you found them: restoring SAS titles

October 1, 2013
By

Has this ever happened to you? You have a SAS program with statements that you wrote, then you make use of a macro function or %include file supplied by a helpful colleague, and when your SAS code resumes, you find that all of your SAS titles have been changed out
Read more »

Tags: , , ,
Posted in SAS | Comments Off

Copy a file using a SAS program: another method

September 18, 2013
By

A couple of years ago I shared a method for copying any file within a SAS program. It was a simple approach, copying the file byte-by-byte from one fileref (SAS file reference) to another. My colleague Bruno Müller, a SAS trainer in Switzerland, has since provided a much more robust
Read more »

Tags: , , , , ,
Posted in SAS | Comments Off

Errors that cause SAS to "freeze"… and what to do about them

August 19, 2013
By

Even the best programmers make mistakes. For most errors, SAS software displays the nature and location of the error, returns control to the programmer, and awaits further instructions. However, there are a handful of insidious errors that cause SAS to think that a statement or program is not finished. For
Read more »

Tags: , ,
Posted in SAS | Comments Off

SAS Tech Talk: What’s new in the SAS programming language?

August 15, 2013
By

In SAS 9.4, the SAS programming language continues add new features by the truckload. I've already discussed PROC DELETE (which is actually an old feature, but like an 80s hit song it's now back with a better version). In this SAS Tech Talk video from SAS Global Forum 2013, I
Read more »

Tags: , , , ,
Posted in SAS | Comments Off

Read what you need

August 6, 2013
By

With the pervasiveness of mobile devices, being able to read while “on the go” has been easier than ever. How many times have you found yourself in a situation where you pass the time waiting by reading something on your phone/iPad/tablet etc? With...
Read more »

Tags: , , ,
Posted in SAS | Comments Off

How does the IF-THEN statement in SAS treat a missing value?

July 8, 2013
By
How does the IF-THEN statement in SAS treat a missing value?

Every programming language has an IF-THEN statement that branches according to whether a Boolean expression is true or false. In SAS, the IF-THEN (or IF-THEN/ELSE) statement evaluates an expression and braches according to whether the expression is nonzero (true) or zero (false). The basic syntax is if numeric-expression then    do-computation;
Read more »

Tags: , ,
Posted in SAS | Comments Off

Proc-x is looking for sponsors!

Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: [email protected]

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.