Date: Wed, 22 Oct 1997 13:35:39 GMT
Reply-To: Bernd Steinmetz <Bernd.Steinmetz@SWISSCOM.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Bernd Steinmetz <Bernd.Steinmetz@SWISSCOM.COM>
Organization: Unisource Business Networks
Subject: Re: compile macro from data set
John Iwaniszek <JOHNI@QCHN.QUINTILES.COM> wrote in article
> I would like to construct a macro within a data step and have the macro
> available to later parts of the program. Constructing the macro syntax
> in a data step is trivial. What I can't think of is a convenient way to
> make the macro a part of the program.
> I guess I should define the term 'convenient' since it is a word loaded
> with subjective meaning. By 'convenient' I mean without creating a text
> file to later %include.
> Thank you very much for any help afforded.
> John Iwaniszek
I tried this with success:
filename macrs 'c:\myappl\macros';
options sasautos=(macrs sasautos);
put '%' 'macro test;';
put '%' 'put _all_;';
put '%' 'mend;';