Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
48Activity
0 of .
Results for:
No results containing your search query
P. 1
SAS_Certification_Prep_Guide > SAS Certification Prep Guide

SAS_Certification_Prep_Guide > SAS Certification Prep Guide

Ratings: (0)|Views: 3,131 |Likes:
Published by api-3744675

More info:

Published by: api-3744675 on Oct 18, 2008
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less

05/09/2014

pdf

text

original

SAS Certification Prep Guide: Base
Programming for SAS 9
Table of Contents
Chapter 1: Basic Concepts...................................................................12

Overview........................................................................................................................12
Introduction................................................................................................................12
Objectives..................................................................................................................13
SAS Programs..................................................................................................... . . . . . . . . . .13
Components of SAS Programs.......................................................... . . . . . . . . . . . . . . . . . . . . . . .13
Characteristics of SAS Programs....................................................................... . . . . . . .14
Layout for SAS Programs............................................................................... . . . . . . . . . .15
Processing SAS Programs.........................................................................................15
Log Messages............................................................................................................15
Results of Processing............................................................................... . . . . . . . . . . . . . . . . .16
SAS Libraries......................................................................................................... . . . . . . .18
How SAS Files Are Stored............................................................ . . . . . . . . . . . . . . . . . . . . . . . . . . .19
Storing Files Temporarily or Permanently........................................................ . . . . . . . .19
Referencing SAS Files........................................................................................ . . . . . . . . . .20
Two-Level Names......................................................................................... . . . . . . . . . . . .20
Referencing Temporary SAS Files............................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Referencing Permanent SAS Files..................................................................... . . . . . . .21
Rules for SAS Names....................................................................... . . . . . . . . . . . . . . . . . . . . . . . .22
SAS Data Sets................................................................................................. . . . . . . . . . . . . . .22
Overview of Data Sets......................................................................... . . . . . . . . . . . . . . . . . . . . .22
Descriptor Portion........................................................................................... . . . . . . . . . .23
Data Portion.......................................................................................... . . . . . . . . . . . . . . . . . . . .23
Observations (Rows)............................................................................................. . . . .23

Variable Attributes............................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . .24 Name..........................................................................................................................24 Type............................................................................................................................24

Length........................................................................................................................25
Format........................................................................................................................25
Informat......................................................................................................................26
Label..........................................................................................................................26
Variables (Columns)..................................................................................................27
Missing Values.......................................................................................... . . . . . . . . . . . . . . . .27
Summary......................................................................................................... . . . . . . . . . . . . . .28
Text Summary............................................................................................... . . . . . . . . . . . .28
Points to Remember...................................................................................................30
Quiz................................................................................................................................30

Chapter 2: Referencing Files and Setting Options................................34

Overview........................................................................................................................34
Introduction................................................................................................................34
Objectives..................................................................................................................34
Referencing Files..................................................................................... . . . . . . . . . . . . . . . . . . . . .34
SAS Libraries..................................................................................................... . . . . . . .34
Assigning Librefs............................................................................................... . . . . . . .34

2

Verifying Librefs............................................................................................. . . . . . . . . . .35
How Long Librefs Remain in Effect........................................... . . . . . . . . . . . . . . . . . . . . . . . . . . . . .36
Specifying Two-Level Names....................................................................................36
Other Formats............................................................................................................36
Viewing the Contents of SAS Libraries................................................................ . . . . . . . .38
The CONTENTS Procedure................................................................ . . . . . . . . . . . . . . . . . . . . .38
The DATASETS Procedure........................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . .40

Setting SAS System Options............................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . .41
SAS Output.............................................................................................. . . . . . . . . . . . . . . . . .41
Handling Two-Digit Year Values: Year 2000 Compliance..................................... . . .46
Viewing System Options.............................................................................................. .50
The OPTIONS Procedure..................................................................... . . . . . . . . . . . . . . . . . . . .50
Additional System Options............................................................................. . . . . . . . . . . . . . .51
Summary......................................................................................................... . . . . . . . . . . . . . .52
Text Summary............................................................................................... . . . . . . . . . . . .52
Points to Remember........................................................................................ . . . . . . . . . .53
Quiz................................................................................................................................53

Chapter 3: Editing and Debugging SAS Programs................................57

Overview........................................................................................................................57
Introduction................................................................................................................57
Objectives..................................................................................................................58
SAS Program Layout................................................................................... . . . . . . . . . . . . . . . . .58
Interpreting Error Messages...................................................................................... . . . .58

Error Types............................................................................................................ . . . .59

Syntax Errors................................................................................. . . . . . . . . . . . . . . . . . . . . . . . . . . .59
Correcting Errors...........................................................................................................60
Resubmitting a Revised Program............................................................................. .60
Resolving Common Problems.............................................................. . . . . . . . . . . . . . . . . . . . . . . . .62
Missing RUN Statement....................................................................... . . . . . . . . . . . . . . . . . . . .62
Missing Semicolon....................................................................................................63
Unbalanced Quotation Marks.............................................................. . . . . . . . . . . . . . . . . . . . . .64
Invalid Option.......................................................................................... . . . . . . . . . . . . . . . . .66
Additional Features............................................................................................. . . . . . . . . . .66
Comments in SAS Programs......................................................... . . . . . . . . . . . . . . . . . . . . . . . . . . .66
SAS System Options.......................................................................................... . . . . . . .67
Summary......................................................................................................... . . . . . . . . . . . . . .67
Text Summary............................................................................................... . . . . . . . . . . . .67
Points to Remember........................................................................................ . . . . . . . . . .68
Quiz................................................................................................................................68

Chapter 4: Creating List Reports..........................................................71

Overview........................................................................................................................71
Introduction................................................................................................................71
Objectives..................................................................................................................72
Types of Reports..................................................................................... . . . . . . . . . . . . . . . . . . . . . .72
Basic Report....................................................................................................... . . . . . . .72

Column Totals............................................................................................. . . . . . . . . . . . . . .73
3

Activity (48)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
lusienopop liked this
defconbond007 liked this
asong_soekamti liked this
dransomhall liked this
cucumber4 liked this
chubbs888 liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->