When I say:
data work.temp1
set work.temp2
work.temp3;
run;
Is it same as:
proc append base = temp2 data=temp3;
run;
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
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?
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?
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
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!
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.