You can use the OBS= and FIRSTOBS= data set options to subset the input data set.
For example, the following statements print observations 20 through 25 of the data set FULL:
proc print data=full(firstobs=20 obs=25); run;
You can use KEEP= and DROP= data set options to exclude variables from the input data set. See SAS Language Reference: Dictionary for information about SAS data set options.