Building on the popularity of the first edition, Michele Burlew has revised this popular examples book to include expanded content and new features of SAS software. Completely updated for SAS 9.2, Combining and Modifying SAS Data Sets: Examples, Second Edition, presents examples that show solutions to common programming tasks that involve combining, modifying, and reshaping data sets. Expanded examples demonstrate how to combine data sets vertically and horizontally; retrieve data from lookup tables; modify and update data sets; combine summary and detail data sets; reshape and transpose observations in a data set; and manipulate data in a data set with utilities and functions.
The tools used to combine and modify data sets include the SET, MERGE, MODIFY, and UPDATE statements in the DATA step; joins and set operators in PROC SQL; BY-group processing; indexes; hash objects in the DATA step; the use of PROC FORMAT and hash tables as table lookups; and generation data sets.
Unique features of this book include the following: Examples are grouped by task, not by code, so you can easily find a solution to a particular task; alternative solutions are included in the main examples; most examples that combine and modify data sets include both a DATA step and a PROC SQL solution; many examples have an "A Closer Look" section that describes in-depth how the example solves the task; and each example stands on its own so you do not need to read the book from beginning to end.
Designed for SAS programmers at all levels, this examples book will help simplify the challenging task of combining and modifying data sets.