Var New Var
A A
B AB
C ABC
D ABCD
can anyone explain how to get this answer with using retain statement or other option
Thank you
Unnati
HOw about something like this?
data have; input Var:$1; datalines; A B C D ; data want; set have; length NewVar $4; retain NewVar; NewVar=CATS(NewVar,Var); run;
View solution in original post
data have; do _n_=65 to 68; var=byte(_n_); output; end; run; data want; set have; length want $10; retain want; want=cats(want,var); run;
Hi @unnati it;s plain vertical concatenation. Just a matter of time before you get the understanding. HTH
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.