Previous Page | Next Page

SAS Component Language Dictionary

FEXIST



Verifies the existence of the external file that is associated with the specified fileref
Category: External File

Syntax
Details
Example
See Also

Syntax

rc=FEXIST(fileref);

rc

contains the return code for the operation:

1

successful

0

not successful, or there was no logical assignment for the fileref

Type: Numeric

fileref

is the fileref that was assigned to the external file.

Type: Character


Details

You can use either the FILENAME statement or the FILENAME function in SCL to assign filerefs. Under some operating systems, you can also use system commands to assign filerefs. Use FILEEXIST to verify the existence of a file based on its physical name.


Example

Verify the existence of an external file for a fileref that the user enters in the field for the window variable FREF. A message informs the user whether the file exists.

 if (fexist(fref)) then
_msg_=
   'The file does exist.';
else
   _msg_=sysmsg();


See Also

EXIST

FILEEXIST

FILENAME

FILEREF

PATHNAME

Previous Page | Next Page | Top of Page