The Little Sas Book


Getting started with SAS is easy with The Little SAS Book. This friendly, easy-to-read guide gently introduces you to the most commonly used features of SAS software plus a whole lot more! Authors Lora Delwiche and Susan Slaughter have revised the text to include concepts of the Output Delivery System; the STYLE= option in the PRINT, REPORT, and TABULATE procedures; ODS HTML, RTF, PRINTER, and OUTPUT destinations; PROC REPORT; more on PROC TABULATE; exporting data; and the colon modifier for informats. You'll ...
See more details below
Available through our Marketplace sellers and in stores.

Pick Up In Store Near You

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (12) from $9.92   
  • New (2) from $105.00   
  • Used (10) from $9.92   
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any coupons and promotions
Seller since 2014

Feedback rating:



New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Seller since 2014

Feedback rating:


Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Sort by
Sending request ...


Getting started with SAS is easy with The Little SAS Book. This friendly, easy-to-read guide gently introduces you to the most commonly used features of SAS software plus a whole lot more! Authors Lora Delwiche and Susan Slaughter have revised the text to include concepts of the Output Delivery System; the STYLE= option in the PRINT, REPORT, and TABULATE procedures; ODS HTML, RTF, PRINTER, and OUTPUT destinations; PROC REPORT; more on PROC TABULATE; exporting data; and the colon modifier for informats. You'll find clear and concise explanations of basic SAS concepts (such as DATA and PROC steps), inputting data, modifying and combining data sets, summarizing and presenting data, basic statistical procedures, and debugging SAS programs. Each topic is presented in a self-contained, two-page layout complete with examples and graphics. This format enables new users to get up and running quickly, while the examples allow you to type in the program and see it work!
Read More Show Less

Product Details

  • ISBN-13: 9781590473337
  • Publisher: SAS Institute Inc.
  • Publication date: 10/13/2003
  • Edition number: 3
  • Pages: 352
  • Product dimensions: 7.50 (w) x 9.25 (h) x 0.73 (d)

Meet the Author

Lora D. Delwiche brings over 16 years of expertise in working with the SAS System to this edition. She is an applications software consultant with Information Technology at the University of California at Davis. Lora shares her valuable skills as a SAS site representative and teaches classes on the SAS language. Her experience in working with users from many different disciplines prompted her to write a book that proves that it can be enjoyable to learn the SAS System!

Susan J. Slaughter, an independent computing consultant, discovered SAS software over 16 years ago in graduate school. Since then, she has used the SAS System in a variety of business and academic settings. Her experience in managing large databases, teaching SAS software classes, and writing about the SAS System inspired her to write a book that is both informative and fun to read!

Read More Show Less

Read an Excerpt

The SAS Language

Many software applications are either menu driven, or command driven (enter a command-gee the result). SAS is neither. With SAS, you use statements to write a series of instructions called a SAS program. The program communicates what you want to do and is written using the SAS language. There are some menu-driven front ends to SAS, SAS/ASSIST software for example, which make SAS appear like a point-and-click program. However, these front ends still use the SAS language to write programs for you. You will have much more flexibility using SAS if you learn to write your own programs using the SAS language. Maybe learning a new language is the last thing you want to do, but be assured that although there are parallels between SAS and languages you know (be they English or FORTRAN), SAS is much easier to learn.

SAS programs A SAS program is a sequence of statements executed in order. A statement gives information or instructions to SAS and must be appropriately placed in the program. An everyday analogy to a SAS program is a trip to the bank. You enter your bank, stand in line, and when you finally reach the teller's window, you say what you want to do. The statements you give can be written down in the form of a program:

I would like to make a withdrawal. My account number is 0937. I would like $200. Give me five 20s and two 50s. Note that you first say what you want to do, then give all the information the teller needs to carry out your request. The order of the subsequent statements may not be important, but you must start with the general statement of what you want to do. You would not, for example, go up to a bank teller and say, "Give me five 20s and two 50s." This is not only bad form, but would probably make the teller's heart skip a beat or two. You must also make sure that all the subsequent statements belong with the first. You would not say, "I want the largest box you have" when making a withdrawal from your checking account. This statement belongs with "I would like to open a safe deposit box." A SAS program is an ordered set of SAS statements like the ordered set of instructions you use when you go to the bank. SAS statements As with any language, there are a few rules to follow when writing SAS programs. Fortunately for us, the rules for writing SAS programs are much fewer and simpler than those for English.

The most important rule is

