Try to remove some unprintable characters .
data data;
set data;
z=compress(z,' ','s');
/*
z=compress(z, ,'ka');
*/
run;
proc sort ..........
... View more
Before you can use a macro to generate code you have to know what code you need to generate. So work on getting code to work for one file. Then you could think about building a macro (if one is needed).
... View more
Use compress and tell it which class of characters to keep.
data x;
input x $32.;
xnew = compress(x,,'KADS');
cards;
x
* '''[[Nick]]'''
* [[KK Circle]]
* [[Spenser]]
||-
* Cool
* Cool 9
||
Name
;;;;
run;
... View more
data have;
input x & $10.;
cards;
2019
New Year
Happy
Good
;
data want;
set have;
retain year;
if _n_=1 then do;
year=x;
delete;
end;
run;
... View more