Everybody is familiar with SAS global statements, such as
They can be used in SAS open code, within SAS macros, as well as within DATA and PROC steps.
Global statements are not executable by definition, meaning they are not executed during individual iterations of the DATA step. However, they do "take effect", that is in essence "execute" at some point in a SAS program. To lift the veil of mystery about SAS global statements' habits I recently wrote a blog post
Take a read and you will never be confused by the global statements' behavior again.
Happy programming,
Leonid
I would title this thread "How to: Conditionally execute SAS global statements"
Hi ChrisNZ,
That is how the blog post is titled. As for the Community "announcement" title, there are two attributes which make it non-question: 1) no "?" at the end, and 2) "can" stands after "you", in a question it would've been in reverse 😀
More emphasis on the demonstration rather than question aspect can only be a good thing imho, but your call obviously, just a suggestion 🙂
Hi ChrisNZ,
Per your advice, I modified the title to be "Solution: How you can conditionally execute SAS global statements".
Thank you,
Leonid
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.