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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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