> hi,
>
> use fExist to check external file and if exists, use
> wBrowse command
>
> e.g.:
>
> dm "wbrowse 'c:\temp\aaaa.xls'";
>
> M.
This is not necessarily the best way.
FEXIST check's for the existence of an "external" file through a FILEREF. FILEEXIST checks for the existence of an external file, given the file's or directory's (folder's) name. To get a fileref, you have to have assigned the reference first, using a FILENAME statement or a FILENAME function. It would be more appropriate to use FILEEXIST before ever attempting to use FILENAME.
The FILE statement "opens" a file in a datastep.
FOPEN also opens a file, but why would you want to use this?