|
|
|
||||
|
|
|||||
data test;
infile cards missover;
length first last $20;
input first $ last $ ;
datalines;
jone smith
john wayne
bill
phil hodge
;
run;
data test2;
set test;
name = catx(", ", of last first );
name1 = cat(of last first);
name2 = cats(of last first); /*leading or trailing blanks*/
name3 = catt(of last first); /*trailing blanks*/
run;
proc print data = test2;
run;
Obs first last name name1 name2 name3
1 jone smith smith, jone smith jone smithjone smithjone
2 john wayne wayne, john wayne john waynejohn waynejohn
3 bill bill bill bill bill
4 phil hodge hodge, phil hodge phil hodgephil hodgephil
For more details on these functions, see SAS online documentation of
CAT function.
UCLA Researchers are invited to our Statistical Consulting Services
We recommend others to our list of Other Resources for Statistical Computing Help
These pages are Copyrighted (c) by UCLA Academic Technology Services