Академический Документы
Профессиональный Документы
Культура Документы
2.
3.
4.
2.
are printed
3.
All SAS statements (except those containing data) must end with
asemicolon (;).
Example : "DATA example1;" is an example of a SAS statement.
Any number of SAS statements can appear on a single line provided
they are separated by a semicolon.
Example : "DATA example1; Input Name $ ID;" is an example of a SAS
statement.
SAS statements typically begin with a SAS keyword. (DATA, PROC)
SAS statements are not case sensitive, that is, they can be entered
in lowercase, uppercase, or a mixture of the two.
Example : SAS keywords (DATA, PROC) are not case sensitive
A delimited comment begins with a forward slash-asterisk (/*) and
ends with an asterisk-forward slash (*/). All text within the delimiters is
ignored by SAS.
DATA steps
DATA steps are used to manage data. In detail, DATA steps are used to
read raw or external data into a SAS data set, to modify data values, and
to subset or merge data sets.
Any portion of a SAS program that begins with a DATA statement and
ends with a RUN statement is called a DATA step.
PROC steps
PROC steps are in-built programs that allow us to analyze the data
contained in a SAS data set. PROC steps are used to calculate descriptive
statistics, to generate summary reports, and to create summary graphs
and charts.
Any portion of a SAS program that begins with a PROC statement and
ends with a RUN statement is called a PROC step.
data example2;
set example1;
if ID > 10;
run;
The SET statement allows you to read a SAS data set (example1) so you
can subset data and paste it into a new data set (example2) without
overwriting existing data set (example1).