IntroductionLike macro variables, macro programs (also known as macros) enable you to substitute text into your SAS programs. Macros are different from macro variables because they can use conditional logic to make decisions about the text that you substitute into your programs. Using macros can help make your SAS programs more dynamic and reusable. For example, suppose you submit a SAS program every day to create registration
listings for courses that are to be held later in the current month.
Then, suppose that every Friday you also submit a SAS program to create
a summary of revenue that has been generated so far in the current month.
By using a macro, you can automate the process so that only one SAS
program is required. This program will always submit the daily report
and will conditionally submit the weekly report if it is Friday. Furthermore,
you could create and store a macro that would automate this process,
and the only code you would need to submit each day is this: |
2 hours |
In this lesson, you learn to
|
complete the following lessons:
|