Chapter Contents |
Previous |
Next |
FILEEXIST |
Category: | External Files |
Syntax | |
Argument | |
Details | |
Examples | |
See Also |
Syntax |
FILEEXIST(file-name) |
Details |
FILEEXIST returns 1 if the external file exists and 0 if the external file does not exist. The specification of the physical name for file-name varies according to the operating environment.
Although your operating environment utilities may recognize partial physical filenames, you must always use fully qualified physical filenames with FILEEXIST.
Examples |
This example verifies the existence of an external file. If the file exists, FILEEXIST opens the file. If the file does not exist, FILEEXIST displays a message in the SAS log. Note that in a macro statement you do not enclose chara cter strings in quotation marks.
%if %sysfunc(fileexist(&myfilerf)) %then %let fid=%sysfunc(fopen(&myfilerf)); %else %put The external file &myfilerf does not exist.;
See Also |
Functions:
|
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.