
Rick A. answered 03/26/19
Experienced SAS Professional
Yes, if you use the POINT and NOBS options of the SET statement. You MUST also include a STOP statement after you have finished reading the file - b/c SAS cannot detect end-of-file using this method.
Here is a simple example:
data raa;
input var1 $;
datalines;
Z
K
E
A
;
run;
data raa_backwards;
do n=tot_obs to 1 by -1;
set raa point=n nobs=tot_obs;
output;
end;
stop;
run;