SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 53914: Using the FILEREF and FEXIST functions with a FILENAME FTP data set in SAS® 9.4 might return incorrect values

DetailsHotfixAboutRate It

In SAS 9.4, when you access a file defined with the FILENAME statement using the FTP engine with the FILEREF and FEXIST functions, they might return incorrect results. The problem occurs if the data set being accessed is a TAPE data set or if the file generates a 4xx or 5xx message from the FTP server.

For example, if you specify the DEBUG option in the FILENAME statement using the FTP engine, as shown in the following code:

filename intape ftp "'remote.tape.dataset'" user=userid pass=password 
    host=hostname  debug;  
data _null_;
  %put fexist=%sysfunc(fexist(intape));    
  %put fileref=%sysfunc(fileref(intape));  
RUN;

This note appears in your SAS log and the function results are incorrect.

NOTE: <<< 450 Data set remote.tape.dataset is allocated to another job and is unavailable for RETR command.

In this scenario, the FEXIST function returns a value of 0 instead of 1. This value incorrectly indicates that the file does not exist when it does.

The FILEREF function returns a value of -20006 instead of the correct value of 0.

Click the Hot Fix tab in this note to access the hot fix for this issue.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemBase SASz/OS9.4 TS1M09.4 TS1M3
Z649.4 TS1M09.4 TS1M3
Microsoft® Windows® for 64-Bit Itanium-based Systems9.4 TS1M0
Microsoft® Windows® for x649.4 TS1M09.4 TS1M3
Microsoft Windows 8 Enterprise x649.4 TS1M09.4 TS1M3
Microsoft Windows 8 Pro x649.4 TS1M09.4 TS1M3
Microsoft Windows 8.1 Enterprise 32-bit9.4 TS1M09.4 TS1M3
Microsoft Windows 8.1 Enterprise x649.4 TS1M09.4 TS1M3
Microsoft Windows 8.1 Pro9.4 TS1M09.4 TS1M3
Microsoft Windows 8.1 Pro 32-bit9.4 TS1M09.4 TS1M3
Microsoft Windows Server 2008 R29.4 TS1M09.4 TS1M3
Microsoft Windows Server 2008 for x649.4 TS1M09.4 TS1M3
Microsoft Windows Server 2012 Datacenter9.4 TS1M09.4 TS1M3
Microsoft Windows Server 2012 R2 Datacenter9.4 TS1M09.4 TS1M3
Microsoft Windows Server 2012 R2 Std9.4 TS1M09.4 TS1M3
Microsoft Windows Server 2012 Std9.4 TS1M09.4 TS1M3
Windows 7 Enterprise x649.4 TS1M09.4 TS1M3
Windows 7 Professional x649.4 TS1M09.4 TS1M3
64-bit Enabled AIX9.4 TS1M09.4 TS1M3
64-bit Enabled HP-UX9.4 TS1M09.4 TS1M3
64-bit Enabled Solaris9.4 TS1M09.4 TS1M3
HP-UX IPF9.4 TS1M09.4 TS1M3
Linux for x649.4 TS1M09.4 TS1M3
Solaris for x649.4 TS1M09.4 TS1M3
* 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.