Monday, June 23, 2008

Proc download allows to get datasets from a server. Efficiency will increase if you can get speciefic columns you need. You can do it by defining a view and downloading this view. Sas will download the actual date and not the view definition as you may expect. Because view is a very small file, the operation of making a view compleets in no seconds.

In the example the data from dataset idl_ovk_kpr will be downloaded. Connect with servers should be established as normal and the server map kkcdb1 should be created. Notice that a view is created in the work map of the server.


rsubmit;
proc sql;
create view idl_ovk_kpr as
select CODMRK, CODDVG, CODKPR, DATING, DATEND, NUMOVK, numklt, NUMVNRKPR,Datreg
from kkcdb1.idl_ovk_kpr
/*where dating between &wrmindt and &wrmaxdt or datend between &wrmindt and &wrmaxdt */
;
quit;
proc download data=idl_ovk_kpr out=srclib.idl_ovk_kpr Connectstatus=y;
run;