BookmarkSubscribeRSS Feed
VD17
Calcite | Level 5
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.
VD17
Calcite | Level 5
I was wondering if something like * instead of any would make SAS take it as any value? I tried * and ** but doesn’t work..
I am thinking if something on that line though would read directly from excel to SAS as Any
Tom
Super User Tom
Super User

@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
Calcite | Level 5
I agree.. and that what I am struggling with. I tried putting a condition
If &t = anyT the &t ne .
But it doesn’t work..
Patrick
Opal | Level 21

@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. 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 19 replies
  • 2707 views
  • 0 likes
  • 5 in conversation