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 08:56:12 -0400
Reply-To:     Huck <huck@FINN.NOSPAM.MOC>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Huck <huck@FINN.NOSPAM.MOC>
Organization: Posted via Supernews, http://www.supernews.com
Subject:      Re: use of %sysfunc(fileexist(&fname))
Content-Type: text/plain; charset=us-ascii

doesnt %include execute at sas-code-run time rather than macro-compilation time, so as such your %if is NOT inside the %macro like you think it is .

On Thu, 12 Jun 2003 15:03:40 +0300, "Arto Raiskio" <arto@raiskio.com> wrote:

> >"Richard A. DeVenezia" wrote >> %let wfname = 'c:\temp\program.sas'; >> filename itExist &wfname; >> %let rc = %sysfunc (fileref(itExist)); > >the primary reason for my question was to determine why specifically it was >difficult from an %include module to do the test as the first thing before >running a data step > ><pseudocode sample> ><macro> > <include module> > if the following file exists, do the data step, otherwise skip it > >thus, the idea was to >1. run some macro >2. include some code which would execute the data step only if file exists > >for now, I've resolved the problem by doing the file exists test in the >primary macro and that way the %include does not get executed unless file >exists >


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