Reputation: 1089
I am new to sas and I still trying to figure out how it works. My problem is to copy only a subset of a table and I have tried the following:
proc copy in=inlib out=work;
select mytable (obs=10000);
run;
However it looks like I cannot apply the obs option during the proc copy. How can I achieve this with proc copy?
Upvotes: 1
Views: 189
Reputation: 63
There is no need to use a proc copy here; a data step should do the job (perhaps with the exception of if the dataset is indexed?). Data steps are the main ingredient of SAS so it's a good idea to get used to them!
Just run:
data mytable;
set inlib.mytable (obs=10000);
run;
This way you can also use keep or where statements for more complex filtering or columns or observations.
Upvotes: 0