*
;
/*
Subject: Re: Existance of a file
Date: Fri, 12 Jul 1996 19:42:51
From: DZepp1@gnn.com (David H. Zepp)
Organization: GNN
Newsgroups: comp.soft-sys.sas
To All,
For those of you who are running SAS 6.11 you may want to try a messing
with this macro ( set flags or whatever) that uses the new enhancements....
====> Running SAS 6.11 on Windoze95
-David Zepp
Example:
%chk_file(c:\windows\desktop\report1.sas);
******** LOG ***********
MLOGIC(CHK_FILE): Beginning execution.
MLOGIC(CHK_FILE): Parameter FNAME has value c:\windows\desktop\report1.sas
SYMBOLGEN: Macro variable FNAME resolves to c:\windows\desktop\report1.sas
MLOGIC(CHK_FILE): %IF condition %sysfunc(fileexist(&fname)) is TRUE
MLOGIC(CHK_FILE): %PUT The file &FNAME exits.
SYMBOLGEN: Macro variable FNAME resolves to c:\windows\desktop\report1.sas
The file c:\windows\desktop\report1.sas exits.
MLOGIC(CHK_FILE): Ending execution.
*/
%macro chk_file(fname);
%if %sysfunc(fileexist(&fname)) %then
%put The file &FNAME exits.;
%else
%put %sysfunc(sysmsg());
%mend;
*;