I am trying to export my processed SAS datasets into text files (.txt) with an UTF8 encoding. It seems proc export doesn't have an encoding option and putting the encoding option in the libname statement doesn't work. I also tried using the data step below but the text files are all empty (0 rows) and I really don't like this approach as it creates the SAS datasets all over again.
%do i=1 %to &num_file;
data out.&&filename&i. (encoding=UTF8);
set in.&&filename&i.;
file "&dir.\&&filename&i...txt";
run;
%end;