I can export the data into csv format with SAS provided export utility.
But when I run SAS export program with the same file location,
proc export data=sashelp.BASEBALL outfile="V:\jshi2\BASEBALL.csv" replace dbms=csv; run;
I got the error message below.
ERROR: Physical file does not exist, V:\jshi2\BASEBALL.csv. NOTE: The SAS System stopped processing this step because of errors. NOTE: There were 1 observations read from the data set SASHELP.BASEBALL. NOTE: DATA statement used (Total process time): real time 0.00 seconds cpu time 0.01 seconds
The question is how SAS export utility can find the location correctly, but not SAS programs.
Do I miss anything here?
Thanks in Advance.
Thanks. That makes sense.
The trick to solve this type of problem is to specify the whole IP address for mapped drivers / locations.
27 %let V=\\fmc9020101.fmc1.ford.com\proj\GRMOS\jshi2\;
28 %let filen=&V.class.csv;
29
30 proc export data=sashelp.class
31 file="&filen" replace
32 dbms=csv;
33 run;
---snipped---
NOTE: The file '\\fmc9020101.fmc1.ford.com\proj\GRMOS\jshi2\class.csv' is:
Filename=\\fmc9020101.fmc1.ford.com\proj\GRMOS\jshi2\class.csv,
RECFM=V,LRECL=32767,File Size (bytes)=0,
Last Modified=20Aug2021:10:27:07,
Create Time=20Aug2021:10:27:07
NOTE: 20 records were written to the file '\\fmc9020101.fmc1.ford.com\proj\GRMOS\jshi2\class.csv'.
The minimum record length was 17.
The maximum record length was 26.
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
19 records created in \\fmc9020101.fmc1.ford.com\proj\GRMOS\jshi2\class.csv from SASHELP.CLASS.
NOTE: "\\fmc9020101.fmc1.ford.com\proj\GRMOS\jshi2\class.csv" file was successfully created.
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.15 seconds
cpu time 0.07 seconds
We need more information: is sas running locally or on a server? If sas runs on a server: is V: visible from that server?
SAS runs on a different server. V: is visible through a 'menu' operation, such as 'open','save as', 'export'.
SAS EMBEDED export utility works fine.
When you submit code from Enterprise Guide to the remote SAS server (such as PROC EXPORT code), the code is running directly in Base SAS on the server. Therefore, the SAS server needs to have access to your file, whether you have mapped a drive on the SAS server (not the local PC), or uploaded it to the SAS server, etc. The Eguide import wizard works by creating a temporary copy of the file and uploading it to the SAS server before processing. If you use code and reference the actual file location, then the SAS server needs to be able to access that path and the file.
Thanks. That makes sense.
The trick to solve this type of problem is to specify the whole IP address for mapped drivers / locations.
27 %let V=\\fmc9020101.fmc1.ford.com\proj\GRMOS\jshi2\;
28 %let filen=&V.class.csv;
29
30 proc export data=sashelp.class
31 file="&filen" replace
32 dbms=csv;
33 run;
---snipped---
NOTE: The file '\\fmc9020101.fmc1.ford.com\proj\GRMOS\jshi2\class.csv' is:
Filename=\\fmc9020101.fmc1.ford.com\proj\GRMOS\jshi2\class.csv,
RECFM=V,LRECL=32767,File Size (bytes)=0,
Last Modified=20Aug2021:10:27:07,
Create Time=20Aug2021:10:27:07
NOTE: 20 records were written to the file '\\fmc9020101.fmc1.ford.com\proj\GRMOS\jshi2\class.csv'.
The minimum record length was 17.
The maximum record length was 26.
NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: DATA statement used (Total process time):
real time 0.01 seconds
cpu time 0.00 seconds
19 records created in \\fmc9020101.fmc1.ford.com\proj\GRMOS\jshi2\class.csv from SASHELP.CLASS.
NOTE: "\\fmc9020101.fmc1.ford.com\proj\GRMOS\jshi2\class.csv" file was successfully created.
NOTE: PROCEDURE EXPORT used (Total process time):
real time 0.15 seconds
cpu time 0.07 seconds
Please update your post as answered in that case.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.