Chapter Contents |
Previous |
Next |
FILEEXIST |
Category: | External File |
Syntax | |
Details | |
Example | |
See Also |
Syntax |
sysrc=FILEEXIST(filename); |
1 | The external file exists. |
0 | The external file does not exist. |
Type: Numeric
Type: Character
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 |
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.