Book description
New and experienced SAS users who want to prepare for the Base Programming for SAS 9 exam will find the SAS Certification Prep Guide: Base Programming for SAS 9, Second Edition, to be an invaluable, convenient, and comprehensive resource that covers all of the objectives tested on the exam. Major topics include importing and exporting raw data files, creating and modifying SAS data sets, and identifying and correcting data syntax and programming logic errors. You will also become familiar with the enhancements and new functionality that are available in SAS 9.
Each chapter includes a quiz on the chapter's contents, and the book includes a free CD-ROM with tutorials, practice data, and sample programs to further reinforce and test your SAS skills. This guide and the accompanying CD-ROM provide you with a solid study resource as well as a go-to reference for your library.
Table of contents
- Copyright
- About This Book
-
1. Basic Concepts
- Overview
- SAS Programs
- SAS Libraries
- Referencing SAS Files
- SAS Data Sets
-
Using the Programming Workspace
-
Using the Main SAS Windows
- Features of SAS Windows
- Minimizing and Restoring Windows
- Docking and Undocking Windows
- Issuing Commands
- Using Pop-Up Menus
- Getting Help
- Customizing Your SAS Environment
- The Explorer Window
- Navigating the Explorer Window
- Code Editing Windows
- Enhanced Editor Window
- Enhanced Editor Features
- Clearing the Editor
- The Program Editor Window
- Features
- Clearing the Editor
- The Log Window
- The Output Window
- The Results Window
- Creating SAS Libraries
- Defining Libraries
- Creating and Using File Shortcuts
- Using SAS Solutions and Tools
- Getting Help
-
Using the Main SAS Windows
- Chapter Summary
- Chapter Quiz
-
2. Referencing Files and Setting Options
- Overview
- Viewing SAS Libraries
- Specifying Results Formats
-
Setting System Options
- Example: DATE | NODATE and NUMBER | NONUMBER Options
- Example: PAGENO= Option
- Example: PAGESIZE= Option
- Example: LINESIZE= Option
- Handling Two-Digit Years: Year 2000 Compliance
- How the YEARCUTOFF= Option Works
- How Four-Digit Years Are Handled
- Using System Options to Specify Observations
- Examples: FIRSTOBS= and OBS= Options
- Using FIRSTOBS= and OBS= for Specific Data Sets
- Example: FIRSTOBS= and OBS= as Data Set Options
- The SAS System Options Window
- Changing Options
- Finding Options Quickly
- Additional Features
- Chapter Summary
- Chapter Quiz
-
3. Editing and Debugging SAS Programs
- Overview
- Opening a Stored SAS Program
-
Editing SAS Programs
- SAS Program Structure
- Using the Enhanced Editor
- Entering and Viewing Text
- Finding and Replacing Text
- Using Abbreviations
- Opening Multiple Views of a File
- Setting Enhanced Editor Options
- Program Editor Features
- Line Numbers
- Text Editor Line Commands
- Example
- Block Text Editor Line Commands
- Example
- Recalling SAS Programs
- Saving SAS Programs
- Example
- Clearing SAS Programming Windows
- Interpreting Error Messages
- Correcting Errors
-
Resolving Common Problems
- Missing RUN Statement
- Resolving the Problem
- Missing Semicolon
- Resolving the Problem
- Unbalanced Quotation Marks
- Resolving the Error in the Windows Operating Environment
- Resolving the Error in the UNIX Operating Environment
- Resolving the Error in the z/OS Operating Environment
- Invalid Option
- Resolving the Problem
- Additional Features
- Chapter Summary
- Chapter Quiz
-
4. Creating List Reports
- Overview
- Creating a Basic Report
- Selecting Variables
- Identifying Observations
- Sorting Data
- Generating Column Totals
- Double Spacing Listing Output
- Specifying Titles and Footnotes
- Assigning Descriptive Labels
- Formatting Data Values
- Using Permanently Assigned Labels and Formats
- Additional Features
- Chapter Summary
- Chapter Quiz
-
5. Creating SAS Data Sets from Raw Files and Excel Work-sheets
- Overview
- Raw Data Files
- Steps to Create a SAS Data Set From a Raw Data File
- Referencing a SAS Library
- Referencing a Raw Data File
- Writing a DATA Step Program
- Submitting the DATA Step Program
- Creating and Modifying Variables
- Subsetting Data
- Reading Instream Data
- Creating a Raw Data File
- Additional Features
- Reading Microsoft Excel Data
- LIBNAME Statement Options
- Creating Excel Work-sheets
- The IMPORT Wizard
-
Chapter Summary
-
Text Summary
- Raw Data Files
- Steps to Create a SAS Data Set
- Referencing a SAS Library
- Writing a DATA Step Program
- Submitting the Program
- Creating and Modifying Variables
- Subsetting Data
- Reading Instream Data
- Creating a Raw Data File
- Microsoft Excel Files
- Steps to Create a SAS Data Set from Excel data
- Referencing a SAS Library
- Writing a DATA Step Program
- Submitting the Program
- Syntax
- Sample Programs
- Points to Remember
-
Text Summary
- Chapter Quiz
- 6. Understanding DATA Step Processing
- 7. Creating and Applying User-Defined Formats
- 8. Creating Enhanced List and Summary Reports
-
9. Producing Descriptive Statistics
- Overview
- Objectives
- Computing Statistics Using PROC MEANS
- Selecting Statistics
- Limiting Decimal Places
- Specifying Variables in PROC MEANS
- Group Processing Using the CLASS Statement
- Group Processing Using the BY Statement
- Creating a Summarized Data Set Using PROC MEANS
- Creating a Summarized Data Set Using PROC SUMMARY
- Producing Frequency Tables Using PROC FREQ
- Specifying Variables in PROC FREQ
- Creating Two-Way Tables
- Creating N-Way Tables
- Creating Tables in List Format
-
Chapter Summary
-
Text Summary
- Purpose of PROC MEANS
- Specifying Statistics
- Limiting Decimal Places
- Specifying Variables in PROC MEANS
- Group Processing Using the CLASS Statement
- Group Processing Using the BY Statement
- Creating a Summarized Data Set Using PROC MEANS
- Creating a Summarized Data Set Using PROC SUMMARY
- The FREQ Procedure
- Specifying Variables
- Creating Two-Way Tables
- Creating N-Way Tables
- Creating Tables in List Format
- Suppressing Table Information
- Syntax
- Sample Programs
- Points to Remember
-
Text Summary
- Chapter Quiz
- 10. Producing HTML Output
-
11. Creating and Managing Variables
- Overview
- Creating and Modifying Variables
- Assigning Values Conditionally
- Specifying Lengths for Variables
- Subsetting Data
- Assigning Permanent Labels and Formats
- Assigning Values Conditionally Using SELECT Groups
- Grouping Statements Using DO Groups
- Chapter Summary
- Chapter Quiz
- 12. Reading SAS Data Sets
- 13. Combining SAS Data Sets
-
14. Transforming Data with SAS Functions
- Overview
- Understanding SAS Functions
- General Form of SAS Functions
-
Converting Data with Functions
- Introduction to Converting Data
- Potential Problems of Omitting INPUT or PUT
- Automatic Character-to-Numeric Conversion
- When Automatic Conversion Occurs
- Restriction for WHERE Expressions
- Explicit Character-to-Numeric Conversion
- Example
- Automatic Numeric-to-Character Conversion
- Explicit Numeric-to-Character Conversion
- Matching the Data Type
- Manipulating SAS Date Values with Functions
-
Modifying Character Values with Functions
- Introduction to Modifying Character Values
- Character Functions
- SCAN Function
- Specifying Delimiters
- Specifying Multiple Delimiters
- Default Delimiters
- SCAN Function Syntax
- Specifying Variable Length
- SCAN versus SUBSTR
- SUBSTR Function
- Replacing Text Using SUBSTR
- Positioning the SUBSTR Function
- TRIM Function
- Points to Remember
- CATX Function
- INDEX Function
- Finding a String Regardless of Case
- FIND Function
- UPCASE Function
- LOWCASE Function
- PROPCASE Function
- TRANWRD Function
- Modifying Numeric Values with Functions
- Nesting SAS Functions
-
Chapter Summary
-
Text Summary
- Using SAS Functions
- Automatic Character-to-Numeric Conversion
- Explicit Character-to-Numeric Conversion
- Automatic Numeric-to-Character Conversion
- Explicit Numeric-to-Character Conversion
- SAS Date and Time Values
- YEAR, QTR, MONTH, and DAY Functions
- WEEKDAY Function
- MDY Function
- DATE and TODAY Functions
- INTCK Function
- INTNX Function
- DATDIF and YRDIF Functions
- SCAN Function
- SUBSTR Function
- SCAN versus SUBSTR
- TRIM Function
- CATX Function
- INDEX Function
- FIND Function
- UPCASE Function
- LOWCASE Function
- PROPCASE Function
- TRANWRD Function
- INT Function
- ROUND Function
- Nesting SAS Functions
- Syntax
- Sample Programs
- Points to Remember
-
Text Summary
- Chapter Quiz
-
15. Generating Data with DO Loops
- Overview
- Constructing DO Loops
- Nesting DO Loops
- Iteratively Processing Data That Is Read from a Data Set
- Conditionally Executing DO Loops
- Using Conditional Clauses with the Iterative DO Statement
- Creating Samples
-
Chapter Summary
-
Text Summary
- Purpose of DO Loops
- Syntax of Iterative DO Loops
- DO Loop Execution
- Counting Iterations of DO Loops
- Decrementing DO Loops
- Specifying a Series of Items
- Nesting DO Loops
- Iteratively Processing Data That Is Read from a Data Set
- Conditionally Executing DO Loops
- Using Conditional Clauses with the Iterative DO Statement
- Creating Samples
- Syntax
- Sample Programs
- Points to Remember
-
Text Summary
- Chapter Quiz
-
16. Processing Variables with Arrays
- Overview
-
Creating One-Dimensional Arrays
- Understanding SAS Arrays
- Defining an Array
- Specifying the Array Name
- Specifying the Dimension
- Specifying Array Elements
- Variable Lists as Array Elements
- A Numbered Range of Variables
- All Numeric Variables
- All Character Variables
- All Variables
- Referencing Elements of an Array
- Compilation and Execution
- Graphical Display of Array Processing
- Using the DIM Function in an Iterative DO Statement
- Expanding Your Use of Arrays
- Additional Features
-
Chapter Summary
-
Text Summary
- Purpose of SAS Arrays
- Defining an Array
- Variable Lists as Array Elements
- Referencing Elements of an Array
- The DIM Function
- Creating Variables with the ARRAY Statement
- Assigning Initial Values to Arrays
- Creating Temporary Array Elements
- Multidimensional Arrays
- Referencing Elements of a Two-Dimensional Array
- Rotating Data Sets
- Syntax
- Sample Programs
- Points to Remember
-
Text Summary
- Chapter Quiz
- 17. Reading Raw Data in Fixed Fields
- 18. Reading Free-Format Data
- 19. Reading Date and Time Values
- 20. Creating a Single Observation from Multiple Records
- 21. Creating Multiple Observations from a Single Record
- 22. Reading Hierarchical Files
-
1. Quiz Answer Keys
- Chapter 1: Basic Concepts
- Chapter 2: Referencing Files and Setting Options
- Chapter 3: Editing and Debugging SAS Programs
- Chapter 4: Creating List Reports
- Chapter 5: Creating SAS Data Sets From Raw Files and Excel Work-sheets
- Chapter 6: Understanding DATA Step Processing
- Chapter 7: Creating and Applying User-Defined Formats
- Chapter 8: Creating Enhanced List and Summary Reports
- Chapter 9: Producing Descriptive Statistics
- Chapter 10: Producing HTML Output
- Chapter 11: Creating and Managing Variables
- Chapter 12: Reading SAS Data Sets Overview
- Chapter 13: Combining SAS Data Sets
- Chapter 14: Transforming Data with SAS Functions
- Chapter 15: Generating Data with DO Loops
- Chapter 16: Processing Variables with Arrays
- Chapter 17: Reading Raw Data in Fixed Fields
- Chapter 18: Reading Free-Format Data
- Chapter 19: Reading Date and Time Values
- Chapter 20: Creating a Single Observation from Multiple Records
- Chapter 21: Creating Multiple Observations from a Single Record
- Chapter 22: Reading Hierarchical Files
- Glossary
Product information
- Title: SAS® Certification Prep Guide: Base Programming for SAS®9 Second Edition
- Author(s):
- Release date: August 2009
- Publisher(s): SAS Institute
- ISBN: 9781607640455
You might also like
book
SAS® Certification Prep Guide: Advanced Programming for SAS®9 Second Edition
The SAS Certification Prep Guide: Advanced Programming for SAS 9, Second Edition, prepares you to take …
book
SAS® Certification Prep Guide: Base Programming for SAS®9
Prepare for the SAS Base Programming for SAS®9 certification exam with the official guide by the …
book
SAS® Certification Prep Guide: Advanced Programming for SAS®9, Third Edition
Prepares you to take the Advanced Programming for SAS 9 exam. Major topics include SQL processing …
book
Base SAS 9.4 Procedures Guide, Fifth Edition, 5th Edition
Contains the complete reference for all Base SAS procedures. Provides information about what each procedure does …