Date: Fri, 20 Jun 2003 11:23:33 -0400
Reply-To: Ian Whitlock <WHITLOI1@WESTAT.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Ian Whitlock <WHITLOI1@WESTAT.COM>
Subject: Re: %include versus SAS Autocall Facility
Content-Type: text/plain
Jennifer,
The %INCLUDE people want the convenience of knowing precisely where the code
is coming from by reading the program code. The autocall people view macros
as the building blocks of programs and want the convenience of setting up
the system to handle code management problems. Both have a good point.
This does suggest that SAS should provide a tool to document where a macro
comes from. My understanding is that in version 9.1 there will be an option
to get the source file listed on the log. It might also be nice to have a
macro function, say %DOC, that one could call in an executing macro to name
the local environment and source of the code to either the log or a macro
variable.
Personally, I am in the autocall camp, but given your description of the
situation, my advice would be to save your energy to make your stand on more
significant decisions.
IanWhitlock@westat.com
-----Original Message-----
From: Jennifer R. Holdcraft [mailto:jrholdcraft@AEP.COM]
Sent: Friday, June 20, 2003 9:27 AM
To: SAS-L@LISTSERV.UGA.EDU
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