<?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: How to copy a .txt file from one host to another host through sas code without any change in the .txt file's format ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-copy-a-txt-file-from-one-host-to-another-host-through-sas/m-p/157919#M299220</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have a look at this blog entry &lt;A href="http://blogs.sas.com/content/sasdummy/2013/09/17/copy-file-macro/" title="http://blogs.sas.com/content/sasdummy/2013/09/17/copy-file-macro/"&gt; Copy a file using a SAS program: another method - The SAS Dummy&lt;/A&gt; by Chris Hemedinger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jun 2014 10:37:50 GMT</pubDate>
    <dc:creator>BrunoMueller</dc:creator>
    <dc:date>2014-06-27T10:37:50Z</dc:date>
    <item>
      <title>How to copy a .txt file from one host to another host through sas code without any change in the .txt file's format ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-copy-a-txt-file-from-one-host-to-another-host-through-sas/m-p/157916#M299217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here i am trying to copy a .txt file from one server to another&amp;nbsp; ftp server.But when I copy the file, I am getting the records in each&amp;nbsp; new line.But i want the records to be in the same line upto the line size of 1024 as they were in the original file.&lt;BR /&gt;I have attached the original(before_copy.txt) and copied file(after_copy.txt),which is same before_copy.txt after getting copied to ftp site.I have renamed it for your reference.&lt;/P&gt;&lt;P&gt;the code which i have used to copy the file is as follows:-&lt;/P&gt;&lt;P&gt;filename indir '/Shared/ABC/';&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;filename outdir ftp dir host='****'&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; user='***' pass="***" ;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; infile indir(before_copy.txt)&amp;nbsp; lrecl=1024 ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; input;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; file outdir(before_copy.txt)&amp;nbsp; lrecl=1024 ;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; put _infile_;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;Kinly let me know which option i need to use to copy the file as it was in the original one.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 04:52:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-copy-a-txt-file-from-one-host-to-another-host-through-sas/m-p/157916#M299217</guid>
      <dc:creator>naziya</dc:creator>
      <dc:date>2014-06-27T04:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy a .txt file from one host to another host through sas code without any change in the .txt file's format ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-copy-a-txt-file-from-one-host-to-another-host-through-sas/m-p/157917#M299218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The files look to be in UNIX format (no CR/LF, only LF as line separator). But before_copy has 2 '0D'x characters, which are considered unwanted artifacts in UNIX text files and get stripped out by the FTP engine(s), most probably not SAS. You also have one empty line (2 '0A'x in succession) where SAS probably skips the line (missover default option).&lt;/P&gt;&lt;P&gt;Bottom line: if you need an _exact_ copy, use command line ftp/sftp and specify binary mode.&lt;/P&gt;&lt;P&gt;Or try the recfm=n option in SAS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 05:52:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-copy-a-txt-file-from-one-host-to-another-host-through-sas/m-p/157917#M299218</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2014-06-27T05:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy a .txt file from one host to another host through sas code without any change in the .txt file's format ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-copy-a-txt-file-from-one-host-to-another-host-through-sas/m-p/157918#M299219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi from sas we can COPY, PASTE, CUT and DELETE the raw datafiles using X - Statement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex:-&amp;nbsp; X 'COPY "Path exist folder\test.txt" "Defined folder\out.txt"';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; X MOVE "Path exist folder\test.txt" "Defined folder\out.txt"';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 07:37:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-copy-a-txt-file-from-one-host-to-another-host-through-sas/m-p/157918#M299219</guid>
      <dc:creator>sas_lak</dc:creator>
      <dc:date>2014-06-27T07:37:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to copy a .txt file from one host to another host through sas code without any change in the .txt file's format ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-copy-a-txt-file-from-one-host-to-another-host-through-sas/m-p/157919#M299220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have a look at this blog entry &lt;A href="http://blogs.sas.com/content/sasdummy/2013/09/17/copy-file-macro/" title="http://blogs.sas.com/content/sasdummy/2013/09/17/copy-file-macro/"&gt; Copy a file using a SAS program: another method - The SAS Dummy&lt;/A&gt; by Chris Hemedinger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 10:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-copy-a-txt-file-from-one-host-to-another-host-through-sas/m-p/157919#M299220</guid>
      <dc:creator>BrunoMueller</dc:creator>
      <dc:date>2014-06-27T10:37:50Z</dc:date>
    </item>
  </channel>
</rss>

