SAS® Macro Language
Duration: 2 days
If you experience any problems with our on-line booking service, you can call us on
+44 (0)131 225 6952.
Description
This two-day course is for SAS programmers who wish to write more dynamic and sophisticated
SAS programs with low maintenance overheads. The course focuses on the components of the macro facility
and how the macro language affects the normal processing of SAS programs with low maintenance overheads.
It focuses on the components of the macro facility and how the macro language affects
normal processing of SAS programs. An emphasis is placed on designing macro systems and debugging
techniques.
Objectives
After attending this course you will be able to:
- describe how macro processing takes place
- understand the differences between macros created at compilation and execution time
- create user-defined macro variables
- use automatic and user-defined macro variables
- write macros that make common programming tasks easier
- define and use macro programs
- write more dynamic and reduced maintenance production programs
- debug programs that contain macro coding
Prerequisite Skills
No prior knowledge of the SAS® Macro language is required. However, to receive maximum
benefit from the course you should have an understanding of the SAS language at the level presented in
the SAS® Programming: Data Manipulation Techniques course.
Specifically you should be able to:
- write and submit SAS programs on your operating system
- use LIBNAME, FILENAME, TITLE and OPTIONS statements
- use a DATA step to read from or write to a SAS data set or an external data file
- use DATA step programming statements such as IF-THEN/ELSE, DO WHILE, DO UNTIL and iterative DO
- use character functions such as SUBSTR, SCAN, INDEX and UPCASE
- use the LENGTH and RETAIN statements
- use SAS data set options such as DROP=, KEEP= and OBS=
- form subsets of data using the WHERE clause
- create and use SAS date values including SAS date constants
- execute base SAS procedures such as SORT, PRINT, CONTENTS, MEANS, FREQ, TABULATE and CHART
SAS® System Modules used
This course covers Version 9 of Base SAS®.
Course Topics
Introduction
- Purpose of the Macro Facility
- Program Flow
- Course Data
Macro Variables
- Introduction to Macro Variables
- Automatic Macro Variables
- Macro Variable References
- User-Defined Macro Variables
- Delimiting Macro Variables Names
- Macro Functions
Macro Definitions
- Defining and Calling a Macro
- Macro Parameters
Data Step and SQL Interfaces
- Creating Macro Variables in the DATA Step
- Indirect References to Macro Variables
- Retrieving Macro Variable in the DATA Step (Self-Study)
- Creating Macro Variables in SQL
Macro Programs
- Conditional Processing
- Iterative Processing
- Global and Local Symbol Tables
Reserve your place on this Newtyne SAS Training Course
|