Base SAS is a
fourth-generation procedural programming language designed for the statistical analysis of data. It is
Turing-complete and domain specific, with many of the attributes of a
command language. As an
interpreted language, it is generally parsed, compiled, and executed step by step. The SAS system was originally a
single instruction, single data (SISD) engine, but
single instruction, multiple data (SIMD) and
multiple instruction, multiple data (MIMD) functionality was later added. Most base SAS code can be ported between versions, but some are functions and parameters are specific to certain operating systems and interfaces. All SAS programs are written within the SAS language, although some packages use menu-driven
graphical user interfaces on the
front-end. Various SAS editors use color coding to identify components like step boundaries, keywords and constants. It can read in data from common spreadsheets and databases and output the results of statistical analyses in tables, graphs, and as
RTF,
HTML and
PDF documents.
Syntax The language consists of two main types of blocks: DATA blocks and PROC blocks. DATA blocks can be used to read and manipulate input data, and create data sets. PROC blocks are used to perform analyses and operations on these data sets, sort data, and output results in the form of
descriptive statistics, tables, results, charts and plots. PROC SQL can be used to work with
SQL syntax within SAS. Users can input both numeric and character data into base SAS. SAS statements must begin with a reserved keyword and end with but the language is otherwise flexible in terms of formatting and most statements are
case insensitive. SAS statements can continue across multiple lines and do not require indenting, although indents can improve readability. A standard SAS program typically entails the definition of data, the creation of a
data set, and the performance of procedures such as analysis on that data set. The macro language can be used for functionalities as simple as symbolic substitution and as complex as
dynamic programming. although its overall syntax is very similar to that of base SAS. The names of macro variables in SAS are usually preceded by , while macro program statements are usually preceded by . == Software ==