O'Reilly logo

SAS 9.4 Language Reference, 6th Edition by SAS Institute

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

Chapter 10
By-Group Processing in SAS
Programs
Definition of BY-Group Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
References for BY-Group Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
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 449.
For information about how to use BY-group processing with SAS procedures, see
“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 465. 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.
175
176 Chapter 10 By-Group Processing in SAS Programs

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