Hello
I want to export a data set with 2 million rows.
I want that the file we create will be compressed (ZIP)
I see that there was created a folder called "test.zip" but there is no file inside
filename _dataout zip "/path/test.zip";
proc export data=sashelp.cars
outfile=_dataout
dbms=csv replace;
run;
You didn't tell SAS what name to give the file. Just which directory (zip file) you wanted to write the file.
Either add the MEMNAME= option to the FILENAME statement
filename _dataout zip "/path/test.zip" memname='cars.csv';
or leave the fileref pointing to the directory and tell PROC EXPORT what name to use within the directory.
outfile=_dataout('cars.csv')
When testing the OP code on SAS 9.4M6 on AIX and copying the .zip file to Windows, I got a single member called "test" (no extension) in the zip file when opened with 7zip. Opening the .zip with just the Windows Explorer it looked empty.
Bottom line: never trust a Microsoft tool to get it right.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.