Hi,
I would like to produce this want dataset from have. It's like affecting only name = COUPLE, but name = SINGLE should not be edited.
data have;input id name $;cards;1 SINGLE2 COUPLE3 COUPLE;run;
data want;input id name $;cards;1 SINGLE2 MAN2 WOMAN3 MAN3 WOMAN;run;
Thank you
Use an explicit OUTPUT statement to override default.
If name='COUPLE' then do;
name='MAN'; output;
Name='WOMAN'; output;
end;
else output;
April 27 - 30 | GAYLORD TEXAN
Register now to lock in early bird pricing through February 25!
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.
Browse our catalog!