@VD17 wrote:
Thank you for the comments..
So, the reference sheet is huge with lots of schema and various conditions for each schema which are dynamic. So, I am using an excel sheet and reading it as macro so that when the value changes, I just have to update the excel.
It sounds like your code generation needs are extensive. It will probably be a lot easier to generate the code using SAS code instead of macro code. You will not need to move the reference data into macro variables. You can more naturally test for things like the ANY criteria you mentioned.
To get better example code provide a clearer picture of what you are doing. What are you checking for? How have decided to store the reference data to describe those checks? What do you think is the code you need to generate to make those checks?
@VD17 Not sure why you need a macro at all. The approach I've provided earlier will work and is easily expandable should you also have "any" for other columns.
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.