Using the Update Statement in the SAS Data Step

Using the Update Statement in the SAS Data Step

Most SAS programmers know about the Set Statement and the Merge Statement in the Data Step. Fewer know about the Update Statement. It is not as common as the two. However, it can be a quite handy tool under the right circumstances. This post demonstrates how to use...
Do While Loop vs Do Until Explained in SAS

Do While Loop vs Do Until Explained in SAS

The Do While and Do Until loops are two seemingly similar constructs in SAS. However, they are actually very different. In this post, I will present three cases where the Do While and Do Until loops differ. Also, I will shortly discuss when to use which one. 1. Do...
Three Other PROC SORT Options You Should Know

Three Other PROC SORT Options You Should Know

In the blog post Three PROC SORT Options You Should Know, I demonstrate how to use the three options Sortsize, Tagsort and Presorted. Sorting data is usually the most CPU and time consuming part of a data flow. Therefore, you should familiarize yourself with PROC SORT...
Creating Multilabel Formats in SAS with PROC FORMAT

Creating Multilabel Formats in SAS with PROC FORMAT

Multilabel formats allow programmers to create overlapping classes in SAS. This can be quite handy when the classes are not mutually exclusive. This post demonstrates how to handle such cases with the Multilabel Option in the Format Procedure. In the examples to come,...
AVL Tree Distribution in SAS Hash Objects Explained

AVL Tree Distribution in SAS Hash Objects Explained

When a SAS Hash Object encounters a key value, it runs the value through a Hash Function. The hash function assigns the key value to a bucket called an AVL Tree. This post demonstrates an example of how this distribution takes place and why it plays a crucial role in...
The Meaning of If 0 Then Set in SAS Data Step

The Meaning of If 0 Then Set in SAS Data Step

Once in a while, you see a SAS programming statement that makes little sense. For many, the If 0 Then Set data step Statement is one of them. This post demonstrates what the statement does and why it can be convenient by example. A SAS data step runs in two overall...