> Hello,
>
> I have two related problems.
>
> 1) I have a data set with 100 observation I only need
> the first 15 of them.
on the set statement ( or just about anywhere you have a DATA= use the OBS= option
Data newdata;
set olddata (obs=15);
run;
Also look at FIRSTOBS.
>
> 2) next only need 5 variables of the 14 variables
>
> I used KEEP statement but my data came out with the
> wrong order. These are binary data and I need to keep
> the order the way it was in the original data.
Which order? Sort, as in row order, or columns in a dataset. If the latter I wouldn't worry about as other applications that may want the data would either link to the variable name or when you export the data then specify the column order.
... View more