Date: Fri, 20 Jun 2003 12:40:12 -0600
Reply-To: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Jack Hamilton <JackHamilton@FIRSTHEALTH.COM>
Subject: Re: %include versus SAS Autocall Facility
Content-Type: text/plain; charset=us-ascii
On at least some systems, you can achieve a similar effect with
%include. Define your directories with a FILENAME statement, then use
the member form of the %INCLUDE statement. For example (untested
code):
filename includes ('~metrics/testincludes'
'~metrics/prodincludes');
%include includes(memname);
To change the include libraries, you would change only the definition
of the INCLUDES filename. The autocall library doesn't really have an
advantage here.
--
JackHamilton@FirstHealth.com
Manager, Technical Development
Metrics Department, First Health
West Sacramento, California USA
>>> <diskin.dennis@KENDLE.COM> 06/20/2003 7:02 AM >>>
Jennifer,
The major reason I would give for use of the autocall facility is the
ease
of having using different versions of the macros by concatenating the
autocall libraries (usually during development or revision testing)
without altering the code except for one OPTIONS statement. To
acomplish
the same thing with %include you would have to manually alter the code
in
every program using the macro and then change it back when the macro
was
moved into production.
FWIW,
Dennis Diskin
"Jennifer R. Holdcraft" <jrholdcraft@AEP.COM>
Sent by: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
06/20/2003 09:26 AM
Please respond to jrholdcraft
To: SAS-L@LISTSERV.UGA.EDU
cc:
Subject: %include versus SAS Autocall Facility
SAS-Ler's
I'm looking for some advice on the use of %include vs. autocall
libraries.
I'm currently involved in a project where a co-worker and I are having
recurring disagreements over the whether to use
the SAS autocall facility or %includes in our program development. I
want the former, he the latter.
I've done some information searches and one of the main disadvantages
to
%include that I've seen mentioned is the
maintaining of the the filerefs that point to the macro files. In our
case, however, there would still just be one macro
library (with the files named the same as the macro within them) and
the
fileref would be established in the autoexec
just as the establishment of the autocall library - so this isn't a
major
problem (as he is quick to point out). The other
issue is efficiency - because the macros will be compiled for each
%include, whereas with autocall only when the
macro is first called and not after that. However, in our situation
we
have such a large process that we are running
the programs in parallel in separate SAS sessions, so the macros have
to
be compiled in each session - whether through
%include or when first called. So in our particular case the only
real
advantage would be when macros are called
conditionally - the %include would compile no matter what, whereas
with
autocall only if the condition was met and
the macro actually called. We don't have too many of these cases
though,
so the savings in terms of efficiency thorugh
autocall would be minimal.
My co-workers main reason for wanting the %include is that he says it
is
nice for documentation purposes, because
at the top of the program you have all of the %includes and it makes
it
clear exactly which macros are going to be used
in that segment of the processing. My point is that we have a header
in
all of the program files that lists the macros that are
called, but he doesn't like that - he says that method allows someone
to
be lazy and there is no guarantee they will keep it
updated, whereas you MUST keep the %includes updated or the code just
won't run. I don't think that's a good enough
reason - %include's aren't meant for documentation purposes in the
first
place (correct me if i'm wrong), and I believe he
is just used to having them and wants things his way. He claims that
using the autocall facility is lazy and in bad form.
I'm obviously hoping for more reasons to support the use of autocall,
but
if there are valid reasons for doing it the other
way, that's fine and I'd like to hear them too.
Thanks in advance for you help!
Jennifer R. Holdcraft
AEP Market Risk Oversight
614-583-6761
Audinet 220-6761
jrholdcraft@aep.com