I have a parameter that has several possible entries, i.e., for supervisors, the parameters that can be chosen can be up to 5 in total. To "pull in" the parameters and subsequently use them as part of an IN comparison in a PROC SQL, I have the following code:
To compare my data against the parameters in my PROC SQL:
(PERSON_DETAIL.SUPERVISOR_CATEGORY IN (&supvcodesval))
Is this valid code and logic? The reason I ask is that it appears my code, as shown in a PROC REPORT, only hsows records for my first parameter value and not for other values in the same parameter. If there is a better way of doing what I'm attempting, would someone please respond?
Thanks in advance to any who reply....looking forward to your suggestions.
Generally when you are dealing with a test for a null macro variable the test is coded as:
%if &macvar =; (macro variable has a NULL value which means that, in your case, no value was sent by the client application to the server)
%if &macvar ne ; (macro variable has SOME value you don't yet know what)
%if %upcase(&macvar) eq WOMBAT %then %do; (when you compare a macro variable to a text string, you don't need quotes).
Have you coded and tested in PROC REPORT, what a working where statement would look like:
where somevar in ("val1", "val2", "val3"); ???
Thank you for your timely response, Cynthia! I was quite close on my code, but I think your suggested links will put me onth tohe correct path. I appreciate you being so helpful, and I also appreciate your knowledge!
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.