BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
radappan
Calcite | Level 5

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

"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;

View solution in original post

3 REPLIES 3
Kurt_Bremser
Super User

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.

radappan
Calcite | Level 5
Hi KurtBremser,



A repository has already been set up for this but the user needs the report to be send by email but I am getting an insufficient memory error.



Thanks.


Kurt_Bremser
Super User

"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;

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 2207 views
  • 2 likes
  • 2 in conversation