The Little SAS® Book: A Primer

Book description

A classic that just keeps getting better, The Little SAS Book is essential for anyone learning SAS programming. Lora Delwiche and Susan Slaughter offer a user-friendly approach so readers can quickly and easily learn the most commonly used features of the SAS language. Each topic is presented in a self-contained, two-page layout complete with examples and graphics.

The fifth edition has been completely updated to reflect the new default output introduced with SAS 9.3. In addition, there is a now a full chapter devoted to ODS Graphics including the SGPLOT and SGPANEL procedures. Other changes include expanded coverage of linguistic sorting and a new section on concatenating macro variables with other text.

This title belongs on every SAS programmer's bookshelf. It's a resource not just to get you started, but one you'll return to as you continue to improve your programming skills.

Table of contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Contents
  5. Acknowledgments
  6. Introducing SAS Software
  7. About this Book
  8. What's New
  9. Chapter 1 - Getting Started Using SAS Software
    1. 1.1 - The SAS Language
    2. 1.2 - SAS Data Sets
    3. 1.3 - DATA and PROC Steps
    4. 1.4 - The DATA Step's Built-in Loop
    5. 1.5 - Choosing a Mode for Submitting SAS Programs
    6. 1.6 - Windows and Commands in the SAS Windowing Environment
    7. 1.7 - Submitting a Program in the SAS Windowing Environment
    8. 1.8 - Reading the SAS Log
    9. 1.9 - Viewing your Results
    10. 1.10 - SAS Data Libraries
    11. 1.11 - Viewing Data Sets in the Viewtable Window
    12. 1.12 - Viewing the Properties of Data Sets with SAS Explorer
    13. 1.13 - Using SAS System Options
  10. Chapter 2 - Getting your Data into SAS
    1. 2.1 - Methods for Getting your Data into SAS
    2. 2.2 - Entering Data with the Viewtable Window
    3. 2.3 - Reading Files with the Import Wizard
    4. 2.4 - Telling SAS where to Find your Raw Data
    5. 2.5 - Reading Raw Data Separated by Spaces
    6. 2.6 - Reading Raw Data Arranged in Columns
    7. 2.7 - Reading Raw Data Not in Standard Format
    8. 2.8 - Selected Informats
    9. 2.9 - Mixing Input Styles
    10. 2.10 - Reading Messy Raw Data
    11. 2.11 - Reading Multiple Lines of Raw Data per Observation
    12. 2.12 - Reading Multiple Observations per Line of Raw Data
    13. 2.13 - Reading Part of a Raw Data File
    14. 2.14 - Controlling Input with Options in the INFILE Statement
    15. 2.15 - Reading Delimited Files with the DATA Step
    16. 2.16 - Reading Delimited Files with the IMPORT Procedure
    17. 2.17 - Reading Excel Files with the IMPORT Procedure
    18. 2.18 - Temporary versus Permanent SAS Data Sets
    19. 2.19 - Using Permanent SAS Data Sets with LIBNAME Statements
    20. 2.20 - Using Permanent SAS Data Sets by Direct Referencing
    21. 2.21 - Listing the Contents of a SAS Data Set
  11. Chapter 3 - Working with your Data
    1. 3.1 - Creating and Redefining Variables
    2. 3.2 - Using SAS Functions
    3. 3.3 - Selected SAS Character Functions
    4. 3.4 - Selected SAS Numeric Functions
    5. 3.5 - Using IF-THEN Statements
    6. 3.6 - Grouping Observations with IF-THEN/ELSE Statements
    7. 3.7 - Subsetting your Data
    8. 3.8 - Working with SAS Dates
    9. 3.9 - Selected Date Informats, Functions, and Formats
    10. 3.10 - Using the RETAIN and Sum Statements
    11. 3.11 - Simplifying Programs with Arrays
    12. 3.12 - Using Shortcuts for Lists of Variable Names
  12. Chapter 4 - Sorting, Printing, and Summarizing your Data
    1. 4.1 - Using SAS Procedures
    2. 4.2 - Subsetting in Procedures with the WHERE Statement
    3. 4.3 - Sorting your Data with PROC SORT
    4. 4.4 - Changing the Sort Order for Character Data
    5. 4.5 - Printing your Data with PROC PRINT
    6. 4.6 - Changing the Appearance of Printed Values with Formats
    7. 4.7 - Selected Standard Formats
    8. 4.8 - Creating your Own Formats Using PROC FORMAT
    9. 4.9 - Writing Simple Custom Reports
    10. 4.10 - Summarizing your Data Using PROC MEANS
    11. 4.11 - Writing Summary Statistics to a SAS Data Set
    12. 4.12 - Counting your Data with PROC FREQ
    13. 4.13 - Producing Tabular Reports with PROC TABULATE
    14. 4.14 - Adding Statistics to PROC TABULATE Output
    15. 4.15 - Enhancing the Appearance of PROC TABULATE Output
    16. 4.16 - Changing Headers in PROC TABULATE Output
    17. 4.17 - Specifying Multiple Formats for Data Cells in PROC TABULATE Output
    18. 4.18 - Producing Simple Output with PROC REPORT
    19. 4.19 - Using DEFINE Statements in PROC REPORT
    20. 4.20 - Creating Summary Reports with PROC REPORT
    21. 4.21 - Adding Summary Breaks to PROC REPORT Output
    22. 4.22 - Adding Statistics to PROC REPORT Output
    23. 4.23 - Adding Computed Variables to PROC REPORT Output
    24. 4.24 - Grouping Data in Procedures with User-Defined Formats
  13. Chapter 5 - Enhancing your Output with ODS
    1. 5.1 - Concepts of the Output Delivery System
    2. 5.2 - Tracing and Selecting Procedure Output
    3. 5.3 - Creating SAS Data Sets from Procedure Output
    4. 5.4 - Creating Text Output
    5. 5.5 - Creating HTML Output
    6. 5.6 - Creating RTF Output
    7. 5.7 - Creating PDF Output
    8. 5.8 - Customizing Titles and Footnotes
    9. 5.9 - Customizing PROC PRINT with the STYLE= Option
    10. 5.10 - Customizing PROC REPORT with the STYLE= Option
    11. 5.11 - Customizing PROC TABULATE with the STYLE= Option
    12. 5.12 - Adding Traffic-Lighting to your Output
    13. 5.13 - Selected Style Attributes
  14. Chapter 6 - Modifying and Combining SAS Data Sets
    1. 6.1 - Modifying a Data Set Using the SET Statement
    2. 6.2 - Stacking Data Sets Using the SET Statement
    3. 6.3 - Interleaving Data Sets Using the SET Statement
    4. 6.4 - Combining Data Sets Using a One-to-One Match Merge
    5. 6.5 - Combining Data Sets Using a One-to-Many Match Merge
    6. 6.6 - Merging Summary Statistics with the Original Data
    7. 6.7 - Combining a Grand Total with the Original Data
    8. 6.8 - Updating a Master Data Set with Transactions
    9. 6.9 - Writing Multiple Data Sets Using the OUTPUT Statement
    10. 6.10 - Making Several Observations from One Using the OUTPUT Statement
    11. 6.11 - Using SAS Data Set Options
    12. 6.12 - Tracking and Selecting Observations with the IN= Option
    13. 6.13 - Selecting Observations with the WHERE= Option
    14. 6.14 - Changing Observations to Variables Using PROC TRANSPOSE
    15. 6.15 - Using SAS Automatic Variables
  15. Chapter 7 - Writing Flexible Code with the SAS Macro Facility
    1. 7.1 - Macro Concepts
    2. 7.2 - Substituting Text with Macro Variables
    3. 7.3 - Concatenating Macro Variables with Other Text
    4. 7.4 - Creating Modular Code with Macros
    5. 7.5 - Adding Parameters to Macros
    6. 7.6 - Writing Macros with Conditional Logic
    7. 7.7 - Writing Data-Driven Programs with CALL SYMPUT
    8. 7.8 - Debugging Macro Errors
  16. Chapter 8 - Visualizing your Data
    1. 8.1 - Concepts of ODS Graphics
    2. 8.2 - Creating Bar Charts
    3. 8.3 - Creating Histograms and Density Curves
    4. 8.4 - Creating Box Plots
    5. 8.5 - Creating Scatter Plots
    6. 8.6 - Creating Series Plots
    7. 8.7 - Creating Fitted Curves
    8. 8.8 - Controlling Axes and Reference Lines
    9. 8.9 - Controlling Legends and Insets
    10. 8.10 - Customizing Graph Attributes
    11. 8.11 - Creating Paneled Graphs
    12. 8.12 - Specifying Image Properties and Saving Graphics Output
  17. Chapter 9 - Using Basic Statistical Procedures
    1. 9.1 - Examining the Distribution of Data with PROC UNIVARIATE
    2. 9.2 - Creating Statistical Graphics with PROC UNIVARIATE
    3. 9.3 - Producing Statistics with PROC MEANS
    4. 9.4 - Testing Means with PROC TTEST
    5. 9.5 - Creating Statistical Graphics with PROC TTEST
    6. 9.6 - Testing Categorical Data with PROC FREQ
    7. 9.7 - Creating Statistical Graphics with PROC FREQ
    8. 9.8 - Examining Correlations with PROC CORR
    9. 9.9 - Creating Statistical Graphics with PROC CORR
    10. 9.10 - Using PROC REG for Simple Regression Analysis
    11. 9.11 - Creating Statistical Graphics with PROC REG
    12. 9.12 - Using PROC ANOVA for One-Way Analysis of Variance
    13. 9.13 - Reading the Output of PROC ANOVA
  18. Chapter 10 - Exporting your Data
    1. 10.1 - Methods for Exporting your Data
    2. 10.2 - Writing Files Using the Export Wizard
    3. 10.3 - Writing Delimited Files with the EXPORT Procedure
    4. 10.4 - Writing Microsoft Excel Files with the EXPORT Procedure
    5. 10.5 - Writing Raw Data Files with the DATA Step
    6. 10.6 - Writing Delimited and HTML Files Using ODS
  19. Chapter 11 - Debugging your SAS Programs
    1. 11.1 - Writing SAS Programs that Work
    2. 11.2 - Fixing Programs That Don't Work
    3. 11.3 - Searching for the Missing Semicolon
    4. 11.4 - Note: INPUT Statement Reached Past the End of a Line
    5. 11.5 - Note: Lost Card
    6. 11.6 - Note: Invalid Data
    7. 11.7 - Note: Missing Values were Generated
    8. 11.8 - Note: Numeric Values have Been Converted to Character (or Vice Versa)
    9. 11.9 - DATA Step Produces Wrong Results but No Error Message
    10. 11.10 - Error: Invalid Option, Error: The Option is Not Recognized, or Error: Statement is Not Valid
    11. 11.11 - Note: Variable Is Uninitialized or Error: Variable Not Found
    12. 11.12 - SAS Truncates a Character Variable
    13. 11.13 - SAS Stops in the Middle of a Program
    14. 11.14 - SAS Runs Out of Memory or Disk Space
  20. Appendix Coming to SAS from SQL
  21. Index
  22. Accelerate Your SAS Knowledge with SAS Books

Product information

  • Title: The Little SAS® Book: A Primer
  • Author(s): Lora D. Delwiche, Susan J. Slaughter
  • Release date: October 2012
  • Publisher(s): SAS Institute
  • ISBN: 9781612903439