Search notes:

SAS programming, function fileexist

fileexist returns 0 if the specified file does not exist and 1 otherwise.
data _null_;

  doesFileExist = fileexist('/most/probably/does/not/exist.txt');
  put doesFileExist=; /* doesFileExist=0 */

  doesFileExist = fileexist(getOption('work'));
  put doesFileExist=; /* doesFileExist=1 */

run;
Github repository about-SAS, path: /programming/functions/fileexist.sas

See also

functions

Index