Usage Note 52779: The FEXIST function behavior for a file defined with the FTP engine has changed in SAS® 9.3
In SAS® 9.2, if you called the FEXIST function for a file defined with the FILENAME statement using the FTP engine, SAS did not always correctly indicate when the file did not exist.
If FTP returned a return code between 400 and 500, the FEXIST function indicated that the file existed when in reality it did not. In SAS 9.3, this has been fixed so that SAS correctly indicates that the file does not exist.
Here are some examples of messages that you might see in your SAS log from any release:
NOTE: <<< 451 Transfer aborted: send error
NOTE: <<< 426 Failure writing network stream
The following alternative code accurately determines whether a file accessed with the FTP FILENAME engine exists. This code runs under any operating system.
%let MVS_FTP=machine.domain1.company.com;
%let FTPUSER=user-ID;
%let FTPPASS=password;
%let FILE=physical-file-name;
FILENAME DLR_IN FTP '' LS
host="&MVS_FTP"
user="&FTPUSER"
pass="&FTPPASS" debug
;
data _null_;
infile DLR_IN;
input;
if _infile_="&FILE" then do;
call symput('RC',"FILE FOUND");
stop;
end;
else call symput('RC',"FILE NOT FOUND");
run;
%put &RC;
Note: When the remote host is z/OS and the first high-level qualifier (HLQ) of the
physical-file-name does not match the remote user-ID, you will need to use CD=
to change from the default current working directory path (user-ID) to the first
HLQ of the physical-file-name.
Operating System and Release Information
| SAS System | N/A | z/OS | 9.2 TS2M3 | |
| Microsoft Windows Server 2003 for x64 | 9.2 TS2M3 | |
| Microsoft Windows Server 2008 for x64 | 9.2 TS2M3 | |
| Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.2 TS2M3 | |
| Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.2 TS2M3 | |
| Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.2 TS2M3 | |
| Microsoft Windows XP 64-bit Edition | 9.2 TS2M3 | |
| Microsoft® Windows® for x64 | 9.2 TS2M3 | |
| Microsoft Windows Server 2003 Datacenter Edition | 9.2 TS2M3 | |
| Microsoft Windows Server 2003 Enterprise Edition | 9.2 TS2M3 | |
| Microsoft Windows Server 2003 Standard Edition | 9.2 TS2M3 | |
| Microsoft Windows Server 2008 | 9.2 TS2M3 | |
| Microsoft Windows Server 2008 R2 | 9.2 TS2M3 | |
| Microsoft Windows XP Professional | 9.2 TS2M3 | |
| Windows 7 Enterprise 32 bit | 9.2 TS2M3 | |
| Windows 7 Enterprise x64 | 9.2 TS2M3 | |
| Windows 7 Home Premium 32 bit | 9.2 TS2M3 | |
| Windows 7 Home Premium x64 | 9.2 TS2M3 | |
| Windows 7 Professional 32 bit | 9.2 TS2M3 | |
| Windows 7 Professional x64 | 9.2 TS2M3 | |
| Windows 7 Ultimate 32 bit | 9.2 TS2M3 | |
| Windows 7 Ultimate x64 | 9.2 TS2M3 | |
| Windows Vista | 9.2 TS2M3 | |
| Windows Vista for x64 | 9.2 TS2M3 | |
| 64-bit Enabled AIX | 9.2 TS2M3 | |
| 64-bit Enabled HP-UX | 9.2 TS2M3 | |
| 64-bit Enabled Solaris | 9.2 TS2M3 | |
| HP-UX | 9.2 TS2M3 | |
| HP-UX IPF | 9.2 TS2M3 | |
| Linux | 9.2 TS2M3 | |
| Linux for x64 | 9.2 TS2M3 | |
| Linux on Itanium | 9.2 TS2M3 | |
| OpenVMS on HP Integrity | 9.2 TS2M3 | |
| Solaris for x64 | 9.2 TS2M3 | |
| Tru64 UNIX | 9.2 TS2M3 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Usage Note |
| Priority: | medium |
| Date Modified: | 2014-08-12 11:11:57 |
| Date Created: | 2014-04-17 14:15:26 |