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

Hello Genius,

I have 10 datasets with same no. of variables (392) and same variable names for all datasets. Each dataset having massive no. of observation and i want to join/merge each and every datasets in to one making "ONE BIG DATASET" with all observation from all datasets.

What is the best practice to do so?

Please advise....

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
5 REPLIES 5
Linlin
Lapis Lazuli | Level 10

Do you want to merge or set? if you want to merge you have to rename some of your variables first.

Reeza
Super User

Are you merging the files by a common variable  (10 files * 392 variables ~= 3920 variables ) or appending them together (still 392 variables at the end)?

sas_9
Obsidian | Level 7

@ Reeza - adding observation from all 10 datasets and will stay with 392 variables at the end - appreciate your reply...

@Linlin - I am not sure whether i am going to merge or set but again will stay with same no. of variable (392) and adding observations from all 10 datasets...- Thanks


Linlin
Lapis Lazuli | Level 10

try:

data want;

set data1 data2 ...data10;

run;

sas_9
Obsidian | Level 7

Thanks Linlin...Thanks you all for your feedback

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 5 replies
  • 711 views
  • 0 likes
  • 3 in conversation