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. 

 

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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