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

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 4884 views
  • 0 likes
  • 5 in conversation