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" 

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

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