Every SAS statement ends with a semicolon. This sounds simple enough. But while children generally outgrow the habit of forgetting the period at the end of a sentence, SAS programmers never seem to outgrow forgetting the semicolon at the end of a SAS statement. Even the most experienced SAS programmer will at least occasionally forget the semicolon. You will be two steps ahead if you remember this simple rule.

Layout of SAS programs There really aren't any rules about how to format your SAS program. While it is helpful to have a neat looking program with each statement on a line by itself and indentions to show the various parts of the program, it isn't necessary.

SAS statements can be in upper- or lowercase. Statements can continue on the next line (as long as you don't split words in two). Statements can be on the same line as other statements. Statements can start in any column. So you see, SAS is so flexible that it is possible to write programs so disorganized that no one can read them, not even you. (Of course, we don't recommend this.)

Comments To make your programs more understandable, you can insert comments into your programs. It doesn't matter what you put in your comments-SAS doesn't look at it. You could put your favorite cookie recipe in there if you want. However, comments are usually used to annotate the program, making it easier for someone to read your program and understand what you have done and why.

There are two styles of comments you can use: one starts with an asterisk (*) and ends with a semicolon (;). The other style starts with a slash asterisk (/*) and ends with an asterisk slash (*/). The following SAS program shows the use of both of these style comments:

DATA animals; INFILE 'c:\MyRawData\Zoo.dat'; INPUT Lions Tigers; PROC PRINT DATA = animals;t;rls~G..h;xst3,- "RUN; Since some operating environments interpret a slash asterisk (/*) in the first column as the end of a job, be careful when using this style of comment not to place it in the first column. For this reason, we chose the asterisk-semicolon style of comment for this book.

Errors People who are just learning a programming language often get frustrated because their programs do not work correctly the first time they write them. To make matters worse, SAS errors often come up in bright red letters, and for the poor person whose results turn out more red than black, this can be a very humbling experience. You should expect errors. Most programs simply don't work the first time, if for no other reason than that you are human. You forget a semicolon, misspell a word, have your fingers in the wrong place on the keyboard. It happens. Often one small mistake can generate a whole list of errors. Don't panic if you see red.

1:2- SAS Data Sets

Before you run an analysis, before you write a report, before you do anything with your data, SAS must be able to read your data. Before SAS can read your data, the data must be in a special form called a SAS data set.' Getting your data into a SAS data set is usually quite simple as SAS is very flexible and can read almost any data. Once your data have been read into a SAS data set, SAS keeps track of what is where and in what form. All you have to do is specify the name and location of the data set you want, and SAS figures out what is in it.

Variables and observations Data, of course, are the primary constituent of any data set. In traditional SAS terminology the data consist of variables and observations. Adopting the terminology of relational databases, SAS data sets are also called tables, observations are also called rows, and variables are also called columns. Below you see a rectangular table containing a small data set. Each line represents one observation, while Id, Name, Height, and Weight are variables. The data point Charlie is one of the values of the variable Name and is also part of the second observation.

Data types Raw data come in many different forms, but SAS simplifies this. In SAS there are just two data types: numeric and character. Numeric fields are, well, numbers. They can be added and subtracted, can have any number of decimal places, and can be positive or negative. In addition to numerals, numeric fields can contain plus signs (+), minus signs (-), decimal points (.), or E for scientific notation. Character data are everything else. They may contain numerals, letters, or special characters (such as $ or!) and can be up to 32,767 characters long.

If a variable contains letters or special characters, it must be character data. However, if it contains only numbers, then it may be numeric or character. You should base your decision on how you will use the variable! Sometimes data that consist solely of numerals make more sense as character data than as numeric. ZIP codes, for example, are made up of numerals, but it just doesn't make sense to add, subtract, multiply, or divide ZIP codes. Such numbers make more sense as character data. In the previous data set, Name is obviously a character variable, and Height and Weight are numeric. ID, however, could be either numeric or character. It's your choice.

There are exceptions. If your data are in a format written by another software product, you may be able to read your data directly without creating a SAS data set. For database management systems and spreadsheets, you may be able to use SAS/ACCESS. See section 2.18 for more information. For SPSS you can use the SPSS data engine. See appendix D.

If disk space is a problem, you may also choose to base your decision on storage size. You can use the LENGTH statement, discussed in section 8.15, to control the storage size of variables.....

Read More Show Less

Table of Contents

