Help using Base SAS procedures

Using Startobs= and Endobs= options together in a Proc step

Reply
N/A
Posts: 0

Using Startobs= and Endobs= options together in a Proc step

I am unable to use Startobs= and Endobs= options together in a Proc Print data step. Does anyone know how to use these together?

The syntax I am uisng is as follows but it doesn't work:

PROC PRINT DATA=COMB (STARTOBS=7 ENDOBS=12) ;
VAR DIST_Q SSPOS_C1 REL_C2 TotSNEG;
RUN;
SAS Super FREQ
Posts: 8,864

Re: Using Startobs= and Endobs= options together in a Proc step

Posted in reply to deleted_user
Hi:
If you look in the documentation, you will find that the options are:
OBS: http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#/documentation/cdl/...
and
FIRSTOBS: http://support.sas.com/documentation/cdl/en/lrdict/63026/HTML/default/viewer.htm#/documentation/cdl/...

For example, in the code below, the first observation displayed on the PROC PRINT report will be observation 5 and the last observation displayed on the report will be observation 8.

cynthia

[pre]
proc print data=sashelp.class(firstobs=5 obs=8);
run;
[/pre]
Ask a Question
Discussion stats
  • 1 reply
  • 106 views
  • 0 likes
  • 2 in conversation