SAS Component Language Dictionary |
Category: | External File |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
sysrc=FILEEXIST(filename); |
contains the return code for the operation:
1 | |
0 |
is the name that identifies the external file to the host operating system. The filename specification varies according to the operating system.
Details |
FILEEXIST verifies the existence of an external file, a directory, or a SAS data library.
Although your system utilities may recognize partial physical filenames, you must always use fully qualified physical filenames with FILEEXIST.
Example |
Verify the existence of an external file whose filename the user enters in the field for the window variable FNAME. Display a message on the message line to tell the user whether the file exists.
if (fileexist(fname)) then _msg_='The external file '||fname||' exists.'; else _msg_=sysmsg();
See Also |
Copyright © 2009 by SAS Institute Inc., Cary, NC, USA. All rights reserved.