SAS Component Language Dictionary |
Verifies the existence of the external file that is associated
with the specified fileref
-
rc
-
contains the return code for the operation:
1 |
successful |
0 |
not successful, or there was no logical assignment for the fileref |
Type:
Numeric
-
fileref
-
is the fileref that was assigned to the
external file.
Type: Character
You can use either the FILENAME statement or the FILENAME
function in SCL to assign filerefs. Under some operating systems, you can
also use system commands to assign filerefs. Use FILEEXIST to verify the existence
of a file based on its physical name.
Verify the existence of an external file for a fileref
that the user enters in the field for the window variable FREF. A message
informs the user whether the file exists.
if (fexist(fref)) then
_msg_=
'The file does exist.';
else
_msg_=sysmsg();
EXIST
FILEEXIST
FILENAME
FILEREF
PATHNAME
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.