Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

proc export to dat?

Status
Not open for further replies.

sap1958

Technical User
Oct 22, 2009
138
US
I notice that proc export allows for just about every file extension except .dat or sas file. Is there a way to do this. I ak because I am using a server version of sas that kicks me out whenever I click and drag a file from sas to my local drive to make a copy of it. I thought there might be a way to save it as a dat or sas file through proc export
 
If you want a SAS dataset onto a local drive there's a couple of ways to do it.

i) Create a libname where you want the dataset to go and then use a data step referencing that outputted libname.

ii) Use a Proc Append
 
From my understanding, you are trying to export a SAS dataset from SAS server to your local PC. You can easily do it if you have PC SAS installed on your machine and have SAS/CONNECT license. You can verify this by running

proc product_status;
run;

If you have SAS/CONNECT installed then use the following commands to connect to your server

%let mynode=<servername>
filename rlink "C:\Program Files\SAS\SASFoundation\9.2\connect\saslink\tcpunix.scr";
options comamid=tcp remote=mynode;
signon;

Then assign libname statements to your server and local drive as follows:

libname rmtsvr '<path>' server=mynode';
libname local '<path';

Then you can use PROC COPY or any other copy method to copy the datasets from remote to local and vice versa.

You can otherwise use the FTP tool like WinScp just to drag and drop files from remote to local and vice versa.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top