BookmarkSubscribeRSS Feed
mikehowellca
Calcite | Level 5

I'm trying to automate an export of a report created via "proc report" and/or a dataset created in SAS enterprise guide to a folder we've created as a data repository on SharePoint.  We had a firewall issue that has been been resolved so the SAS server and SharePoint server can talk to one another, but I'm still having trouble with the coding.

 

I've tried libname code, proc export, and using WebDAV but can't get it exactly right.  I've primarily used base SAS in my career and am relatively new to SAS EG so I'm certain this is "user error" and/or me being new.

 

Thanks,

4 REPLIES 4
ChrisHemedinger
Community Manager

Sometimes SharePoint sites can also be addressed as a network share.  For example:

 

http://mysite.company.com/dept/folder

 

Is the same as

 

\\mysite.company.com\dept\folder

 

That's how our SharePoint is configured here at SAS.  If that't the case for you, then it's a simple "Save As", "Export as a Step" or targeting your ODS file path with the proper path notation.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
mikehowellca
Calcite | Level 5

Thanks. I'm having general issues exporting anything via Enterprise Guide.  I used the ods excel tagset for years in Base SAS, but am having trouble even doing basic things in EG, to any location basically. 

 

We use EG to access data on our linux based SAS server, and every time I try to export anything to a non-sas server location, EG tries to force that location into my personal folder on the SAS server (see below).  I't tried it both with the mapped drive and by typing in the whole string.  mapped drive was shorter and more readable here.

 

proc export data=adhoc.claims_hold_bill_rpt_summary1

outfile="t:/IFP Recon Team/MikeH/SharePoint Data Tests/test.csv"

DBMS=CSV replace;

run;

 

ERROR: Physical file does not exist, /home/mhowel01/t:/IFP Recon Team/MikeH/SharePoint Data Tests/test.csv.

 

 

SASKiwi
PROC Star

This is normal behaviour for a SAS server that doesn't have network shares set up to directory locations that you need. Talk to your SAS administrator about setting these up as security changes are required. If you need to store stuff on other servers then you will need to reference them like:

 

\\ServerName\Folder1\Folder2 (if Windows) or use forward slashes if Linux.

ChrisHemedinger
Community Manager

The reason for this is that it's SAS writing the file, not EG...and it's writing the file on your Linux system, not your PC.

 

You might need to export the file to a location on Linux, and then download to a location on your PC (or on your local Windows network where your SharePoint site is).  You can use the Copy Files task (a custom task you can install) to accomplish that.

 

If you want to push the file directly to SharePoint from Linux, you need to use either a shared network location that you can address from Linux or use a SharePoint web service via WebDAV or PROC HTTP.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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
  • 4 replies
  • 9994 views
  • 0 likes
  • 3 in conversation