Either write the code for proc import or use the wizard and save the resulting proc import code. Modify the OUT=dataset to include the OBS dataset option:
proc import datafile=fileref out=mysasdataset (obs=50000) dbms=<whatever>;
run;
Depending on data source you may need to adjust the LRECL option as well.
That is if you are trying to limit a large data set to import only 50000 records.
... View more