Desktop productivity for business analysts and programmers

How do I export to SharePoint from SAS Enterprise Guide using SAS code?

Reply
New Contributor
Posts: 2

How do I export to SharePoint from SAS Enterprise Guide using SAS code?

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,

Community Manager
Posts: 2,882

Re: How do I export to SharePoint from SAS Enterprise Guide using SAS code?

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.

New Contributor
Posts: 2

Re: How do I export to SharePoint from SAS Enterprise Guide using SAS code?

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.

 

 

Super User
Posts: 3,233

Re: How do I export to SharePoint from SAS Enterprise Guide using SAS code?

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.

Community Manager
Posts: 2,882

Re: How do I export to SharePoint from SAS Enterprise Guide using SAS code?

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.

Ask a Question
Discussion stats
  • 4 replies
  • 932 views
  • 0 likes
  • 3 in conversation