Home Page Icon
Home Page
Table of Contents for
Chapter 19: Introduction to Efficient SAS Programming
Close
Chapter 19: Introduction to Efficient SAS Programming
by SAS Institute
SAS Certification Prep Guide, 4th Edition
Title Page
Copyright
About This Book
Chapter 1: Performing Queries Using PROC SQL
Chapter 1: Performing Queries Using PROC SQL
Overview
PROC SQL Basics
Writing a PROC SQL Step
Selecting Columns
Specifying the Table
Specifying Subsetting Criteria
Ordering Rows
Querying Multiple Tables
Summarizing Groups of Data
Creating Output Tables
Additional Features
Summary
Quiz
End Notes
Chapter 2: Performing Advanced Queries Using PROC SQL
Overview
Viewing SELECT Statement Syntax
Displaying All Columns
Limiting the Number of Rows Displayed
Eliminating Duplicate Rows from Output
Subsetting Rows By Using Conditional Operators
Subsetting Rows By Using Calculated Values
Enhancing Query Output
Summarizing and Grouping Data
Subsetting Data By Using Subqueries
Subsetting Data By Using Noncorrelated Subqueries
Subsetting Data By Using Correlated Subqueries
Validating Query Syntax
Additional Features
Summary
Quiz
Chapter 3: Combining Tables Horizontally Using PROC SQL
Overview
Understanding Joins
Generating a Cartesian Product
Using Inner Joins
Using Outer Joins
Creating an Inner Join with Outer Join-Style Syntax
Comparing SQL Joins and DATA Step Match-Merges
Using In-Line Views
Joining Multiple Tables and Views
Summary
Quiz
Chapter 4: Combining Tables Vertically Using PROC SQL
Overview
Understanding Set Operations
Using the EXCEPT Set Operator
Using the INTERSECT Set Operator
Using the UNION Set Operator
Using the OUTER UNION Set Operator
Comparing Outer Unions and Other SAS Techniques
Summary
Quiz
Chapter 5: Creating and Managing Tables Using PROC SQL
Overview
Understanding Methods of Creating Tables
Creating an Empty Table By Defining Columns
Displaying the Structure of a Table
Creating an Empty Table That Is like Another Table
Creating a Table from a Query Result
Inserting Rows of Data into a Table
Creating a Table That Has Integrity Constraints
Handling Errors in Row Insertions
Displaying Integrity Constraints for a Table
Updating Values in Existing Table Rows
Deleting Rows in a Table
Altering Columns in a Table
Dropping Tables
Summary
Quiz
Chapter 6: Creating and Managing Indexes Using PROC SQL
Overview
Understanding Indexes
Deciding Whether to Create an Index
Creating an Index
Displaying Index Specifications
Managing Index Usage
Dropping Indexes
Summary
Quiz
Chapter 7: Creating and Managing Views Using PROC SQL
Overview
Creating and Using PROC SQL Views
Displaying the Definition for a PROC SQL View
Managing PROC SQL Views
Updating PROC SQL Views
Dropping PROC SQL Views
Summary
Quiz
Chapter 8: Managing Processing Using PROC SQL
Overview
Specifying SQL Options
Controlling Execution
Controlling Output
Testing and Evaluating Performance
Resetting Options
Using Dictionary Tables
Additional Features
Summary
Quiz
Chapter 9: Introducing Macro Variables
Chapter 9: Introducing Macro Variables
Overview
Basic Concepts
Using Automatic Macro Variables
Using User-Defined Macro Variables
Processing Macro Variables
Displaying Macro Variable Values in the SAS Log
Using Macro Functions to Mask Special Characters
Using Macro Functions to Manipulate Character Strings
Using SAS Functions with Macro Variables
Combining Macro Variable References with Text
Summary
Quiz
Chapter 10: Processing Macro Variables at Execution Time
Overview
Creating a Macro Variable during DATA Step Execution
Creating Multiple Macro Variables during DATA Step Execution
Referencing Macro Variables Indirectly
Obtaining Macro Variable Values during DATA Step Execution
Creating Macro Variables during PROC SQL Step Execution
Working with PROC SQL Views
Using Macro Variables in SCL Programs
Summary
Quiz
Chapter 11: Creating and Using Macro Programs
Overview
Basic Concepts
Developing and Debugging Macros
Using Macro Parameters
Understanding Symbol Tables
Processing Statements Conditionally
Processing Statements Iteratively
Using Arithmetic and Logical Expressions
Summary
Quiz
Chapter 12: Storing Macro Programs
Overview
Understanding Session-Compiled Macros
Storing Macro Definitions in External Files
Storing Macro Definitions in Catalog SOURCE Entries
Using the Autocall Facility
Using Stored Compiled Macros
Summary
Quiz
Chapter 13: Creating Indexes
Chapter 13: Creating Indexes
Overview
Using Indexes
Creating Indexes in the DATA Step
Managing Indexes with PROC DATASETS
Managing Indexes with PROC SQL
Documenting and Maintaining Indexes
Summary
Quiz
Chapter 14: Combining Data Vertically
Overview
Using a FILENAME Statement
Using the FILEVAR= Option
Appending SAS Data Sets
Additional Features
Summary
Quiz
Chapter 15: Combining Data Horizontally
Overview
Reviewing Terminology
Working with Lookup Values Outside of SAS Data Sets
Combining Data with the DATA Step Match-Merge
Using PROC SQL to Join Data
Comparing DATA Step Match-Merges and PROC SQL Joins
Combining Summary Data and Detail Data
Using an Index to Combine Data
Using a Transaction Data Set
Summary
Quiz
Chapter 16: Using Lookup Tables to Match Data
Overview
Using Multidimensional Arrays
Populating an Array from a SAS Data Set
Using PROC TRANSPOSE
Merging the Transposed Data Set
Using Hash Objects as Lookup Tables
Summary
Quiz
Chapter 17: Formatting Data
Overview
Creating Custom Formats Using the VALUE Statement
Creating Custom Formats Using the PICTURE Statement
Managing Custom Formats
Using Custom Formats
Creating Formats from SAS Data Sets
Creating SAS Data Sets from Custom Formats
Summary
Quiz
Chapter 18: Modifying SAS Data Sets and Tracking Changes
Overview
Using the MODIFY Statement
Modifying All Observations in a SAS Data Set
Modifying Observations Using a Transaction Data Set
Modifying Observations Located by an Index
Controlling the Update Process
Understanding Integrity Constraints
Placing Integrity Constraints on a Data Set
Documenting Integrity Constraints
Removing Integrity Constraints
Understanding Audit Trails
Initiating and Reading Audit Trails
Controlling Data in the Audit Trail
Controlling the Audit Trail
Understanding Generation Data Sets
Initiating Generation Data Sets
Processing Generation Data Sets
Summary
Quiz
Chapter 19: Introduction to Efficient SAS Programming
Chapter 19: Introduction to Efficient SAS Programming
Overview
Overview of Computing Resources
Assessing Efficiency Needs at Your Site
Understanding Efficiency Trade-offs
Using SAS System Options to Track Resources
Using Benchmarks to Compare Techniques
Summary
Chapter 20: Controlling Memory Usage
Overview
Controlling Page Size and the Number of Buffers
Using the SASFILE Statement
Additional Features
Summary
Quiz
Chapter 21: Controlling Data Storage Space
Overview
Reducing Data Storage Space for Character Variables
Reducing Data Storage Space for Numeric Variables
Compressing Data Files
Using SAS DATA Step Views to Conserve Data Storage Space
Summary
Quiz
Chapter 22: Using Best Practices
Overview
Executing Only Necessary Statements
Eliminating Unnecessary Passes through the Data
Reading and Writing Only Essential Data
Storing Data in SAS Data Sets
Avoiding Unnecessary Procedure Invocation
Summary
Quiz
Chapter 23: Querying Data Efficiently
Overview
Using an Index for Efficient WHERE Processing
Identifying Available Indexes
Identifying Conditions That Can Be Optimized
Estimating the Number of Observations
Comparing Probable Resource Usage
Deciding Whether to Create an Index
Comparing Procedures That Produce Detail Reports
Comparing Tools for Summarizing Data
Summary
Quiz
Chapter 24: Creating Functions with PROC FCMP
Overview
Using PROC FCMP
About PROC FCMP
PROC FCMP Statement
FUNCTION Statement
RETURN Statement
Using the Newly Defined Function
Using PROC FCMP to Create a Subroutine
Quiz
Appendix 1: Quiz Answer Keys
Appendix 1: Quiz Answer Keys
Chapter 1: Performing Queries Using PROC SQL
Chapter 2: Performing Advanced Queries Using PROC SQL
Chapter 3: Combining Tables Horizontally Using PROC SQL
Chapter 4: Combining Tables Vertically Using PROC SQL
Chapter 5: Creating and Managing Tables Using PROC SQL
Chapter 6: Creating and Managing Indexes Using PROC SQL
Chapter 7: Creating and Managing Views Using PROC SQL
Chapter 8: Managing Processing Using PROC SQL
Chapter 9: Introducing Macro Variables
Chapter 10: Processing Macro Variables at Execution Time
Chapter 11: Creating and Using Macro Programs
Chapter 12: Storing Macro Programs
Chapter 13: Creating Indexes
Chapter 14: Combining Data Vertically
Chapter 15: Combining Data Horizontally
Chapter 16: Using Lookup Tables to Match Data
Chapter 17: Formatting Data
Chapter 18: Modifying SAS Data Sets and Tracking Changes
Chapter 19: Introduction to Efficient SAS Programming
Chapter 20: Controlling Memory Usage
Chapter 21: Controlling Data Storage Space
Chapter 22: Using Best Practices
Chapter 23: Querying Data Efficiently
Chapter 24: Creating Functions with PROC FCMP
Index
Additional Resources
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Chapter 18: Modifying SAS Data Sets and Tracking Changes
Next
Next Chapter
Chapter 20: Controlling Memory Usage
Chapter 19: Introduction to Efficient SAS Programming
This chapter has no quiz.
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset