@PGStats wrote:
Try
length merged $64;
merged = catx(",", of col1-col4);
The catx function concatenates its arguments, separated by the first argument. It ignores missing values.
By default a Missing value for a numeric will appear as . in the result.
data example;
col1='abc';
col2=.;
col3=3;
col4='pdq';
merged= catx(',',of col1-col4);
run;
/* will yield Merged = "abc,.,3,pdq" */
If you set the missing character to blank then the concatenated version will be missing
options missing=' ';
data example;
col1='abc';
col2=.;
col3=3;
col4='pdq';
merged= catx(',',of col1-col4);
run;
/* merged = "abc,3,pdq" */
So if you have numeric values you may have one or more issues to resolve in determining the exact result desired.
Since this post started with importing Excel it is hard to determine what type of values you may have.