Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 10

SAS CERTFCATON PREP

GUDE: BASE PROGRAMMNG


FOR SAS 9
Editing and Debugging SAS
Programs
CSDP 688
Fall 2011
Presented by Bhavana Sharma
Objectives
O nclude a stored SAS program
O Edit SAS programs
O Clear SAS programming windows
O nterpret error messages in the SAS log
O Correct errors
O Resolve common problems
Opening a Stored SAS
Program
A SAS program that is stored in an external Iile can be
included (copied) into the code editing window using
O File shortcuts
O My Favorite Folders
O The open window
O The CLUDE command
SAS Programs
O File extension - .sas
O Editor window has Iour uses:
O Access and edit existing SAS programs
O Write new SAS programs
O Submitting SAS programs Ior execution
O Saving SAS programs
O SAS program sequence oI steps that the user submits Ior execution
O Submitting SAS programs
O Entire program
O Selection oI the program
rrors, Warnings, and Notes
O otes are written in blue.
O otes inIorm you oI what happened during processing.
O Warnings are written in green.
O Warnings indicate that a process ran but might have resulted in
something other than what you intended.
O Errors are written in red.
O An Error indicates that there was a problem in the program and
SAS could not execute the program.
Submitting Your Program
SAS Programs
O Syntax Rules Ior SAS statements
O Free-Iormat can use upper or lower case
O Usually begin with an identiIying keyword
O Can span multiple lines
O Always end with a semicolon
O Multiple statements can be on the same line
O Errors
O Misspelled key words
O Missing or invalid punctuation (missing semi-colon common)
O nvalid options
O ndicated in the Log window
SAS Programs
O utput generated Irom SAS program 2 Windows
O SAS log
O nIormation about the processing oI the SAS program
O ncludes any warnings or error messages
O Accumulated in the order the data and procedure steps are submitted
O SAS output
O Reports generated by the SAS procedures
O Accumulates output in the order it is generated
earing SAS Programming
Windows
O Text and output accumulate in the Editor, Program Editor,
Log, and utput windows throughout your SAS session.
You can clear a window by selecting Edit Clear ALL.

You might also like