@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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.