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
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.
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.