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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1619 views
  • 0 likes
  • 3 in conversation