<?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: Sysfilrc returns 0 when we try filname FTP with a wrong password in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sysfilrc-returns-0-when-we-try-filname-FTP-with-a-wrong-password/m-p/39006#M7891</link>
    <description>My experience indicates that the FTP request doesn't really "happen" until you use it, like in a data step.  For example:&lt;BR /&gt;
72   filename tempone ftp "'abc.def.ghi'"&lt;BR /&gt;
73   host = 'MYHOST'&lt;BR /&gt;
74   user="XJOE"&lt;BR /&gt;
75   pass="&amp;amp;password"&lt;BR /&gt;
76   /*recfm = fb&lt;BR /&gt;
77   lrecl= 152*/&lt;BR /&gt;
78   debug ;&lt;BR /&gt;
79&lt;BR /&gt;
80   %put &amp;amp;sysfilrc;&lt;BR /&gt;
0&lt;BR /&gt;
81   data _null_;&lt;BR /&gt;
82     infile tempone;&lt;BR /&gt;
84     put _all_;&lt;BR /&gt;
85   run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: 220-FTPSERVE IBM FTP CS V1R11 at MYHOST.com, 12:31:58 on 2010-11-24.&lt;BR /&gt;
NOTE: &amp;lt;&amp;lt;&amp;lt; 220-FTPSERVE IBM FTP CS V1R11 at MYHOST.com, 12:31:58 on 2010-11-24.&lt;BR /&gt;
NOTE: &amp;lt;&amp;lt;&amp;lt; 220 Connection will close if idle for more than 480 minutes.&lt;BR /&gt;
NOTE: &amp;gt;&amp;gt;&amp;gt; USER XJOE&lt;BR /&gt;
NOTE: &amp;lt;&amp;lt;&amp;lt; 500-UX-FTPA616 Command rejected by Security Server&lt;BR /&gt;
NOTE: &amp;lt;&amp;lt;&amp;lt; 500 User Exit denies Userid '' from using Command 'USER'.&lt;BR /&gt;
ERROR: Invalid username..&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.18 seconds&lt;BR /&gt;
      cpu time            0.01 seconds</description>
    <pubDate>Wed, 24 Nov 2010 17:34:45 GMT</pubDate>
    <dc:creator>advoss</dc:creator>
    <dc:date>2010-11-24T17:34:45Z</dc:date>
    <item>
      <title>Sysfilrc returns 0 when we try filname FTP with a wrong password</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sysfilrc-returns-0-when-we-try-filname-FTP-with-a-wrong-password/m-p/39005#M7890</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I've been trying to do some error checking in my codes by using the automatic system variables like %syslibrc for the libname statement and %sysfilrc for the filename statements. But when I check the sysfilrc after a filename FTP statement with a wrong password to the FTP server, the value still remains 0. See the code below:&lt;BR /&gt;
&lt;BR /&gt;
filename tempone ftp "'%cmpres(aaa.bbb.ccc.dddd)'"&lt;BR /&gt;
host = 'FTP-SERVER'&lt;BR /&gt;
user="user_id"&lt;BR /&gt;
pass="wrong-pass"&lt;BR /&gt;
recfm = fb&lt;BR /&gt;
lrecl= 152&lt;BR /&gt;
debug ; &lt;BR /&gt;
&lt;BR /&gt;
%put &amp;amp;sysfilrc;&lt;BR /&gt;
&lt;BR /&gt;
The above code returns 0 for the sysfilrc.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Is there a way where I could capture the error code for this scenario (filename FTP with invalid password)?</description>
      <pubDate>Wed, 24 Nov 2010 08:26:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sysfilrc-returns-0-when-we-try-filname-FTP-with-a-wrong-password/m-p/39005#M7890</guid>
      <dc:creator>Pramod_R</dc:creator>
      <dc:date>2010-11-24T08:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sysfilrc returns 0 when we try filname FTP with a wrong password</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sysfilrc-returns-0-when-we-try-filname-FTP-with-a-wrong-password/m-p/39006#M7891</link>
      <description>My experience indicates that the FTP request doesn't really "happen" until you use it, like in a data step.  For example:&lt;BR /&gt;
72   filename tempone ftp "'abc.def.ghi'"&lt;BR /&gt;
73   host = 'MYHOST'&lt;BR /&gt;
74   user="XJOE"&lt;BR /&gt;
75   pass="&amp;amp;password"&lt;BR /&gt;
76   /*recfm = fb&lt;BR /&gt;
77   lrecl= 152*/&lt;BR /&gt;
78   debug ;&lt;BR /&gt;
79&lt;BR /&gt;
80   %put &amp;amp;sysfilrc;&lt;BR /&gt;
0&lt;BR /&gt;
81   data _null_;&lt;BR /&gt;
82     infile tempone;&lt;BR /&gt;
84     put _all_;&lt;BR /&gt;
85   run;&lt;BR /&gt;
&lt;BR /&gt;
NOTE: 220-FTPSERVE IBM FTP CS V1R11 at MYHOST.com, 12:31:58 on 2010-11-24.&lt;BR /&gt;
NOTE: &amp;lt;&amp;lt;&amp;lt; 220-FTPSERVE IBM FTP CS V1R11 at MYHOST.com, 12:31:58 on 2010-11-24.&lt;BR /&gt;
NOTE: &amp;lt;&amp;lt;&amp;lt; 220 Connection will close if idle for more than 480 minutes.&lt;BR /&gt;
NOTE: &amp;gt;&amp;gt;&amp;gt; USER XJOE&lt;BR /&gt;
NOTE: &amp;lt;&amp;lt;&amp;lt; 500-UX-FTPA616 Command rejected by Security Server&lt;BR /&gt;
NOTE: &amp;lt;&amp;lt;&amp;lt; 500 User Exit denies Userid '' from using Command 'USER'.&lt;BR /&gt;
ERROR: Invalid username..&lt;BR /&gt;
NOTE: The SAS System stopped processing this step because of errors.&lt;BR /&gt;
NOTE: DATA statement used (Total process time):&lt;BR /&gt;
      real time           0.18 seconds&lt;BR /&gt;
      cpu time            0.01 seconds</description>
      <pubDate>Wed, 24 Nov 2010 17:34:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sysfilrc-returns-0-when-we-try-filname-FTP-with-a-wrong-password/m-p/39006#M7891</guid>
      <dc:creator>advoss</dc:creator>
      <dc:date>2010-11-24T17:34:45Z</dc:date>
    </item>
  </channel>
</rss>

