Hi!
if youre looking to make a new variable, say you name it "name" you would do
name= CATX (',', LastNm, FirstNm);
and if you wanted to get rid of those other two variables you would just drop them!
drop LastNm FirstNm;
Hi!
if youre looking to make a new variable, say you name it "name" you would do
name= CATX (',', LastNm, FirstNm);
and if you wanted to get rid of those other two variables you would just drop them!
drop LastNm FirstNm;
Another option could be Cat
data Want;
set Have;
FullName = cat(Lastnm, Firstnm);
run;
Or Google: "Creating New Character Values in SAS Documentation"
You could do this:
DATA new; SET old; FullName = LastNm || ',' || FirstNm; RUN;
Nearly 200 sessions are now available on demand in the Innovate Hub.
Watch Now →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.