From %Macro to %MEND: An Introduction to the SAS® Macro Language
This one-day course is designed for the SAS programmer who is new to the Macro Language. We will start at the basics and cover the fundamentals necessary to start applying SAS macros in your programs. By the end of the day you will understand how the Macro Language works, what the Macro Symbol Table is and how values are stored in it, how the SAS System uses Macro Variables, key Macro Language concepts, important SAS Macro Language statements, and how to invoke Macros in your programs. The example Macros shown in the course materials demonstrate the power and flexibility of this part of the SAS System and will enable you to apply the functionality of the Macro Language to your own programs right away.
This session is suited for the SAS user who already has a basic understanding of the Data Step and Procedure Steps, and who is new to the Macro Language facility in SAS System software. It is a beginning-level course that assumes no prior understanding of the SAS Macro Language. It is also suitable for SAS users who want to understand the Macros found in programs that have been "inherited" from other programmers.
Intended Audience Level: Beginner to early intermediate
Delivery Method: Seminar style
Class Material: Carpenter’s Complete Guide to the Macro Language, 3rd Edition
This session is suited for the SAS user who already has a basic understanding of the Data Step and Procedure Steps, and who is new to the Macro Language facility in SAS System software. It is a beginning-level course that assumes no prior understanding of the SAS Macro Language. It is also suitable for SAS users who want to understand the Macros found in programs that have been "inherited" from other programmers.
Intended Audience Level: Beginner to early intermediate
Delivery Method: Seminar style
Class Material: Carpenter’s Complete Guide to the Macro Language, 3rd Edition
Advanced Techniques in the SAS® Macro Language
This one day course is designed for students with a good understanding of the DATA and PROC steps and who already understand the basic structure and syntax of the SAS Macro Language. The course will start with a short review of the macro basics and quickly move on topics selected to improve your macro language expertise. Several key macro functions will be introduced, explained and demonstrated. Course topics include:
Learn how the macro language thinks as you use it to write your programs.
Intended Audience Level: Intermediate
Delivery Method: Seminar style
Class Material: Carpenter’s Complete Guide to the Macro Language, 3rd Edition
- Macro Language Review
- Macro Functions, Using and Creating
- Writing Dynamic Code
- Controlling Your Environment
- Working With SAS Data Sets
- Using SAS Macro Libraries
- Miscellaneous Macro Topics
Learn how the macro language thinks as you use it to write your programs.
Intended Audience Level: Intermediate
Delivery Method: Seminar style
Class Material: Carpenter’s Complete Guide to the Macro Language, 3rd Edition
Innovative Tips and Techniques: Doing More in the DATA Step
In order for you to use SAS® to write innovative DATA step solutions to complex coding problems, it is necessary for you to have more than a basic understanding of the individual statements. You need to understand how the various statements interact with each other and how their options can be leveraged to provide the kind of DATA step code that will provide innovative solutions to the toughest of problems. Based on Art’s latest book, Carpenter’s Guide to Innovative SAS® Techniques, published in the spring of 2012, this class is a must for the DATA step programmer that wants to take his or her programs to the ‘next’ level.
Topics include:
• Data set options with impact
• New functions and old functions with new options
• Evaluating expressions
• Working with Data Component Objects - Hash Tables
• Transposing the data using arrays
• Using the DOW loop
• Using double SET statements effectively
• Look-ahead and Look-back techniques
• Using Multi-label formats to create running averages
• Table look-ups in the DATA step
• and much more
This course is designed to be taken by a student who has a basic understanding of the DATA step, its primary statements, and its basic operation. The seminar will provide a short refresher of these basics, but will concentrate on topics that will allow the user to take full advantage of the power of the DATA step.
The student will leave the seminar with a deeper understanding of the operation of the DATA step and a number of its primary statements. The student will be exposed to a number of advanced techniques that solve difficult programming problems in innovative ways. The relative efficiencies of a number of competing techniques will be
discussed along with the methodologies for their implementation.
Intended Audience Level: Beyond Beginner
Delivery Method: Seminar style
Topics include:
• Data set options with impact
• New functions and old functions with new options
• Evaluating expressions
• Working with Data Component Objects - Hash Tables
• Transposing the data using arrays
• Using the DOW loop
• Using double SET statements effectively
• Look-ahead and Look-back techniques
• Using Multi-label formats to create running averages
• Table look-ups in the DATA step
• and much more
This course is designed to be taken by a student who has a basic understanding of the DATA step, its primary statements, and its basic operation. The seminar will provide a short refresher of these basics, but will concentrate on topics that will allow the user to take full advantage of the power of the DATA step.
The student will leave the seminar with a deeper understanding of the operation of the DATA step and a number of its primary statements. The student will be exposed to a number of advanced techniques that solve difficult programming problems in innovative ways. The relative efficiencies of a number of competing techniques will be
discussed along with the methodologies for their implementation.
Intended Audience Level: Beyond Beginner
Delivery Method: Seminar style
Building Dynamic Programs and Applications Using the SAS® Macro Language
This seminar shows you how to take advantage of SAS Macro Language capabilities that enable you to write dynamic programs and applications. By mastering the concepts and techniques presented in this class your programs will become free of hard-coded data dependencies, thus eliminating the need to re-write the code every time a data set name, variable name, or other data attribute, changes. Let “them” change the project's specifications as often as “they” want…your code is ready!
The dynamic programming techniques that you will learn about during this seminar:
This course makes extensive use of example macros that have been gathered from real world applications, and it concentrates on the techniques necessary to make effective use of these tools.
Intended Audience Level: Strong understanding of the macro language
Delivery Method: Seminar style
The dynamic programming techniques that you will learn about during this seminar:
- Are flexible and are easily adaptable to changing data structures, data table names, and variable (field) attributes
- Reduce maintenance requirements by removing data dependencies from within the programs
- Provide significant resource savings during program/application development cycles
- Give the end-user extensive control over program execution by using tables such as SAS data dictionaries, SAS data sets, and Excel tables
- Reduce program validation efforts by providing reusable and generalized code that can be applied to many different applications
- Establish controlled data environments, thus insuring data integrity throughout your organization
This course makes extensive use of example macros that have been gathered from real world applications, and it concentrates on the techniques necessary to make effective use of these tools.
Intended Audience Level: Strong understanding of the macro language
Delivery Method: Seminar style
About the Author
Art Carpenter is a SAS Certified Advanced Professional Programmer and his publications list includes five books and numerous papers and posters presented at SAS Global Forum, SUGI, PharmaSUG, WUSS, and other SAS user conferences. Art has been using SAS since 1977 and has served in various leadership positions in local, regional, and international user groups. Art is in the process of becoming mostly retired.
Recent publications are listed on his sasCommunity.org Presentation Index page. http://sascommunity.org/wiki/Presentations:ArtCarpenter_Papers_and_Presentations |