BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tom
Super User Tom
Super User

What is the overall purpose of this block of code?  Why not just process the table by AdmUnit instead of running separate queries for each AdmUnit?

 

Tom
Super User Tom
Super User

Look carefully at your logic around this comparison:

&validToDate="01JAN5999" 

If the variable that is used to store into the macro variable VALIDTODATE is a date value the result will depend of the format attached.  So it could be a string of digits or the string 01JAN5999 or something else if a different format is attached.  But it will never have quotes around it like your test is looking for.

 

You might want to just add the quotes to both sides of the comparison.

"&validToDate"="01JAN5999" 

 

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
  • 16 replies
  • 5053 views
  • 0 likes
  • 5 in conversation