<?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: Upload csv file to ftp site in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Upload-csv-file-to-ftp-site/m-p/370496#M88480</link>
    <description>&lt;P&gt;Try a redirection of stderr to stdout:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename doftp pipe "ftp -n &amp;amp;EDWGW &amp;lt; /sas/batch/sascode/models/ftp/ftp.cmd 2&amp;gt;&amp;amp;1";
data _null_;
infile doftp;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then look what you get in the log when you force an out-of-space condition. This might enable you to scan for the relevant text snippet and do a conditional abort abend or the like.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jun 2017 12:03:00 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2017-06-26T12:03:00Z</dc:date>
    <item>
      <title>Upload csv file to ftp site</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Upload-csv-file-to-ftp-site/m-p/370493#M88478</link>
      <description>&lt;P&gt;Hi All&lt;/P&gt;&lt;P&gt;We have a batch process that uploads a number of files from a Unix server to an ftp site. Recently the ftp site (which is a windows server), ran out of space during the process and around 10 files were not ftp-ed. Our problem is that it is not logged as a failure in SAS, and therefore we had no visibility of the problem. Is there an option that should be added to the code below to cause failure?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;Code submitted:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;filename ftpcmds "/sas/batch/sascode/models/ftp/ftp.cmd";&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;file ftpcmds pad lrecl=80;&lt;BR /&gt;put "user &amp;amp;sasbatchuser &amp;amp;sasbatchpass";&lt;BR /&gt;put "ascii";&lt;BR /&gt;put "lcd /sas/batch/sascode/models/export";&lt;BR /&gt;put "cd SAS_IMPORT";&lt;BR /&gt;put "put model_&amp;amp;model_id._&amp;amp;output_date..csv";&lt;BR /&gt;put "bye";&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;filename doftp pipe "ftp -n &amp;amp;EDWGW &amp;lt; /sas/batch/sascode/models/ftp/ftp.cmd";&lt;BR /&gt;data _null_;&lt;BR /&gt;infile doftp;&lt;BR /&gt;input;&lt;BR /&gt;put _infile_;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;SAS log:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;SYMBOLGEN: Macro variable EDWGW resolves to prd-edwgw01&lt;BR /&gt;MPRINT(APPLY_MODEL): filename doftp pipe "ftp -n prd-edwgw01 &amp;lt;&lt;BR /&gt;/sas/batch/sascode/models/ftp/ftp.cmd";&lt;BR /&gt;MPRINT(APPLY_MODEL): data _null_;&lt;BR /&gt;MPRINT(APPLY_MODEL): infile doftp;&lt;BR /&gt;MPRINT(APPLY_MODEL): input;&lt;BR /&gt;MPRINT(APPLY_MODEL): put _infile_;&lt;BR /&gt;MPRINT(APPLY_MODEL): run;&lt;/P&gt;&lt;P&gt;NOTE: The infile DOFTP is:&lt;BR /&gt;Pipe command="ftp -n prd-edwgw01 &amp;lt; /sas/batch/sascode/models/ftp/ftp.cmd"&lt;/P&gt;&lt;P&gt;Local directory now /sas/batch/sascode/models/export&lt;BR /&gt;There is not enough space on the disk.&lt;BR /&gt;Command not understood.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 11:42:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Upload-csv-file-to-ftp-site/m-p/370493#M88478</guid>
      <dc:creator>HeidiDT</dc:creator>
      <dc:date>2017-06-26T11:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: Upload csv file to ftp site</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Upload-csv-file-to-ftp-site/m-p/370496#M88480</link>
      <description>&lt;P&gt;Try a redirection of stderr to stdout:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;filename doftp pipe "ftp -n &amp;amp;EDWGW &amp;lt; /sas/batch/sascode/models/ftp/ftp.cmd 2&amp;gt;&amp;amp;1";
data _null_;
infile doftp;
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and then look what you get in the log when you force an out-of-space condition. This might enable you to scan for the relevant text snippet and do a conditional abort abend or the like.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 12:03:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Upload-csv-file-to-ftp-site/m-p/370496#M88480</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-06-26T12:03:00Z</dc:date>
    </item>
    <item>
      <title>Re: Upload csv file to ftp site</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Upload-csv-file-to-ftp-site/m-p/370502#M88483</link>
      <description>&lt;P&gt;PS if the files were originally written from SAS, you might consider to use filename ftp and write the files directly to the FTP server. That way, SAS will catch the disk full condition.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 12:05:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Upload-csv-file-to-ftp-site/m-p/370502#M88483</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-06-26T12:05:00Z</dc:date>
    </item>
    <item>
      <title>Re: Upload csv file to ftp site</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Upload-csv-file-to-ftp-site/m-p/370506#M88484</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;! Busy trying that out as we speak &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 12:31:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Upload-csv-file-to-ftp-site/m-p/370506#M88484</guid>
      <dc:creator>HeidiDT</dc:creator>
      <dc:date>2017-06-26T12:31:22Z</dc:date>
    </item>
  </channel>
</rss>

