Advanced SAS® Programming and Efficiency Techniques
Role
SAS Programmer
Duration
3 Days
Description
This course builds on concepts presented in the SASŪ Programming: Data Manipulation Techniques course. It focuses on reading data with direct access; combining data; sorting; using multidimensional arrays, hash tables and formats for table lookups; efficiently storing data; utilising best practices.
Prerequisites
Before attending this course you should: have completed the SASŪ Programming: Data Manipulation Techniques course: Understand file structure and write system commands to create and access files. Understand programming logic concepts (IF/THEN logic). Understand the compilation and execution process of the DATA step. Use different kinds of input to create SAS data sets from external files. Access SAS data libraries. Create and use SAS date values. Read, concatenate, merge, match-merge and interleave SAS data sets. Use the data set options DROP=, KEEP= and RENAME=. Create multiple output data sets. Use array processing and DO loops to process data iteratively. Use SAS functions to perform data manipulation and transformations.
SAS Modules Used
Base SAS
Course Topics
Introduction to Course Topics
- Measuring Efficiencies
- SAS Processing
- Controlling Memory and I/O Resources
Accessing Observations:
- Introduction
- Creating Sample Data Sets
- Creating and Using an Index
Combining Data Horizontally:
- Joining Data Sets by Value
- Combining Summary and Detail Data
- Using an Index to Combine Data
- Updating Data Combining Summary and Detail Data Using Two SET Statements (self-study)
Combining Data Vertically:
- Appending SAS Data Sets
- Appending Raw Data Files.
BY-Group Processing and Sorting:
- Introduction, Eliminating Duplicates
- Sorting Resources
- Choosing the Right Sort Routine (Self-study)
- Alternatives to Sorting
Using Lookup Tables to Match Data:
- Using Arrays as Lookup Tables
- Using Hash Objects as Lookup Tables
- Using Formats as Lookup Tables
- Transposing Data to Create a Lookup Table
Controlling Data Storage Space:
- Reducing the Length of Numeric Variables
- Compressing SAS Data Files
- Creating a DATA Step View
Utilising Best Practices to Improve Efficiency:
- Executing only the Necessary Statements
- Eliminating Unnecessary Passes Through the Data
- Reading and Writing only Essential Data
- Networking Efficiency Considerations (Self-study)
Using the SASŪ Scalable Performance Data Engine (Self-study)
- Introduction to the Scalable Performance Data Engine
- Creating SPD Engine Tables, Using SPD Engine Efficiently
- SPD Engine LIBNAME Statement Options List
Additional Topics (Self-Study)
- Modifying SAS Data Sets in place
- Creating Generation SAS Data Sets
- Creating Integrity Constraints
- Creating and Using Audit Trails
- Working with Perl Regular Expressions
Objectives
After attending this course, you will be able to: Perform three-way merges, Combine summary data and detail data, Manage data structures, Manage data values (including formatting data and using multidimensional arrays) Carry out random and systematic sampling of data, Use SAS indexes.