Professional Documents
Culture Documents
SAS Certified Specialistmm
SAS Certified Specialistmm
Step: data step (to generate new data set) / proc step (to present, sort and analyze data)
No di inc ion be een ppe o lo e ca e e cep i hin SAS name can onl con ain le e
number and underscore (_) and cannot be started with a number.
1
Statement: The steps are made up of smaller units of code called statements. Every SAS statement
ends with a semicolon. There are four types of statements:
data step statements belong to the data step (infile, input, length statements, etc.)
proc step statements belong to the proc step (proc print statement, by statement)
global statements are global in scope and may be used anywhere in the SAS program. They do
not need to belong to a step.
macro statements are part of the SAS macro language, which is not covered by the base
certificate
Global Statements:
Option: Within statement in data step or proc step, there could be options. For example, data = in
proc print is an option.
Options can also be global ar i h op ion ha change he global e ing from heir defa l
behavior.
Pagesize: size (length) of a SAS result page (no longer in effect for later version of SAS)
Pageno: reset page number of a SAS result report (no longer in effect for later version of SAS)
Nonumber: suppress page number (no longer in effect for later version of SAS)
2
Comments: There are two ways to make comments in SAS:
Temporary SAS data is saved in WORK library and will disappear when SAS restarts. (something with
work library reference like: work.retail, work.account or without library reference like retail,
account)
Permanent SAS data is saved in the library defined in LIBNAME statement and will not disappear.
(something like disk.retail, raw.account, always with library reference).
Example1
The following SAS program is submitted at the start of a new SAS session:
The SAS data set Sasdata.Salesdata has ten observations. Which one of the following explains why a
report fails to generate?