Combining several data sets

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 6
Accepted Solution

Combining several data sets

I have 243 data sets with names as:

fixed11

fixed21

fixed31

fixed41

...

fixed2411

fixed2421

fixed2431

All of them have the same variable names, and number of columns.

How can I combine them (one above the other) in one data set avoiding several data steps?


Accepted Solutions
Solution
‎05-25-2015 12:52 PM
Super User
Posts: 19,023

Re: Combining several data sets

Assuming you want to append (stack) all the tables, use the colon shortcut.

data want;

set fixed: ;

run;

If you want them merged, ie the variables side by side that's a different question.

View solution in original post


All Replies
Solution
‎05-25-2015 12:52 PM
Super User
Posts: 19,023

Re: Combining several data sets

Assuming you want to append (stack) all the tables, use the colon shortcut.

data want;

set fixed: ;

run;

If you want them merged, ie the variables side by side that's a different question.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 1 reply
  • 211 views
  • 0 likes
  • 2 in conversation