ENDOBS= Table Option

Specifies the end observation number in a user-defined range of observations to be processed.

Valid in: SELECT statement
Category: Observation Control
Restriction: Use with input data sets only
Interaction: Use in conjunction with STARTOBS= table option
Data source: SPD Engine data set, SPD Server table

Syntax

ENDOBS= n

Arguments

n

is the number of the end observation.

Details

The software processes all of the observations in the entire data set unless you specify a range of observations with the STARTOBS= or ENDOBS= options. If the STARTOBS= option is used without the ENDOBS= option, the implied value of ENDOBS= is the end of the data set. When both options are used together, the value of ENDOBS= must be greater than the value of STARTOBS=.
In contrast to the Base SAS software options FIRSTOBS= and OBS=, the STARTOBS= and ENDOBS= SPD Server options can be used for WHERE clause processing in addition to table input operations. When ENDOBS= is used in a WHERE expression, the ENDOBS= value represents the last observation to process, rather than the number of observations to return.

Example

The following code shows how the ENDOBS= table option is specified in the FedSQL SELECT statement:
select * from spdslib.table1(startobs=3 endobs=4);

See Also

Table Options:
Last updated: February 23, 2017