Hi,
I have a report automated in SAS DI Studio but it's too large to send by an automated email. Can one of the users please assist me to zip this report and then send though an auto email.
Thanks.
"Report" usually means something that is a few pages in size, and contains overview data to be read by a user.
Something that cracks the memory barriers while processing it looks like raw data, not a report. For data, simply export to a csv file and zip that.
You can do this in one step like this:
filename outzip zip '/folders/myfolders/class.zip';
data _null_;
set sashelp.class;
file outzip(class.csv) dlm=',';
if _n_ = 1 then put "name,sex,age,height,weight";
put name sex age height weight;
run;
filename outzip clear;
If you already have a .xlsx file, there's not much sense in zipping it again. It is already a ZIP archive of XML data.
Instead of sending files in email, consider setting up a repository from which others can download the data with SFTP.
"Report" usually means something that is a few pages in size, and contains overview data to be read by a user.
Something that cracks the memory barriers while processing it looks like raw data, not a report. For data, simply export to a csv file and zip that.
You can do this in one step like this:
filename outzip zip '/folders/myfolders/class.zip';
data _null_;
set sashelp.class;
file outzip(class.csv) dlm=',';
if _n_ = 1 then put "name,sex,age,height,weight";
put name sex age height weight;
run;
filename outzip clear;
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.