This is not a repost.
Basically I want to create a file on the server. I tried creating teh file on my C drive and it works fine. But how do I change the code to create a file on the server?
When I tried replacing C drive with the server address, it gives an error:
Physical file does not exist, C:\serveraddr\test.sa_2010_08_04.sas. I am not sure why it points to the C drive? I thought because I am tetsing on PC SAS , it must be pointing to C drive, so I used a ' rsubmit %dbcon' statement before and after, but it still did not work.
set mydata.schd end=eof;
file "C:/test.sa_&dt..sas" lrecl=2000;
A Windows server (I guess this is what you want) directory can be referenced like so:
I find the best way to get a server directory is to map to the server in Windows Explorer, locate the directory I want to reference, then copy the full path from the Explorer address line and paste it into the SAS LIBNAME. That way no typos!.
If you execute your code on the server then you must think from then disks must be addressed how the servers sees them.
c:\... would then just be a file on the local server disk - and you as a user shouldn't have write permission there.
Using a unc path \\serveraddress\..... is a way to access shared disks via the network. That's where you should store you stuff. There is a big chance that you'll also be able to map such a share on your PC and so access the server generated output directly via Windows Explorer on your PC.