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
Content-Type: multipart/alternative;
John Iwaniszek <JOHNI@QCHN.QUINTILES.COM> wrote in article
<12502268765034@reliant.usa.com>...
> 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
>
> Programmer
>
Hello John,
I tried this with success:
filename macrs 'c:\myappl\macros';
options sasautos=(macrs sasautos);
data _null_;
file macrs(test.sas);
put '%' 'macro test;';
put '%' 'put _all_;';
put '%' 'mend;';
run;
%test;
Bernd.Steinmetz@swisscom.com
[text/html]
|