Amadeus cookies policy - you'll see this message only once.

Amadeus use cookies on this website. They help us to know a little bit about you and how you use our website, which improves the browsing experience and marketing - both for you and for others. They are stored locally on your computer or mobile device. To accept cookies, continue browsing as normal. Or, go to the privacy policy for more information.

Advanced SAS Programming

Course Length - 2 Days

After two day of instructor led tuition attendees will be able to:

  • Understand the trade-off between writing shorter complex code for the ease of sharing code between programmers;
  • Apply best practices in Base SAS Programming;
  • Know when to apply and how to manage SAS indexes for Base SAS data sets;
  • Use advanced programming within the DATA step;
  • Program DATA step object components.

Audience

Existing programmers in the SAS language who wish to gain best practice programming knowledge. Those who wish to process efficiently within the DATA step, in addition to configure their SAS environment to maximise data throughput.



Prerequisites

This course is intended for those who have previously attended SAS Fundamentals, SAS Programming and SAS Macro or equivalent. Additionally we recommend that attendees have six months of regular SAS programming experience to gain the most benefit from this course and have had some exposure to Proc SQL and Enterprise Guide.

  • Write DATA step code using
    • Data set options such as KEEP, DROP, RENAME and WHERE
    • Use routine DATA step constructs like IF statements, DO loops and arrays
    • Create variables using expressions and functions
    • Read data using the SET or MERGE statements
    • Import data using the INFILE and INPUT statements
  • Familiarity with the following SAS procedures:
    • Proc SORT
    • Proc FORMAT
    • Proc TRANSPOSE
    • Proc MEANS / Proc SUMMARY
  • Use of BY-group processing (i.e. using a BY statement in DATA and Proc steps)
  • Understand when and how to use Informats and Formats
  • Understand the Compilation and Execution phases of the DATA step
  • Understand how macro variables are created, resolved and stored
  • Understand how to create macros with parameters, macro statements and use macro debugging options
  • Create and resolve macro variables within the DATA step
  • Write basic SQL queries to extract data from one or more tables of data.

Topics

AP1 SAS Environment Best Practices

  • Organising Your SAS Resources
  • Environments & Release Management
  • Autoexec Programs and Process Flow
  • SAS Libraries & Work Library Space
  • SAS System Options
  • Automatic Macro Variables
  • Workshop Session

AP2 Advanced DATA Step Programming

  • Design Patterns for SAS Programs
  • Good Programming Practice
  • Complexity vs Clarity
  • Advanced Programming Techniques
  • Workshop Session

AP3 Data Organisation

  • SAS Indexes
  • SAS Views
  • Compression
  • Generation Data Sets (Optional)
  • Audit Trails (Optional)
  • Workshop Session

AP4 Advanced SAS Statements

  • The MODIFY Statement
  • The LOCK Statement
  • The SASFILE Statement
  • The FILENAME Statement
  • Workshop Session

AP5 Using Hash Tables

  • Introduction to Hash Objects in the DATA Step
  • Declaring and Using a Hash Object
  • Declaring and Using a Hash Iterator Object
  • Hash and Hash Iterator Object Attributes and Methods
  • Workshop Session

AP6 Table Lookups

  • Introduction
  • Match Merge
  • Hash Join
  • SQL Join
  • Using Formats
  • Using Indexes
  • Other Techniques with Joins
  • Techniques for Subsetting Data
  • Guidelines
  • Workshop Session

AP7 User-Defined Functions with Proc FCMP

  • Introduction to Proc FCMP
  • Functions
  • Subroutines
  • SAS Syntax in the Proc FCMP Environment
  • RUN_MACRO and RUN_SASFILE (Optional)
  • Workshop Session

AP8 Efficiency

  • What is Efficiency?
  • Diagnosing Performance Issues
  • I/O Performance
  • Sorting Data
  • Efficient use of Storage Space
  • Efficient Programming Practices
  • Workshop Session

AP9 Perl Regular Expressions (optional)

  • Introducing Regular Expressions
  • Further Regular Expression Syntax
  • Changing Text Using PRXCHANGE
  • Further Matching Facilities (Optional)
  • Additional Features (Optional)
  • Workshop Session