I tried to use ods csv because all the other things didn't work, so I also tried ods csv and thought that it would be the best way to modify this tagset to get my result. But I was wrong I know that proc export doesn't really insert an empty blank data line. But SAS on a Windows system writes a line feed and a carriage return (hex = 0D 0A) at the end of each line. Which is perfectly correct. So it happens that at the end of the file there is an empty line displayed because of the carriage return, and I guess that the system to which the file is being uploaded is maybe not a Windows system, thus it misinterprets this last "empty" line as an empty data line. But, I managed to create this file without this last LF and CR by combining your proposal and this one here: https://communities.sas.com/thread/14211?start=0&tstart=0 data _null_; file "Z:\temp\test.csv" recfm=n; length row $1000; set test ( keep = var1 var2 var3 var4 ); row = catx( ",", var1, var2, var3, var4 ); if _n_ = 1 then put "var1" "," "var2" "," "var3" "," "var4" "0D0A"x; if _n_ > 1 then put "0D0A"x; put row; run; Thanky very much!
... View more