Hi All,
I want to create a Zip file using a sas code and want to move all the dataset available in a particular location or library into a zip file and then delete all the dataset outside the zipfile using SAS studio.
If any one have any code for the same kindly help me. We are running the code on Linux server(If this information help).
It will be a great help.
Regards
Ankit
Use ods package:
https://blogs.sas.com/content/sasdummy/2014/01/28/create-zip-ods-package/
http://support.sas.com/resources/papers/proceedings13/131-2013.pdf
To delete datasets, use proc datasets:
http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#a000393161.htm
Hi,
Thanks for the information you have shared.By using the 1st link we can make zip file only for one CSV. But I want to create zip file for more than 50 SAS dataset number can increase. If you can suggest an alternative or share any other code it will be a great help.
Regards
Ankit
All you do is add more addfile statements to add more files:
ods package(ProdOutput) add file='...';
You can add as many as you want.
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.