f



Re: Include SAS code w/o including SAS code #6

Good Don. I should have remembered that trick from SGF. One minor issue, it
doesn't preserve formatting. Other than doing the string split myself, any
suggestions?

Alan

Alan Churchill
Savian
www.savian.net


-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Don
Henderson
Sent: Tuesday, August 12, 2008 7:37 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: FW: Include SAS code w/o including SAS code

resending as I did not mean to send to just Andre

----------------------------------------
> From: donaldjhenderson@hotmail.com
> To: wielki@ined.fr
> Subject: RE: Include SAS code w/o including SAS code
> Date: Tue, 12 Aug 2008 13:34:41 +0000
>
>
> Alan,
>
> If you want the generated SAS code try (untested):
>
> data _null_;
>  file "code.sas";
>  length code $32000;
>  code = resolve('%xyz');
>  put code;
> run;
>
> You may want to format it (e.g., new line whenever you start a new
statement).
>
> HTH,
> donh
>
> ----------------------------------------
>> Date: Tue, 12 Aug 2008 14:52:02 +0200
>> From: wielki@INED.FR
>> Subject: Re: Include SAS code w/o including SAS code
>> To: SAS-L@LISTSERV.UGA.EDU
>>
>> Alan,
>> not precisely clear what you are searching
>> think thus also about this kind of program
>> in addition to the mprint mfile answer of  ~data _null_
>> HTH
>> Andre
>>
>> libname malibmac "d:\temp";
>> options mstores sasmstore=malibmac;
>> %macro foobar(aarg)/store source des='nothing or interresting';
>> %put arg=&arg;
>> %mend;
>> %copy foobar/source;
>>
>>
>>
>> Alan Churchill a �crit :
>>> All,
>>>
>>>
>>>
>>> Ok, I think this might be doable but I am drawing a blank.
>>>
>>>
>>>
>>> Suppose I have this code:
>>>
>>>
>>>
>>> %macro xyz;
>>>
>>>    data temp.temp4;
>>>
>>>    .do some sas stuff.
>>>
>>>   run;
>>>
>>> %mend;
>>>
>>>
>>>
>>> Is there a way to write the macro statements out to a file? I can run
them
>>> but I would also like to save them outside of SAS.
>>>
>>> bname malibmac "d:\f\";
>>>
>>
>>> Thanks,
>>>
>>> Alan
>>>
>>>
>>>
>>> Alan Churchill
>>> Savian
>>>   www.savian.net
>>>
>>>
>>
>> --
>>    Andr� WIELKI
>>    INED (Institut National d'Etudes D�mographiques)
>>    Service Informatique
>>    133 Boulevard Davout      75980 Paris Cedex 20
>>    m�l : wielki@ined.fr      t�l :  33 (0) 1 56 06 21 54
>
> _________________________________________________________________
> Your PC, mobile phone, and online services work together like never
before.
> http://clk.atdmt.com/MRT/go/108587394/direct/01/

_________________________________________________________________
Your PC, mobile phone, and online services work together like never before.
http://clk.atdmt.com/MRT/go/108587394/direct/01/
0
savian001 (795)
8/12/2008 2:38:31 PM
comp.soft-sys.sas 142827 articles. 4 followers. Post Follow

0 Replies
1031 Views

Similar Articles

[PageSpeed] 1

Reply: