Date: Thu, 21 Aug 1997 09:30:00 +0200
Reply-To: "Spruck, Dirk,DE,Centeon" <SPRUCK1@MSMBWME.HOECHST.COM>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: "Spruck, Dirk,DE,Centeon" <SPRUCK1@MSMBWME.HOECHST.COM>
Subject: Re: ODD MACRO QUESTION
Content-Type: text/plain; charset="us-ascii"
Ziqing,
This is a perfect example for using PROC SQL.
HTH
Dirk
data dset;
cmd= %nrstr("%macro test;");
output;
cmd= %nrstr("%let a=abc;");
output;
cmd= %nrstr("%put &a;");
output;
cmd= %nrstr("%mend test;");
output;
run;
proc sql noprint;
select cmd into : mcmd separated by " "
from dset;
quit;
&mcmd;
%test;
>----------------------------------------<
> Dirk Spruck <
> Biometrical Data Manager <
> Centeon Pharma GmbH, Marburg <
> Germany <
> E-Mail: SPRUCK1@MSMBWME.HOECHST.COM <
>----------------------------------------<
----------
From: ZPAN
To: SAS-L@UGA.CC.UGA.EDU
Subject: ODD MACRO QUESTION
Date: Tuesday, 19. August 1997 04:50
Hello,
I have a dataset as following, variable name is CMD.
SAS macro codes, as values of CMD,
are the observations, there are totally 4 observations.
What I want to do is to compile macro TEST without
creating a text file. CALL EXECUTE may help, but
I tried and failed.
Any help is much appreciated.
Ziqing Pan
cmd
------------------
%macro test;
%let a=abc;
%put &a;
%mend test;
|