I am trying to combine two columns and add a enter or next line the values , can you help me ?
data test;
x="himom";
y="hidad";
;
run;
data want;
set test ;
length D $50 ;
d = catx('0D0A'x,x,y);
run;
proc print data=want;run;
Result i want :
newcolumn
-----------
himom
hidad
Where do you expect this to appear? It might be possible for some ODS destinations but it may be that the approach is different for different file types.
And basically isn't going to appear in a data set view.
I don't think there is a way for PROC PRINT to honor linefeed/carriage returns within the value of a single Cell.
I wonder if there are any PROC REPORT honchos seeing this question can provide a solution.
ENTER is a KEY, not a CHARACTER. I suppose the character you might want is a LINEFEED, '0A'x, or CARRIAGE RETURN, '0D'x.
But you are probably better off inserting something that PROC REPORT will recognize as a line break.
See this thread for example. https://communities.sas.com/t5/SAS-Procedures/Multiple-lines-in-a-PROC-REPORT-cell/td-p/312811
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: