f



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

I actually never want to store the macro code. I only want it available in a
temp file which I then consume. For example:

%macro xyz;
   data temp.temp4;
   ...do some sas stuff...
  run;
%mend;


I want to save the contents, formatted, into a text file (i.e.
c:\temp\program.sas) which I can then consume in another application. I also
want to execute the code. Hence:

%xyz;

Save the contents of the macro file to a text file with CRLF included. I
don't want the run, merely the statements.

Thoughts?

Alan

Alan Churchill
Savian
www.savian.net


-----Original Message-----
From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Fehd,
Ronald J. (CDC/CCHIS/NCPHI)
Sent: Tuesday, August 12, 2008 8:15 AM
To: SAS-L@LISTSERV.UGA.EDU
Subject: Re: Include SAS code w/o including SAS code

you want to save the macro code in its own file

access then depends on modifying one of the three uses of the word:
SASautos

Tutorials
A SASautos Companion: Reusing Macros

http://tinyurl.com/45nzzk for:

http://www2.sas.com/proceedings/sugi30/267-30.pdf


Ron Fehd  the macro maven  CDC Atlanta GA USA RJF2 at cdc dot gov


> -----Original Message-----
> From: Alan Churchill
> 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.
0
savian001 (795)
8/12/2008 2:41:35 PM
comp.soft-sys.sas 142827 articles. 4 followers. Post Follow

0 Replies
894 Views

Similar Articles

[PageSpeed] 25

Reply: