In the following code, I want to execute the where clause in proc print only if the macro variable 'filter' is 'y' otherwise it should not execute.
proc sort data= "&envPath/data/gb/&datasource" out=sorted nodupkey /*or noduprecs if sorting all vars*/;
by &_field /* or list of vars */;
proc print data= sorted noobs;
where ¶meter_1 in ("¶meter_2"); /** need help here to tweak this line to execute only when the macro variable 'filter' is 'y' */
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.