Professional Documents
Culture Documents
APPLICATIONS OF SELECTED
STATISTICAL PACKAGE
THE PROC STEP
Statements in the PROC step are commands that process or analyse a SAS data set.
So, the PROC step is a block of statements that specify the data set to be analysed, the
procedure to be used, and any further details of the analysis.
The step begins with a PROC statement and ends with a run statement or when the next data
or proc step starts.
THE PROC STATEMENT
The PROC statement names the procedure to be used and specify the DATA = option for the
analysis.
If the option is omitted, the procedure uses the most recently created data set.
General format:
OUTPU
T
Restricts the printout to the three variables mentioned, whereas the default would be to print
all variables.
THE WHERE STATEMENT
The WHERE statement selects the observations to be processed.
The keyword WHERE is followed by a logical condition, and only those observations for
which the condition is true are included in the analysis.
For example:
OUTPUT
THE BY STATEMENT
The observations are grouped according to the values of the variable named on the BY
statement and a separate analysis is conducted for each group.
When a BY statement appears as part of the PRINT procedure, the procedure expects the data
to be sorted in the order of the BY variables.
For example:
output
GLOBAL STATEMENTS
Global statements can occur at any point in a SAS program and remain in effect until reset.
The title statement is a global statement. For example:
* this is a comment;