<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Copy data from SAS windows server to office 365 sharepoint in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Copy-data-from-SAS-windows-server-to-office-365-sharepoint/m-p/342554#M22679</link>
    <description>&lt;P&gt;Before using a system command from SAS, make sure that it performs correctly by running it from the commandline. Once that is made sure of, run it from SAS.&lt;/P&gt;
&lt;P&gt;If you can't get a commandline interface on the server, use this in SAS to get all system output into the SAS log:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd pipe "command 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This can give you a clue what's going wrong.&lt;/P&gt;</description>
    <pubDate>Mon, 20 Mar 2017 12:40:05 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-03-20T12:40:05Z</dc:date>
    <item>
      <title>Copy data from SAS windows server to office 365 sharepoint</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Copy-data-from-SAS-windows-server-to-office-365-sharepoint/m-p/342522#M22675</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My team currently have a script to copy output files from SAS windows server (using SAS Enterprise Guide) to a LAN shared network folder.&amp;nbsp;Below is the code that we used to copy all the files from a SAS folder to our office LAN shared folder.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%sysExec xcopy "M:\BAU\output_files\*.*" "\\w01g1bnkfps02x\disk_vol2\RSAN\BAU" /E;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, our office&amp;nbsp;is trying to decommissioned all LAN&amp;nbsp;folders and we are forced to migrate to an Office 365 Sharepoint. I tried replacing the target path to the UNC path of our O365 sharepoint as below. (Note: Our&amp;nbsp;SAS server admin mentioned that the Web Client Services in the SAS server is installed and enabled.)&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%sysExec xcopy "M:\BAU\output_files\*.*"
"\\myofc.sharepoint.com@SSL\DavWWWRoot\sites\DISK_VOL2\Doc\RSAN\BAU" /E;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;After executing there were no files copied in the sharepoint folder.&amp;nbsp;I tried&amp;nbsp;a simple export to check if I can copy 1&amp;nbsp;file in the Sharepoint folder. However I got an error "ERROR: Physical file does not exist, \\myofc.sharepoint.com@SSL\DavWWWRoot\sites\DISK_VOL2\Doc\RSAN\BAU\file1.csv."&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname mylib "M:\BAU\output_files";
proc export data=mylib.file1
outfile="\\myofc.sharepoint.com@SSL\DavWWWRoot\sites\DISK_VOL2\Doc\RSAN\BAU\file1.csv"
DBMS=CSV replace;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I also tried using the filename webdav code I found in a SAS documentation site, but it returned me an error "ERROR: No logical assign for filename WRITEIT.&amp;nbsp;ERROR: Error in the FILENAME statement."&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options set=sharepoint_comp_mode 1;
filename writeit webdav
   "https://myofc.sharepoint.com/sites/DISK_VOL2/Doc/RSAN/BAU/"
    dir user="&amp;lt;my ofc email addy&amp;gt;" pass=&amp;lt;password&amp;gt;;
    data _null_;
       file writeit(shoes);
       set sashelp.shoes;
       put region $25. product $14.;
    run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is there other way we can transfer files from a SAS window-based server to an Office 365 sharepoint? Our team's issue is the output files we generate every month is quite a lot and if we copy the files manually from SAS server to a local computer and from local computer to the Sharepoint folder, it will take a lot of time and effort to do it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance for any&amp;nbsp;help, suggestion and advice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Ben&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 10:24:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Copy-data-from-SAS-windows-server-to-office-365-sharepoint/m-p/342522#M22675</guid>
      <dc:creator>benparado</dc:creator>
      <dc:date>2017-03-20T10:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Copy data from SAS windows server to office 365 sharepoint</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Copy-data-from-SAS-windows-server-to-office-365-sharepoint/m-p/342554#M22679</link>
      <description>&lt;P&gt;Before using a system command from SAS, make sure that it performs correctly by running it from the commandline. Once that is made sure of, run it from SAS.&lt;/P&gt;
&lt;P&gt;If you can't get a commandline interface on the server, use this in SAS to get all system output into the SAS log:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename oscmd pipe "command 2&amp;gt;&amp;amp;1";

data _null_;
infile oscmd;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This can give you a clue what's going wrong.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Mar 2017 12:40:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Copy-data-from-SAS-windows-server-to-office-365-sharepoint/m-p/342554#M22679</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-03-20T12:40:05Z</dc:date>
    </item>
  </channel>
</rss>

