![]() Chapter Contents |
![]() Previous |
![]() Next |
| FIRSTOBS= |
| Valid in: | configuration file, SAS invocation, OPTIONS statement, Systems Options window |
| Category: | Files: SAS files |
| PROC OPTIONS GROUP= | SASFILES |
| Syntax | |
| Syntax Description | |
| Details | |
| Comparisons | |
| Examples | |
| See Also |
Syntax |
| FIRSTOBS=n| nK | nM | nG | MIN | MAX | hex |
| Details |
FIRSTOBS must be set to 1 in order to use a WHERE statement or a WHERE= data set option. By default, FIRSTOBS=1.
![[cautionend]](../common/images/cautend.gif)
| Comparisons |
| Examples |
If you specify FIRSTOBS=50, SAS reads the 50th observation of the data set first.
This option applies to every input data set that is used in a program or a SAS process. In this example, SAS begins reading at the eleventh observation in the data sets OLD, A, and B:
options firstobs=11; data a; set old; /* 100 observations */ run; data b; set a; run; data c; set b; run;Data set OLD has 100 observations, data set A has 90, B has 80, and C has 70. To avoid decreasing the number of observations in successive data sets, use the FIRSTOBS= data set option in the SET statement. You can also reset FIRSTOBS=1 between a DATA step and a PROC step.
Operating Environment Information: The syntax that is shown here applies to the OPTIONS
statement. On the command line or in a configuration file, the syntax is specific
to your operating environment. For details, see the SAS documentation for
your operating environment.
| See Also |
Data Set Option:
| |||
Statement:
| |||
System
Option:
|
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.