Hi all,
I would like to print out a report by grouping studysites for a dataset 'test'. I have a code below. However, I found out that the output file was order by studysite, it print out the studysite and the IDs one by one. I don't like that, I would like to out put the file with grouping the studysite first, then sorting the IDs later. I found there is no 'GROUP' option in the PROC PRINT, please advice how to approach it? Thanks.
options orientation=portrait; proc print data=test; var id repeat_id studysite DOB months days; where repeat_id in (&replistdob.); by studysite repeat_id; title 'More than 1 dob for a repeat ID'; run;
I would like to out put the file with grouping the studysite first, then sorting the IDs later.
use by studysite; instead of by studysite repeat_id;
I would like to out put the file with grouping the studysite first, then sorting the IDs later.
use by studysite; instead of by studysite repeat_id;
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!
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.