<?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: Copying output .CSV file to Shared Drive in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314311#M68433</link>
    <description>I am clear now. Thank you so much&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
    <pubDate>Fri, 25 Nov 2016 14:44:50 GMT</pubDate>
    <dc:creator>Abhi1212</dc:creator>
    <dc:date>2016-11-25T14:44:50Z</dc:date>
    <item>
      <title>Copying output .CSV file to Shared Drive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/313814#M68244</link>
      <description>&lt;P&gt;Can anyone&amp;nbsp;help me in providing a code for copying output(.CSV) file into Shared drive through Base sas code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Abhi&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 15:40:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/313814#M68244</guid>
      <dc:creator>Abhi1212</dc:creator>
      <dc:date>2016-11-23T15:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Copying output .CSV file to Shared Drive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/313833#M68255</link>
      <description>&lt;PRE&gt;filename _bcin1 "C:\PATH\FILE.csv" recfm=n /* RECFM=N needed for a binary copy */;&lt;BR /&gt;filename _bcout1 "C:\NEWPATH\FILE.csv" recfm=n;&lt;BR /&gt;&lt;BR /&gt;data _null_;&lt;BR /&gt; length msg $ 384;&lt;BR /&gt; rc=fcopy('_bcin1', '_bcout1');&lt;BR /&gt; if rc=0 then&lt;BR /&gt; put 'Copied _bcin1 to _bcout1.';&lt;BR /&gt; else do;&lt;BR /&gt; msg=sysmsg();&lt;BR /&gt; put rc= msg=;&lt;BR /&gt; end;&lt;BR /&gt;run;&lt;BR /&gt; &lt;BR /&gt;filename _bcin1 clear;&lt;BR /&gt;filename _bcout1 clear;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 16:28:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/313833#M68255</guid>
      <dc:creator>TheShark</dc:creator>
      <dc:date>2016-11-23T16:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Copying output .CSV file to Shared Drive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/313834#M68256</link>
      <description>&lt;P&gt;You would use your operating system commands to copy files. &amp;nbsp;What these are depends on the OS SAS is installed on, and wether you have access to the paths and wether source and location are the same OS.&lt;/P&gt;
&lt;P&gt;If it was Windows then you could do:&lt;/P&gt;
&lt;P&gt;x 'copy "c:\originalfile.csv" "c:\newpath\originalfile.csv"';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why not just copy an dpaste it using Win Explorer. &amp;nbsp;You will of course have a procesdure for importing data and validating it, as part of the process you would save/copy the file. &amp;nbsp;Why does it need to be done in SAS?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2016 16:24:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/313834#M68256</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-11-23T16:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: Copying output .CSV file to Shared Drive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/313980#M68318</link>
      <description>Hi,&lt;BR /&gt;In SAS we have the logic written, that will generate an output file which&lt;BR /&gt;will be in .CSV format. We use to copy the file in a shared drive, then a&lt;BR /&gt;job runs.. as of now we are doing this manually. I neee to do this through&lt;BR /&gt;SAS code.. each and every time copying a file manually to a shared drive is&lt;BR /&gt;tiresome . And we do all these in SAS server.&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Thu, 24 Nov 2016 06:46:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/313980#M68318</guid>
      <dc:creator>Abhi1212</dc:creator>
      <dc:date>2016-11-24T06:46:50Z</dc:date>
    </item>
    <item>
      <title>Re: Copying output .CSV file to Shared Drive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314013#M68335</link>
      <description>&lt;P&gt;So why do you not just directyl write the file to the shared area:&lt;/P&gt;
&lt;P&gt;proc export outtfile="\\somewhere\shared\your_xl.xlsx"...&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 09:09:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314013#M68335</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-11-24T09:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Copying output .CSV file to Shared Drive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314027#M68343</link>
      <description>Proc export will work only within the sas server.&lt;BR /&gt;but to transfer those files we may use some unix commands. That's the re reason I am thinking how to do this within SAS code</description>
      <pubDate>Thu, 24 Nov 2016 09:40:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314027#M68343</guid>
      <dc:creator>Abhi1212</dc:creator>
      <dc:date>2016-11-24T09:40:07Z</dc:date>
    </item>
    <item>
      <title>Re: Copying output .CSV file to Shared Drive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314124#M68363</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;The code is not copying the file from SAS server to the local system(shared drive). Could you please brief me about the code and help me to fix the issue.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Nov 2016 15:53:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314124#M68363</guid>
      <dc:creator>Abhi1212</dc:creator>
      <dc:date>2016-11-24T15:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Copying output .CSV file to Shared Drive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314223#M68406</link>
      <description>Hi,&lt;BR /&gt;could you please help me in explaining me this code, as I am new to SAS I would like to understand what it does. Meanwhile, I tried your code. It doesn't work. Please help.&lt;BR /&gt;</description>
      <pubDate>Fri, 25 Nov 2016 07:36:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314223#M68406</guid>
      <dc:creator>Abhi1212</dc:creator>
      <dc:date>2016-11-25T07:36:47Z</dc:date>
    </item>
    <item>
      <title>Re: Copying output .CSV file to Shared Drive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314246#M68414</link>
      <description>&lt;P&gt;You haven't stated what the problem is. &amp;nbsp;You have some data in SAS, and you want to create a CSV file somewhere. &amp;nbsp;You do not need to copy this file, you just put the location of the final file in the proc export statement as I showed:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc export outtfile="\\somewhere\shared\your_csv.csv"...&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This wil work to any network area you have access to, and doesn't require anything further as CSV=Comma Separated Variable file which is plain text. &amp;nbsp;If of course you don't have access to the network area in your SAS session, then there is no method of getting the file to that location via SAS. &amp;nbsp;If you are having problems with network locations, then speak with your IT group about aquiring the correct permissions.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2016 09:24:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314246#M68414</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2016-11-25T09:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Copying output .CSV file to Shared Drive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314260#M68421</link>
      <description>&lt;P&gt;If you have access to the network share from your SAS server (mounted directory), just create the file there.&lt;/P&gt;
&lt;P&gt;If that is not the case, you will have to use another tool (ie SFTP) to copy the newly created file to that location. This requires a SSH server daemon on the file share server or on a machine that has the directory mounted. And of course XCMD enabled, if you want to do it from SAS.&lt;/P&gt;
&lt;P&gt;And to make it work seamlessly, you need to configure your SSH connection for public/private key authentication.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For further help, provide information&lt;/P&gt;
&lt;P&gt;- operating system(s) of all machines/hosts involved&lt;/P&gt;
&lt;P&gt;- is the network share available on your SAS server&lt;/P&gt;
&lt;P&gt;- is SSH present on a host that has the network share mounted (or on the file server itself)&lt;/P&gt;</description>
      <pubDate>Fri, 25 Nov 2016 10:12:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314260#M68421</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-11-25T10:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Copying output .CSV file to Shared Drive</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314311#M68433</link>
      <description>I am clear now. Thank you so much&lt;BR /&gt;&lt;BR /&gt;##- Please type your reply above this line. Simple formatting, no&lt;BR /&gt;attachments. -##</description>
      <pubDate>Fri, 25 Nov 2016 14:44:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Copying-output-CSV-file-to-Shared-Drive/m-p/314311#M68433</guid>
      <dc:creator>Abhi1212</dc:creator>
      <dc:date>2016-11-25T14:44:50Z</dc:date>
    </item>
  </channel>
</rss>

