Hi Keith, With ref to your reply "OBS= can only be used against the dataset being read in, not the output dataset, this can be in a procedure or datastep." It may be true for proc but its not true for datastep. In datastep, you can use OBS= on output datset like this: Data x(obs=3); set test; run; Output dataset X will keep only 3 rows in it. I hope it sounds logical. I am still looking for the reason why OBS= doesnt work in below example: proc sort data=test out= test1(obs=3) nodupkey; by a; run; Please advise.
... View more