Chapter 10
By-Group Processing in SAS
Programs
Definition of BY-Group Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
References for BY-Group Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Definition of BY-Group Processing
BY-group processing is a method of processing observations from one or more SAS data
sets that are grouped or ordered by values of one or more common variables. You can
use BY-group processing in both DATA and PROC steps.
The most common use of BY-group processing in the DATA step is to combine two or
more SAS data sets by using the BY statement with a SET, MERGE, MODIFY, or
UPDATE statement. When you create reports or summaries with SAS procedures, BY-
group processing enables you to group information in the output according to values of
one or more variables.
References for BY-Group Processing
For more information about BY-Group processing, see Chapter 20, “BY-Group
Processing in the DATA Step,” on page 427.
For information about how to use BY-group processing with SAS procedures, see
Chapter 2, “Fundamental Concepts for Using Base SAS Procedures,” in Base SAS
Procedures Guide and individual procedures in Base SAS Procedures Guide.
For information about using BY-group processing to combine information from
multiple SAS data sets, see Chapter 21, “Reading, Combining, and Modifying SAS
Data Sets,” on page 443. For even more extensive examples of BY-group
processing, see Combining and Modifying SAS Data Sets: Examples.
For information about the BY statement, see Statements in SAS Statements:
Reference.
For information about how to use BY-group processing with other software
products, see the SAS documentation for those products.
155
156 Chapter 10 By-Group Processing in SAS Programs

Get SAS 9.4 Language Reference, 3rd 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.