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;
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.
Ready to level-up your skills? Choose your own adventure.