I have a long dataset like shown below and would like to report out just the unique ID's and combine their flags like this:
Data Have;
infile datalines delimiter = "," dsd;
input ID flagA $ FlagB $ FlagC $;
cards;
1,F,,
2,F,,
2,,,F
3,F,,
3,,F,
3,,,F
4,,,F
5,,F,
;
run;
data want;
infile datalines delimiter = "," dsd;
input ID flagA $ FlagB $ FlagC $;
cards;
1,F,,
2,F,,F
3,F,F,F
4,,,F
5,,F,
;
run;
proc print data=want;
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.