FEXIST Function: Windows

Verifies the existence of an external file by its fileref.

Category: External Files
See: FEXIST Function in SAS Functions and CALL Routines: Reference
FILENAME Function in SAS Functions and CALL Routines: Reference

Syntax

FEXIST("fileref")

Required Argument

fileref

specifies the fileref that is assigned to an external file. Under Windows, fileref can also be an environment variable. If the function is used in a DATA step, the fileref or the environment variable that you specify must be enclosed in quotation marks. If the function is used in a macro, then the fileref must not be enclosed in quotation marks.

Details

FEXIST returns a value of 1 if the external file that is associated with fileref exists, and 0 if the file does not exist.

Example

For an example of using the FINFO function, see Obtaining Directory Information.