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.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!
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.

SAS For Dummies 3rd Edition! Check out the new edition, covering SAS 9.4, SAS Viya, and all of the modern ways to use SAS!

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 11599 views
  • 0 likes
  • 3 in conversation