Let us begin with SAS

SAS remains the most popular and powerful tool for data management and statistical analysis. While other tools, particularly Stata, have similar capabilities and are easier to learn, most SAS experts have seen little reason to switch to SAS as SAS is a huge program and can handle any type and size of data. Many of its capabilities are geared towards the corporate environment rather than academia. But it would be impossible to cover even the most useful features in a single article. This article will focus on the data step and basics. After reading this article, you should be able to begin writing SAS programs to prepare your data for analysis right away.

Running Programs

Linux SAS does have an interactive mode, but almost all Linux SAS users prefer to use batch mode. To run SAS in batch mode, you start by writing your program using your text editor. Once your program is written, you will give the command to run it in Linux. It will run quietly without displaying anything on the screen. However, when it has finished, you will find at least one and probably two new files. One is a log file, containing a record of what SAS did. This includes any error messages, so you should always look at the log after running a SAS program. If the program produced any output, it would be saved in a lst file. Both of these are text files and can be read using the same text editor you used to write the program. They can also be viewed immediately using the more command in Linux.

Normally your program should have the extension .sas (e.g. program.sas), so it is easily recognized as a SAS program (including by SAS itself). SAS will give the log and list files the same name e.g. program.log and program.lst

SAS has its special format for data sets, which cannot be read by other programs. However, Stat/Transfer makes it easy to convert data sets from one format to another. Stat/Transfer is found on the Winstat servers and Linux and is very easy to use (see Using Stat/Transfer for more information). SAS saves data sets with the extension .sas7bdat

Rating: 5 / 5 (63 votes)