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.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 5072 views
  • 1 like
  • 3 in conversation