The SAS Output Delivery System and reporting techniques

How to compress output file in sas on Unix?

Reply
Occasional Contributor
Posts: 19

How to compress output file in sas on Unix?

Dear All,

As per the request, Output fle should be created as CSV format and it should send to E-Mail address on daily basis. In that case, My problem is size of the output file is exceeds 6 MB. So the program is unable to send a file to respective address. Could you please help me out how to compress the output CSV file before sending to E-Mail.

Please note that I am running sas program on Unix environment.

Thanks.

Kannan Baskar.

SAS Super FREQ
Posts: 8,719

Re: How to compress output file in sas on Unix?

Hi:

You could use a command line instruction to start up a zip program (or the Unix equivalent) to compress the CSV file into the zip file. Then, email the zip file instead of the CSV file.

There have been previous posts on using a zip utility and many posts on emailing. If you have specific questions about how to do this on Unix, you might want to work with Tech Support.

cynthia

Frequent Contributor
Posts: 113

Re: How to compress output file in sas on Unix?


Hi Baskar,

use "GZIP" and "GUNZIP" command to compress related work with all type of files on unix.

Regards

Uma Shanker Saini

Esteemed Advisor
Posts: 5,198

Re: How to compress output file in sas on Unix?

Emailing such large file on a daily basis sounds like an architectural nightmare (ok, maybe I exaggerate a bit).

What kind of informations is this, and who are the recievers?

You might want to consider other alternatives for data/information distribution.

Data never sleeps
Respected Advisor
Posts: 3,831

Re: How to compress output file in sas on Unix?

Just to add to Cynthia's post:

You can use a command like "filename dummy pipe '<zip command>'; "

Beginning with SAS 9.4 there is now also a zip engine which you could use: SAS(R) 9.4 Statements: Reference

Ask a Question
Discussion stats
  • 4 replies
  • 920 views
  • 0 likes
  • 5 in conversation