| SPD Engine LIBNAME Statement Options |
| Used with: | ENDOBS= |
| Corresponding data set option: | STARTOBS= |
| Default: | the first observation in the data set |
| Restriction: | use STARTOBS= with input data sets only |
| Restriction: | cannot be used with OBS= system and data set option or FIRSTOBS= system and data set option |
| Syntax | |
| Details | |
| Example |
Syntax |
| STARTOBS=n |
is the number of the starting observation.
| Details |
By default, the SPD Engine processes all of the observations in the entire data set unless you specify a range of observations with the STARTOBS= and ENDOBS= options. If the ENDOBS= option is used without the STARTOBS= option, the implied value of STARTOBS= is 1. When both options are used together, the value of STARTOBS= must be less than the value of ENDOBS=.
In contrast to the default Base SAS engine option FIRSTOBS=, the STARTOBS= and ENDOBS= SPD Engine options can be used in the LIBNAME statement.
Note: FIRSTOBS= default Base SAS engine option is not supported by the
SPD Engine. The OBS= system option and the OBS= data set option cannot be
used with STARTOBS= or ENDOBS= data set or LIBNAME options. ![[cautionend]](../../../../common/63294/HTML/default/images/cautend.gif)
(Refer to SPD Engine Data Set Options for information about using the STARTOBS= data set option in WHERE processing.)
| Example |
The following example prints the five observations that were qualified by the WHERE expression (age >13 in PROC PRINT). The five observations are out of the six observations that were processed, starting with the second observation in the data set:
libname growth spde 'D:\SchoolAge' startobs=2; data growth.teens; input Name $ Sex $ Age Height Weight; datalines; Alfred M 14 69.0 112.5 Carol F 14 62.8 102.5 James M 13 57.3 83.0 Janet F 15 62.5 112.5 Judy F 14 64.3 90.0 Philip M 16 72.0 150.0 William M 15 66.5 112.0 ; proc print data=growth.teens; where age >13; run;
The output is shown:
The SAS System
Obs Name Sex Age Height Weight
2 Carol F 14 62.8 102.5
4 Janet F 15 62.5 112.5
5 Judy F 14 64.3 90.0
6 Philip M 16 72.0 150.0
7 William M 15 66.5 112.0
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.