I want to export a wide SAS dataset (a few thousand columns and a few hundred thousand rows) to a text file. proc contents data=myData
out=contents(keep=name)
noprint;
run;
proc sql noprint;
select name into :header separated by '|'
from contents;
quit;
%put NOTE: &=header;
data _null_;
file 'G:\myPath\output.txt' lrecl=500000 dsd dlm='|';
set myData;
IF _N_=1 THEN PUT "%BQUOTE(&header)";
put (_all_)(+0);
run; This would work in theory, however, my header is over 32,767 characters long and is truncated. How can I modify these statements to ensure the whole header is written to the output file? This is on SAS 9.4.
... View more