SAS: Base Programming Flashcards
Lesson 1: Getting Started with SAS
SAS Modes
Interactive
Batch
Noninteractive
Lesson 1: Getting Started with SAS
Interactive Mode
Code runs immediately
Lesson 1: Getting Started with SAS
Batch Mode
SAS runs the program in the background by submitting it to the operating environment for batch execution.
Program runs when the computer has resources available.
Lesson 1: Getting Started with SAS
Noninteractive Mode
Store store SAS programming statements in a file.
When you issue a SAS command referencing the file, SAS opens, execute the code immediately, and stores any log messages and output in files.
Then SAS closes.
Lesson 1: Getting Started with SAS
Types of steps in a SAS program?
Data or Proc
Lesson 1: Getting Started with SAS
Data Step
A DATA step typically takes data, processes it, and creates a SAS data set, which is data in a form that SAS understands.
A DATA step can create new variables.
Lesson 1: Getting Started with SAS
Proc Step
A PROC step typically processes a SAS data set.
PROC steps can generate reports and graphs, manage data, and sort data.
Lesson 1: Getting Started with SAS
Data read by SAS
Oracle files
SAS data sets
Raw data files
Excel files
Other types of files
Lesson 1: Getting Started with SAS
Tasks useful in interactive mode
Debugging programs
Editing programs
Testing programs
Writing programs
Lesson 2: Navigating and Using the SAS Interface
Three main programming windows
Editor window
Log window
Output window
Lesson 2: Navigating and Using the SAS Interface
True statements about SAS output
Can create both listing and HTML output
Manage all SAS output in results window
Listing and HTML output are seperate in the results window
Lesson 2: Navigating and Using the SAS Interface
Editor Window
Also known as Enhanced Editor
Lesson 2: Navigating and Using the SAS Interface
Program Editor Window
Default code editor in operating environments other than Windows
Lesson 2: Navigating and Using the SAS Interface
Log Window
Provides messages about your program
Lesson 2: Navigating and Using the SAS Interface
Output window
SAS continually adds output to this window
Lesson 2: Navigating and Using the SAS Interface
Results vs Output Windows
Results window displays a tree view of output that is created during a SAS session.
Output window is available in all SAS environment.
Lesson 2: Navigating and Using the SAS Interface
Are session result preferences stored in SAS program.
No
Lesson 2: Navigating and Using the SAS Interface
What can be done in Explorer window?
Move, copy and delete SAS files
View contents of SAS libraries
Open and create new SAS files
Lesson 3: Working with SAS Code
Diagnosing and correcting unbalanced quotation marks

Lesson 3: Working with SAS Code
Diagnosing and correcting syntax errors

Lesson 3: Working with SAS Code
Syntax Error
When programming statements don’t conform to the rules of the SAS language at compile time
Lesson 3: Working with SAS Code
Semantic Error
When the language element is correct, but the element might not be valid for a particular usage at compile time
Lesson 3: Working with SAS Code
Execution Time Error
When SAS attempts to execute a program and execution fails at execution time
Lesson 3: Working with SAS Code
Data Error
When data values are invalid at execution time






















































