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.

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore 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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1563 views
  • 0 likes
  • 2 in conversation