BookmarkSubscribeRSS Feed
Midi
Obsidian | Level 7

Hi Everyone , i'm trying to append multiple files with the proc append and a macro , this is what i wrote :

 

%Macro Prep_Tbl_Date;
%do iii = 1 %to &num_File_.;
proc append Base=Work.Original_Table Data = %unquote(%str(%'&&_File_&iii..%'));
run;
%end;
%mend prep_table_date;
%pre_tbl_date;

Any Help Would be much appreciated , thank you.

3 REPLIES 3
Tom
Super User Tom
Super User

You are trying to reference datasets by using a quoted physical name.  SAS error message is saying the name does not look like a dataset name.  SAS dataset names use sas7bdat as the extension.  You do not need to include the extension. Example:

data test;
  set
   '/dir1/member1.sas7bdat'
   '/dir2/member2'
  ;
run;

If you meant to reference the dataset using normal LIBREF.MEMNAME syntax then do not include the quotes.

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 3 replies
  • 5982 views
  • 1 like
  • 3 in conversation