Reputation: 107
I have a SAS frame program that I intend to use to call a separate SAS script a number of times. Each time, the information the called SAS script will be different.
Can I set the values of macro variables in the frame program that can then be used by the called SAS script?
Upvotes: 2
Views: 668
Reputation: 5239
Yes. If you set the macro variables prior to the %include
statements, the macros called using %include
will first look locally to resolve the macro variables and then look globally, which is where they will reside. There are four ways to create a macro variable, but the one you'll probably want to use is %let
.
If you're interested in being able to use macro variables outside of the macro where they were created, then you'll have to use %global
to initiate the macro variables.
Upvotes: 2