BookmarkSubscribeRSS Feed
ren2010
Obsidian | Level 7
Hi all,

I have a requirement,where i need to zip 100 plus files into one file,here is the sample code i am working on;


options mprint mlogic;
%let outaz=P:\test\AA_201004.zip;
%let libd7=E:\test\data\AZ\,aa_test_2007.sas7bdat;
%let libd8=E:\test\data\AZ\,aa_test_2008.sas7bdat;
%let libd9=E:\test\data\AZ\,aa_test_2009.sas7bdat;
%let libd10=E:\test\data\AZ\,aa_test_2010.sas7bdat;
%let libh7=E:\test\data\AZ\,aa_test1_2007.sas7bdat;
%let libh8=E:\test\data\AZ\,aa_test1_2008.sas7bdat;
%let libh9=E:\test\data\AZ\,aa_test1_2009.sas7bdat;
%let libh10=E:\\test\data\AZ\,aa_test1_2010.sas7bdat;



%macro qc (outaz,lib);


x %bquote("d:\program files (x86)\winzip\WINZIP32.EXE")

-a

%bquote("&out.")

"&lib.";



%mend;



%qc (&outaz.,&libd7.);
%qc (&outaz.,&libd8.);
%qc (&outaz.,&libd9.);
%qc (&outaz.,&libd10.);
%qc (&outaz.,&libd7.);
%qc (&outaz.,&libh8.);
%qc (&outaz.,&libh9.);
%qc (&outaz.,&libh10.);

I am getting an error " More positional parameters found than defined"

Please Help
2 REPLIES 2
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Suggest you activate the OPTIONS below in order to see the macro compilation and macro variable resolution to debug the problem:

OPTIONS SOURCE SOURCE2 MGEN SGEN MLOGIC NOMPRINT;

As the diagnostic stated, you are passing data-strings to your macro execution command which are being interpreted as positional parameters (more than 2).

Scott Barry
SBBWorks, Inc.
ren2010
Obsidian | Level 7
Thanks SBB,I corrected it.

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
  • 2 replies
  • 670 views
  • 0 likes
  • 2 in conversation