Limiting the Number of Rows Displayed

Overview

When you create PROC SQL queries, you sometimes find it useful to limit the number of rows that PROC SQL displays in the output. To indicate the maximum number of rows to be displayed, you can use the OUTOBS= option in the PROC SQL statement.
General form, PROC SQL statement with OUTOBS= option:
PROC SQL OUTOBS= n;
Here is an explanation of the syntax:
n
specifies the number of rows.
Note: The OUTOBS= option restricts the rows that are displayed, but not the rows that are read. To restrict the number of rows that PROC SQL takes as input from any single source, use the INOBS= option. For more information about the INOBS= option, see Managing Processing Using PROC SQL.

Example ...

Get SAS Certification Prep Guide, 4th 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.