Data Transformations
Tips and techniques for manipulating data using various techniques including the data step, Proc SQL and other procedures such as Proc TRANSPOSE.
We send out a regular newsletter communication to our customers which include our latest SAS tips. Sign up to the Amadeus Newsletter.
-
The INDSNAME Option
- Date:
- January 2012
The INDSNAME option provides a convenient way of capturing the name of the SAS table which is contributing to the current observation being read into the data step.
-
Getting Previous Values of the Same Variable
- Date:
- October 2010
The LAG and DIF functions can be used within a data step to get the value of a variable from a previous record.
-
The Length Statement and Character Variables
- Date:
- September 2010
Sometimes if you rely on SAS to create the attributes of new variables, you don't get the result you want. You can change this by using the LENGTH statement to specify the len...
-
WHERE as an Output Data Set Option
- Date:
- September 2010
We often use the WHERE option on our input data sets – but did you know you can use it on output datasets too?
-
Solving equations using Proc FCMP
- Date:
- August 2010
In SAS 9.2, Proc FCMP can be used to define functions and subroutines that can be used in data steps. Within Proc FCMP itself, several special functions are available. One of ...
-
Zero Filling
- Date:
- July 2010
There are many occasions when it is desirable to create a template data set containing variables initialised to zero. Whereas this technique is possible using traditional data...
-
Manage Division by Zero
- Date:
- May 2010
A common problem when processing data is the generation of missing values due to a division by zero. The situation can be managed by using the divide function.
-
Using the ‘PRESORTED’ Option with Proc SORT in SAS 9.2
- Date:
- May 2010
In SAS 9.2 Proc SORT the ‘PRESORTED’ option has been added; we can use this option if we believe that our data is already sorted, causing SAS to simply verify that our assumpt...
-
Advanced Uses of the Colon Modifier
- Date:
- March 2010
In SAS, the colon (:) can be used in conjunction with all of the comparison operators (=, >, <, >=, <=, ne, in) to compare prefix’s.
-
Moving Data Between Libraries
- Date:
- March 2010
If you would like to move a data set from one library to another, rather than copy it, here's how.


