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

Hi,

 

I have, let's say, 10 xls files exported from sas with today's date in a particular directory. And I want to zip those files. I have exported those xls files using ods tagsets.ExcelXP and I am using SAS 9.2.

 

I have tried the below code.

 

%let subdir = C:\Report1;
filename dir "&subdir.*.xls ";

ods package(ProdOutput) open nopf;
ods package(ProdOutput)
add file="dir";
ods package(ProdOutput)
publish archive
properties
(archive_name=
"Report1 - Dt.&date1..zip"
archive_path="C:\Report1");
ods package(ProdOutput) close;

 

If the above approach is not correct, then could you let me know the correct way to do it?

 

Many thanks in advance.

 

Regards,

Vikrant

1 ACCEPTED SOLUTION

Accepted Solutions
RW9
Diamond | Level 26 RW9
Diamond | Level 26

So what doesn't work with that?  I can't run it as there are dependancies I don't have.   The logic looks ok, if need be check out one of the many examples, for instance:

http://support.sas.com/kb/45/256.html

And come back with exact questions.

View solution in original post

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

So what doesn't work with that?  I can't run it as there are dependancies I don't have.   The logic looks ok, if need be check out one of the many examples, for instance:

http://support.sas.com/kb/45/256.html

And come back with exact questions.

VikrantSawatkar
Obsidian | Level 7

Hi RW9,

 

Thank you for the link. I referred it and tweak the code mentioned in it a bit. Now I am able to zip the files

Reeza
Super User

I don't know if SAS 9.2 had support for these features, that would be my biggest concern. Some are definitely new in SAS 9.3

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
  • 2280 views
  • 0 likes
  • 3 in conversation