From: Kenneth M. Lin on
I am investigating someone else's code and he had a line like

options macrogen symbolgen sasautos=("C:\dir1\dir2\src");

Unfortunately, I only copied his SAS programs and don't know what's in this
directory. My question is that since individual files are not specified,
does SAS just read in everything under that directory? I went through some
SAS manuals but couldn't locate a single example.

Also, what's wrong with %include statement since this way I know exactly
which files are being included?

From: RolandRB on
On May 4, 6:08 am, "Kenneth M. Lin" <kenneth_m_...(a)sbcglobal.net>
wrote:
> I am investigating someone else's code and he had a line like
>
> options macrogen symbolgen sasautos=("C:\dir1\dir2\src");
>
> Unfortunately, I only copied his SAS programs and don't know what's in this
> directory.  My question is that since individual files are not specified,
> does SAS just read in everything under that directory?  I went through some
> SAS manuals but couldn't locate a single example.
>
> Also, what's wrong with %include statement since this way I know exactly
> which files are being included?

Yes, SAS will use any macro in that directory. You don't have to
specifically %inc any files. SAS will use what is there so long as it
has been validly specified in the directory.
From: Patrick on
Using a %include statement for macro code means the macro will get
compiled every single time you call it.

Using SASAUTOS and the macro gets only for the first call compiled.
For all subsequent calls the compiled macro will be used (in the same
session).

Storing macros in a autocall library has the huge advantage that
everybody can use it without even having to know where the macros are
stored. It's a great way to provide system wide site specific macros
in a central place which are always available. And if you ever have to
change your file structure: Just modify SASAUTOS (i.e. in the
autoexec) and everything will work. Using %include and ALL programs
will have to be amended.
From: Kenneth M. Lin on


"RolandRB" <rolandberry(a)hotmail.com> wrote in message
news:d1ef20c6-a487-4053-8d0c-958bf195f1f4(a)r11g2000yqa.googlegroups.com...
> On May 4, 6:08 am, "Kenneth M. Lin" <kenneth_m_...(a)sbcglobal.net>
> wrote:
>> I am investigating someone else's code and he had a line like
>>
>> options macrogen symbolgen sasautos=("C:\dir1\dir2\src");
>>
>> Unfortunately, I only copied his SAS programs and don't know what's in
>> this
>> directory. My question is that since individual files are not specified,
>> does SAS just read in everything under that directory? I went through
>> some
>> SAS manuals but couldn't locate a single example.
>>
>> Also, what's wrong with %include statement since this way I know exactly
>> which files are being included?
>
> Yes, SAS will use any macro in that directory. You don't have to
> specifically %inc any files. SAS will use what is there so long as it
> has been validly specified in the directory.

Would these macros be pre-compiled and source codes not available in the
same directory?

From: Kenneth M. Lin on


"Patrick" <patrick.matter(a)gmx.ch> wrote in message
news:330c4294-2158-4ed5-accc-312ff3a5f344(a)6g2000prg.googlegroups.com...
> Using a %include statement for macro code means the macro will get
> compiled every single time you call it.
>
> Using SASAUTOS and the macro gets only for the first call compiled.
> For all subsequent calls the compiled macro will be used (in the same
> session).
>
> Storing macros in a autocall library has the huge advantage that
> everybody can use it without even having to know where the macros are
> stored. It's a great way to provide system wide site specific macros
> in a central place which are always available. And if you ever have to
> change your file structure: Just modify SASAUTOS (i.e. in the
> autoexec) and everything will work. Using %include and ALL programs
> will have to be amended.

I agree. Unfortunately, the original developer didn't document anything I
am really struggling to make sense out of what he has developed.