It would be nice to have a CAT_() type function that uses the format applied to the variables rather than Best for numeric variables.
For example, I would have preferred if the WANT_STRING was the same as the output from the HAVE_STRING code, since a format is applied to the variables already.
data have;
format date1-date20 date9.;
format datec1-datec20 $9.;
length datec1-datec20 $9. x_string y_string $256.;
array _date(*) date1-date20;
array _datec(*) $ datec1-datec20;
do i=1 to dim(_date);
_date(I)=floor(ranuni(25)*365+1);
_datec(I)=trim(put(_date(I), date9.));
end;
have_string=catx(", ", of _date(*));
want_string=catx(", ", of _datec(*));
run;
proc print ;
run;