Acknowledgments ix
Introducing SAS Software x
About This Book xi
What's New xiv
Chapter 1 Getting Started Using SAS Software
1.1 The SAS Language 2
1.2 SAS Data Sets 4
1.3 The Two Parts of a SAS Program 6
1.4 The DATA Step's Built-in Loop 8
1.5 Choosing a Mode for Submitting SAS Programs 10
1.6 Windows and Commands in the SAS Windowing Environment 12
1.7 Submitting a Program in the SAS Windowing Environment 14
1.8 Reading the SAS Log 16
1.9 Viewing Your Results in the Output Window 18
1.10 Creating HTML Output 20
1.11 SAS Data Libraries 22
1.12 Viewing Data Sets with SAS Explorer 24
1.13 Using SAS System Options 26
Chapter 2 Getting Your Data into SAS
2.1 Methods for Getting Your Data into SAS 30
2.2 Entering Data with the Viewtable Window 32
2.3 Reading Files with the Import Wizard 34
2.4 Telling SAS Where to Find Your Raw Data 36
2.5 Reading Raw Data Separated by Spaces 38
2.6 Reading Raw Data Arranged in Columns 40
2.7 Reading Raw Data Not in Standard Format 42
2.8 Selected Informats 44
2.9 Mixing Input Styles 46
2.10 Reading Messy Raw Data 48
2.11 Reading Multiple Lines of Raw Data per Observation 50
2.12 Reading Multiple Observations per Line of Raw Data 52
2.13 Reading Part of a Raw Data File 54
2.14 Controlling Input with Options in the INFILE Statement 56
2.15 Reading Delimited Files with the DATA Step 58
2.16 Reading Delimited Files with the IMPORT Procedure 60
2.17 Reading PC Files with the IMPORT Procedure 62
2.18 Reading PC Files with DDE 64
2.19 Temporary versus Permanent SAS Data Sets 66
2.20 Using Permanent SAS Data Sets with LIBNAME Statements 68
2.21 Using Permanent SAS Data Sets by Direct Referencing 70
2.22 Listing the Contents of a SAS Data Set 72
Chapter 3 Working with Your Data
3.1 Creating and Redefining Variables 76
3.2 Using SAS Functions 78
3.3 Selected SAS Functions 80
3.4 Using IF-THEN Statements 82
3.5 Grouping Observations with IF-THEN/ELSE Statements 84
3.6 Subsetting Your Data 86
3.7 Working with SAS Dates 88
3.8 Selected Date Informats, Functions, and Formats 90
3.9 Using the RETAIN and Sum Statements 92
3.10 Simplifying Programs with Arrays 94
3.11 Using Shortcuts for Lists of Variable Names 96
Chapter 4 Sorting, Printing, and Summarizing Your Data
4.1 Using SAS Procedures 100
4.2 Subsetting in Procedures with the WHERE Statement 102
4.3 Sorting Your Data with PROC SORT 104
4.4 Printing Your Data with PROC PRINT 106
4.5 Changing the Appearance of Printed Values with Formats 108
4.6 Selected Standard Formats 110
4.7 Creating Your Own Formats Using PROC FORMAT 112
4.8 Writing Simple Custom Reports 114
4.9 Summarizing Your Data Using PROC MEANS 116
4.10 Writing Summary Statistics to a SAS Data Set 118
4.11 Counting Your Data with PROC FREQ 120
4.12 Producing Tabular Reports with PROC TABULATE 122
4.13 Adding Statistics to PROC TABULATE Output 124
4.14 Enhancing the Appearance of PROC TABULATE Output 126
4.15 Changing Headers in PROC TABULATE Output 128
4.16 Specifying Multiple Formats for Data Cells in PROC TABULATE Output 130
4.17 Producing Simple Output with PROC REPORT 132
4.18 Using Define Statements in PROC REPORT 134
4.19 Creating Summary Reports with PROC REPORT 136
4.20 Adding Summary Breaks to PROC REPORT Output 138
4.21 Adding Statistics to PROC REPORT Output 140
Chapter 5 Enhancing Your Output with ODS
5.1 Concepts of the Output Delivery System 144
5.2 Tracing and Selecting Procedure Output 146
5.3 Creating SAS Data Sets from Procedure Output 148
5.4 Using ODS Statements to Create HTML Output 150
5.5 Using ODS Statements to Create RTF Output 152
5.6 Using ODS Statements to Create PRINTER Output 154
5.7 Customizing Titles and Footnotes 156
5.8 Customizing PROC PRINT Output with the STYLE= Option 158
5.9 Customizing PROC REPORT Output with the STYLE= Option 160
5.10 Customizing PROC TABULATE Output with the STYLE= Option 162
5.11 Adding Traffic-Lighting to Your Output 164
5.12 Selected Style Attributes 166
Chapter 6 Modifying and Combining SAS Data Sets
6.1 Modifying a Data Set Using the SET Statement 170
6.2 Stacking Data Sets Using the SET Statement 172
6.3 Interleaving Data Sets Using the SET Statement 174
6.4 Combining Data Sets Using a One-to-One Match Merge 176
6.5 Combining Data Sets Using a One-to-Many Match Merge 178
6.6 Merging Summary Statistics with the Original Data 180
6.7 Combining a Grand Total with the Original Data 182
6.8 Updating a Master Data Set with Transactions 184
6.9 Using SAS Data Set Options 186
6.10 Tracking and Selecting Observations with the IN= Option 188
6.11 Writing Multiple Data Sets Using the OUTPUT Statement 190
6.12 Making Several Observations from One Using the OUTPUT Statement 192
6.13 Changing Observations to Variables Using PROC TRANSPOSE 194
6.14 Using SAS Automatic Variables 196
Chapter 7 Writing Flexible Code with the SAS Macro Facility
7.1 Macro Concepts 200
7.2 Substituting Text with Macro Variables 202
7.3 Creating Modular Code with Macros 204
7.4 Adding Parameters to Macros 206
7.5 Writing Macros with Conditional Logic 208
7.6 Writing Data-Driven Programs with CALL SYMPUT 210
7.7 Debugging Macro Errors 212
Chapter 8 Using Basic Statistical Procedures
8.1 Examining the Distribution of Data with PROC UNIVARIATE 216
8.2 Producing Statistics with PROC MEANS 218
8.3 Testing Categorical Data with PROC FREQ 220
8.4 Examining Correlations with PROC CORR 222
8.5 Using PROC REG for Simple Regression Analysis 224
8.6 Reading the Output of PROC REG 226
8.7 Using PROC ANOVA for One-Way Analysis of Variance 228
8.8 Reading the Output of PROC ANOVA 230
8.9 Graphical Interfaces for Statistical Analysis 232
Chapter 9 Exporting Your Data
9.1 Methods for Exporting Your Data 236
9.2 Writing Files Using the Export Wizard 238
9.3 Writing Delimited Files with the EXPORT Procedure 240
9.4 Writing PC Files with the EXPORT Procedure 242
9.5 Writing Raw Data Files with the DATA Step 244
9.6 Writing Delimited and HTML Files using ODS 246
9.7 Sharing SAS Data Sets with Other Types of Computers 248
Chapter 10 Debugging Your SAS Programs
10.1 Writing SAS Programs That Work 252
10.2 Fixing Programs That Don't Work 254
10.3 Searching for the Missing Semicolon 256
10.4 Note: INPUT Statement Reached Past the End of the Line 258
10.5 Note: Lost Card 260
10.6 Note: Invalid Data 262
10.7 Note: Missing Values Were Generated 264
10.8 Note: Numeric Values Have Been Converted to Character (or Vice Versa) 266
10.9 DATA Step Produces Wrong Results but No Error Message 268
10.10 The DATA Step Debugger 270
10.11 Error: Invalid Option, Error: The Option Is Not Recognized, or Error: Statement Is Not Valid 272
10.12 Note: Variable Is Uninitialized or Error: Variable Not Found 274
10.13 SAS Truncates a Character Variable 276
10.14 SAS Stops in the Middle of a Job 278
10.15 SAS Runs Out of Memory or Disk Space 280
A Where to Go from Here 284
B Getting Help from SAS Technical Support 286
C An Overview of SAS Products 288
D Coming to SAS from SPSS 291
E Coming to SAS from a Programming Language 298
F Coming to SAS from SQL 302
Index 309
Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 3 Customer Reviews
  • Posted March 23, 2009

    more from this reviewer

    Well organized technical information

    I picked this up after a phone interview for a position that would have writing SAS code as part of it's responsibilities. The book is very well organized and easy to use either as a learning tool or as a reference when neeeding to see examples of something, like the "Phrasebook series".

    1 out of 1 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted May 26, 2009

    No text was provided for this review.

  • Anonymous

    Posted August 30, 2009

    No text was provided for this review.

Sort by: Showing all of 3 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)