Desktop productivity for business analysts and programmers

SAS Export table to SharePoint

Reply
Regular Contributor
Posts: 212

SAS Export table to SharePoint

Hi guys,

Today i'm trying to export some files to SharePoint.

 

PROC EXPORT DATA= SCHEDULE 
OUTFILE= "https://MySharePoint/Forms/text.txt" 
DBMS=TAB REPLACE;
RUN;

The code above, is the only way i've tried to export, But there is an error as follows:

 

ERROR: Physical file does not exist,

/sas/sas/config/Lev1/SASPApp/https://MySharePoint/Forms/text.txt

 

I need a way to export without installing any other SAS or Windows applications, because here it is quite limited access.

 

Just to specify:

 

  • I can't use system commands like in general UNIX commands in SAS Programs, neither windows commands
  • I can't install any other application
  • I've found this script:

 

filename request temp;
filename response "Path\output.xml";

data _null_;
   file request;
   input;
   put _infile_;
   datalines4;

<soapenv:Envelope xmlns:rep="http://www.sas.com/xml/schema/sas-svcs/reportrepository-9.2" 
                  xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header>
      <Action
xmlns="http://schemas.xmlsoap.org/ws/2004/08/addressing">
       http://www.sas.com/xml/schema/sas-svcs/reportrepository-9.2/DirectoryServiceInterface/isDirectory</Action>
  </soapenv:Header>
  <soapenv:Body>
     <rep:isDirectoryDirectoryServiceInterfaceRequest>
        <rep:dirPathUrl>SBIP:path-name</rep:dirPathUrl>
     </rep:isDirectoryDirectoryServiceInterfaceRequest>
  </soapenv:Body>
</soapenv:Envelope>
;;;;
run;

proc soap in=request out=response service="ReportRepositoryService"
soapaction="http://machine-name:port-number/SASWIPSoapServices/services/ReportRepositoryService"
                 envfile="http://file-server-name.abc.xyz.com/sas-environment.xml"
                 environment="test";
                 wssusername="user-name"
                 wsspassword="password";
run;

 

 

  • I don't know how to perfom it
  • I need to understand how it works

Most important, is this possible ?

If so, How ?

 

Thanks before anything

Super User
Super User
Posts: 6,317

Re: SAS Export table to SharePoint

The only way that I have found to move files from Unix host (which from your error message it looks like you are using) to SharePoint is to use curl.  http://stackoverflow.com/questions/28341625/performing-multiple-requests-using-curl-with-different-o...

But if you cannot call system commands then you might not be able to do that.

 

The attempt you posted looks like it is attempting to connect to some SAS service rather than a SharePoint service.  Do you have a SAS interface to SharePoint that you can use to write to SharePoint?

Regular Contributor
Posts: 212

Re: SAS Export table to SharePoint

SAS Web Parts ? No i do not have any other web based applications.

 

 

Respected Advisor
Posts: 3,060

Re: SAS Export table to SharePoint

This SAS Note may help point you in the right direction:

 

http://support.sas.com/kb/42/054.html

 

Your Sharepoint admin should be able to provide a UNC path.

Valued Guide
Posts: 3,206

Re: SAS Export table to SharePoint

FILENAME Statement, WebDAV Access Method   and/or  http://www.sas.com/content/dam/SAS/en_ca/User%20Group%20Presentations/Winnipeg-User-Group/HarryDroog...

 

The error message:

ERROR: Physical file does not exist,

/sas/sas/config/Lev1/SASPApp/https://MySharePoint/​Forms/text.txt

is caused by a wrong current directory. It is failure of SAS having it let that way. http://support.sas.com/kb/50/345.html Ask your admin to correct that. And when he is not that obstinate aks for the risks of xcmd. When not: " bla bla ", have that granted for you.

 

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 4 replies
  • 434 views
  • 0 likes
  • 4 in conversation