<?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: FTP text file SAS to FTP server without filename statement in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/FTP-text-file-SAS-to-FTP-server-without-filename-statement/m-p/423080#M280913</link>
    <description>&lt;P&gt;Why are you transmitting a TEXT file as binary, byte-by-byte? Text files should be handled line-by-line.&lt;/P&gt;
&lt;P&gt;No miracle that your SAS FTP is taking forever.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although I concur that copying non-SAS data to non-SAS data is handled best from the commandline, if you need it controlled from SAS, use the filename pipe method to call the external command.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Dec 2017 12:57:54 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-12-21T12:57:54Z</dc:date>
    <item>
      <title>FTP text file SAS to FTP server without filename statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FTP-text-file-SAS-to-FTP-server-without-filename-statement/m-p/422965#M280911</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the method below to move&amp;nbsp;text file sas server to ftp server. It ony takes 3 minute when i use ftp method in shell, but it takes 2 hour to&amp;nbsp;move it with sas method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think it occurs because sas open txt file and move line by line. And file size almost 2 gb..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How i move txt file as batch and save time in ftp method?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sas method:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;%macro ftp_data(sasData);&lt;BR /&gt;filename server ftp "/ftp/directory/&amp;amp;sasData..TXT" host="XX.XXX.X.XX"&lt;BR /&gt;user="user" pass="pass" ;&lt;BR /&gt;data _null_;&lt;BR /&gt;infile "/work/&amp;amp;sasData..TXT" recfm=n ;&lt;BR /&gt;input x $char1. @@;&lt;BR /&gt;file server recfm=s ;&lt;BR /&gt;put x $char1. @@;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ftp method:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;/usr/bin/ftp -inv &amp;lt;&amp;lt;!&lt;BR /&gt;open $FTP_HOST_NAME&lt;BR /&gt;passive&lt;BR /&gt;user $FTP_LOGIN $FTP_PASSWORD&lt;BR /&gt;cd ftp01/&lt;SPAN&gt;directory&lt;/SPAN&gt;/&lt;BR /&gt;put $file&lt;BR /&gt;quit&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 07:07:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FTP-text-file-SAS-to-FTP-server-without-filename-statement/m-p/422965#M280911</guid>
      <dc:creator>semihascioglu</dc:creator>
      <dc:date>2017-12-21T07:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: FTP text file SAS to FTP server without filename statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FTP-text-file-SAS-to-FTP-server-without-filename-statement/m-p/422977#M280912</link>
      <description>You already found the best solution: don't use sas code, but bash/cmd to transfer files. If you can execute os-commands in your sas-session, you can invoke cmd with the ftp-conmand directly. See the docs of X command.</description>
      <pubDate>Thu, 21 Dec 2017 08:01:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FTP-text-file-SAS-to-FTP-server-without-filename-statement/m-p/422977#M280912</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2017-12-21T08:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: FTP text file SAS to FTP server without filename statement</title>
      <link>https://communities.sas.com/t5/SAS-Programming/FTP-text-file-SAS-to-FTP-server-without-filename-statement/m-p/423080#M280913</link>
      <description>&lt;P&gt;Why are you transmitting a TEXT file as binary, byte-by-byte? Text files should be handled line-by-line.&lt;/P&gt;
&lt;P&gt;No miracle that your SAS FTP is taking forever.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Although I concur that copying non-SAS data to non-SAS data is handled best from the commandline, if you need it controlled from SAS, use the filename pipe method to call the external command.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2017 12:57:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/FTP-text-file-SAS-to-FTP-server-without-filename-statement/m-p/423080#M280913</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-12-21T12:57:54Z</dc:date>
    </item>
  </channel>
</rss>

