BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
as_sas
Fluorite | Level 6

I can export the data into csv format with SAS provided export utility. 

 

as_sas_0-1629427454133.png

 

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.

1 ACCEPTED SOLUTION

Accepted Solutions
as_sas
Fluorite | Level 6

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
      

 

 

View solution in original post

5 REPLIES 5
andreas_lds
Jade | Level 19

We need more information: is sas running locally or on a server? If sas runs on a server: is V: visible from that server?

as_sas
Fluorite | Level 6

as_sas_0-1629462773433.png

SAS runs on a different server. V: is visible through a 'menu' operation, such as 'open','save as', 'export'.

 

as_sas_1-1629463133370.png

SAS EMBEDED export utility works fine.

jebjur
SAS Employee

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.

as_sas
Fluorite | Level 6

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
      

 

 

SASKiwi
PROC Star

Please update your post as answered in that case.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 667 views
  • 0 likes
  • 4 in conversation