LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (June 2003, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Thu, 12 Jun 2003 02:58:34 +0300
Reply-To:   Arto Raiskio <arto@RAISKIO.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Arto Raiskio <arto@RAISKIO.COM>
Subject:   use of %sysfunc(fileexist(&fname))

in a macro module, I normally test for existence of the file on a network server:

%macro a;

%if %sysfunc(fileexist(&wfname)) %then %do; <lots of data step and proc operations>

%mend;.

this works fine and I only included it above to illustrate it's use

now, when I want to %include (%inc) a module, it will not permit me to use the syntax from inside another macro

for example

%macro b; <lots of operations> %inc <mypath> %mend;

if the included module contains as it's 1st line %if %sysfunc(fileexist(&wfname)) %then %do;

how else might I test for file existence in included modules? curiously the &wfname resolves fine, as in data a; infile &wfname ;


Back to: Top of message | Previous page | Main SAS-L page