Choosing between the DATA Step and PROC SQL

As illustrated earlier, you can sometimes use either the DATA step or PROC SQL to combine data sets. A good understanding of your input data sets and the results you want to obtain will help you determine which tool is the better one to use to combine your data sets or tables. An additional important consideration is which method is easier for you to code and support.

In general, PROC SQL requires more computer resources than the equivalent DATA step. However, you might find coding PROC SQL in certain situations to be much simpler. What you lose in computer resources you might gain in your time to write and support the code.

The DATA step and PROC SQL follow different processes when combining data ...

Get Combining and Modifying SAS® Data Sets: Examples Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.