BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
data_null__
Jade | Level 19

Since PROC APPEND is a statement in PROC DATASET I think you should at least nest the repeated APPENDs in PROC DATASETS.  If SAVE statement is not be appropiate you can just gen a DELETE for the list of APPEND data sets.

data D0912 D0913 D0914 D0915;

   set sashelp.class;

   run;

%let base=D0912;

proc sql noprint;

   select catx(' ','APPEND BASE=',"&base",'DATA=',memname,';') into :append

      from dictionary.members

      where libname eq 'WORK' and upcase(memname) ne %upcase("&base");

   quit;

   run;

proc datasets;

   &append;

   run;

   save &base;

   run;

   quit;

Ksharp
Super User

I think Art's code is good enough except for typing some more words. It is very fast way for large tabls.

Keep in mind that SAVE statement will only keep the &base , other tables will be deleted include other  needed tables, so you should be careful to use it.

Ksharp

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 16 replies
  • 6808 views
  • 0 likes
  • 7 in conversation