What is the SAS tool ?


2007, Feb 03 edited
tags: SAS code software 


SAS is a software suite, allowing data management, modelling and statistical analysis. This tool is developed by SAS Institute, its editor based in Carry in North Carolina (USA). It's licensed via several modules each one dealing with one or more topics. The different analysis tools used to process and analysze the data, are called procedures ('PROC').

This modularity allows each user to build his set of tools according to his needs, completing the BASE module de base (SAS/BASE). But this is not the only peculiarity of this tool.




Basic use of the SAS IDE



Once the code was entered in the PGM window, the user can submit this program for the SAS code to be interpreted by the software. It's possible to follow along its correct execution by looking at the LOG window, and afterwards look at the printed results in the OUT window.

In more recent SAS versions (V8 in particular), an additional window "EXPLORER" allows navigating through the data librairies and visualize each output files.

Next will describe the two main steps of the data processing via SAS: the DATA step and the PROC procedures.




The most used instruction the DATA step



It's the basic tool allowing to build, modify, merge, concatenate data tables in SAS. This command step can be categorized by the fact that it's start by the DATA instruction, and end by a "RUN;" instruction. This DATA step can also create tables from scratch thanks to the CARDS option.




The procedures PROC



The PROC instructions correspond to the SAS function libraries, that have in general as specific purpose. The 1st SAS module is called SAS/BASE it groups the elementary procedures of data management. As an example the SORT procedure is used to sort a data table with several options: duplicate removal, storing of the sorted table in a new output table. Another example is the SQL procedure that allows running SQL code directly inside a SAS program.

The general syntax for each of these procedures is the following : PROC 'PROCEDURE_NAME ' DATA='INPUT_TABLE' [OPTIONS ].




The macro commands



The SAS language also comes with a series of macro commands (commands always prefixed with a '%') that allows creating parametrized scripts (with the %macro instruction ), dialog boxes (with the instruction %window) and managed conditional execution of commands (with the instruction %if ... %then ... %else).



Interesting sources of information about the SAS software



It would be impossible to cover all the sources of information related to the SAS software, in particular given the huge number of user communities around the globe the SAS User Groups (SASUGs). Happily finding quality content is quite easy on the net. Query your favorite search engine... Obviously the editor's site is a good site to start with so check http://www.sas.com, and then look for the user groups near your area.
The fuel of coding inspiration:music, travel, photography and whatever drives creativity to code.

You might also like