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

When I say:

data work.temp1
   set work.temp2
       work.temp3;

run;

Is it same as:
proc append base = temp2 data=temp3;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
TomKari
Onyx | Level 15

The order of the records WILL be preserved, but unless the variable names and types are identical in the two datasets, there can be differences in functionality that are too extensive to describe here.

If your BASE dataset is large, one advantage of PROC APPEND is that it doesn't process the BASE dataset, only the DATA dataset, which can save processing time.

I suggest hitting the documentation for PROC APPEND to ensure it will act in the way you want.

Tom

View solution in original post

3 REPLIES 3
Reeza
Super User

No.

In the first you're creating a new data set, in the second your appending to the temp2, so all the data is now in temp2.

Also, what happens if you have some columns in temp3 that are not in temp2? Or variables are different lengths or formats?

eagles_dare13
Obsidian | Level 7

Thanks. Apart from creating a new dataset, is there  any other  difference? What about the order of the records? Will they be preserved after the append?

TomKari
Onyx | Level 15

The order of the records WILL be preserved, but unless the variable names and types are identical in the two datasets, there can be differences in functionality that are too extensive to describe here.

If your BASE dataset is large, one advantage of PROC APPEND is that it doesn't process the BASE dataset, only the DATA dataset, which can save processing time.

I suggest hitting the documentation for PROC APPEND to ensure it will act in the way you want.

Tom

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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
  • 3 replies
  • 1539 views
  • 3 likes
  • 3 in conversation