Dear team, I I have been stuck to find a solution to provide the output results for the 3 months. The solution does not work if I add months 04 and 05.
What is the best way to display the data for the condition WHERE Check = 0 and month = 03 04 05?
proc print data=Oth (obs=1000);
where Check=0 and month = 03;
run;
If month is numeric:
month in (3 4 5)
or if month is character:
month in ('03' '04' '05')
B.
If month is numeric:
month in (3 4 5)
or if month is character:
month in ('03' '04' '05')
B.
it is numeric, so
the code is the next:
proc print data=Ret_oth (obs=1000);
where Check=0 and reporting_month in (03 04 05);
run;
But still the results only provide 03 data
The following:
data Ret_oth;
do reporting_month = 1 to 5;
Check=0; output;
Check=1; output;
end;
run;
proc print data=Ret_oth (obs=1000);
where Check=0 and reporting_month in (03 04 05);
run;
works as expected.
Check you data (Maxim 3), maybe months 4 and 5 are after obs=1000?
Bart
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.