SAS P1 L2a Flashcards
What kind of steps in SAS programs? (2)
SAS program = sequence of steps
Each performs test
2 kinds: data, proc
What does a data step do?
Data step reads data from input source,
Processes it
Makes SAS data set
Primary purpose of data step?
To make SAS data set
What is a variable in SAS?
SAS variable = column in data
What does a proc step do?
What does it generate?
Proc step:
processes SAS data set
generates reports, graph, manage data, sort
SAS program path
Raw data => data step => SAS data file => proc step => report
What are steps, in SAS program?
what is a step?
how tell where step start/end?
compilation?
SAS program: sequence of steps
step - comprised of sequence of statements
Each step has beginning and end boundary => step boundaries
Each step compiles and executes independently based on step boundaries
How does data step start?
data step - starts with data statement
How does proc step start?
proc step - starts with proc statement
How does step end? Best practice?
End = RUN, QUIT, or beginning of another step
Best practice to include RUN or QUIT
What is a global statement?
Global statement: works on more than one step
Example: TITLE
SAS statement:
begins with?
ends with?
SAS statements
begin with identifying KEY WORD
always end with “;” (semicolon)
Best practice / conventional formatting?
Data Proc Run - in column 1
other statements indented
each statement begins on new line
blank line separates each step
Benefits of conventional formatting? Required?
Benefits - easy to read
Not required - can free format, will still work