When I write:
data work.temp;
set work.temp1
work.temp2
work.temp3;
keep col1 col2 col3 col4 col5;
run;
Will it only keep unique rows in the final output or will it keep duplicates? Also how is the above code different from proc append?
No, it will not. Use proc sort with nodupkey, or SQL distinct to get rid of duplicates.
You code will create a new file, open each in the set and write out to the new file. Not very read/write optimized. Proc append doesn't open the file, just sets them together so less I/O operation. The proc append will throw warnings if the dataset formats are not exact or if there are more variables. Dataset will warn on some things, but will expand the output table with any new columns without warning. Best check the guidance for complete run down as there are plus/minus points on each/
No, it will not. Use proc sort with nodupkey, or SQL distinct to get rid of duplicates.
You code will create a new file, open each in the set and write out to the new file. Not very read/write optimized. Proc append doesn't open the file, just sets them together so less I/O operation. The proc append will throw warnings if the dataset formats are not exact or if there are more variables. Dataset will warn on some things, but will expand the output table with any new columns without warning. Best check the guidance for complete run down as there are plus/minus points on each/
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: