September 2019
Beginner to intermediate
346 pages
7h 35m
English
We can restrict the number of records being read using the OBS and the FIRSTOBS options:
PROC PRINT DATA = Cost_Living (FIRSTOBS=4 OBS=5);RUN;
This will give us the following output:

The option can also be specified outside the data step:
OPTIONS OBS = 2;
Using OPTIONS in SAS is effective for subsetting but only when the criterion is the number of records and when the starting position is observations is known or doesn’t matter.
Read now
Unlock full access