All SAS programs consist of a sequence of "steps". There
are only two kinds of steps:
- Data Step
- PROC Step
DATA step
- A DATA step creates a SAS dataset (a collection
of data together with a "data dictionary",
which defines the variables and their properties).
Data must be in the form of a SAS dataset before it
can be analysed by SAS procedures.
In the example SAS program, these lines create the dataset CLASS from raw data input:
DATA CLASS; INPUT NAME $ SEX $ AGE HEIGHT WEIGHT; CARDS; Edmund M 35 59.0 99.5 Baldric M 31 57.3 83.0 Bob F 21 47.3 61.0 ... (more data lines)
PROC step
- A PROCedure step calls a SAS procedure to analyse
or process a data.
In the example SAS program, these lines call two SAS procedures to analyze the CLASS dataset:
PROC PRINT; PROC MEANS; VARIABLES HEIGHT WEIGHT;
A SAS program can contain any number of DATA and PROC steps. The
SAS statements in each step are executed all together.
