O'Reilly logo

Combining and Modifying SAS® Data Sets: Examples Second Edition by Michele M. Burlew

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Example 2.1 Concatenating Data Sets

Goal

Concatenate three data sets. Define a variable that identifies the data set from which the observation originated.

Example Features

Featured StepDATA step
Featured Step Options and StatementsSET statement, IN= option
Related Technique 1PROC SQL, OUTER UNION set operator and CORR keyword
Related Technique 2PROC APPEND

Input Data Sets

Data sets SPRINGGRADS, SUMMERGRADS, and FALLGRADS contain lists of biology students who graduated in spring, summer, and fall. The Student' final GPAs are included.

               SPRINGGRADS

Obs      student       concentration    gpa 1 Johnson, Allison Biochemistry 3.86 2 Davis, Jeffrey General Biology 3.91 3 Hall, Daniel Genetics 3.43 4 Hill, Courtney Ecology 4.00 5 Scott, Tiffany Plant Biology 3.58 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required