OK, now I get it. You don't know that you already have what you need.
In your example you say...
Suppose I have this code:
.do some sas stuff.
So you have it you don't need to get it you've already got it. The
formatting that you desire is right there, no problem.
If the macro is in aggregate storage location then you also "have it".
It is waiting be auto called, read with infile, or opened with an
If it is stored compiled and the source was saved you can look at the
source just as Andre suggested using %copy.
If calling the macro with RESOLVE returns gt 32767 characters what do
you do then?
You could read the compiled macro from the work.sasmacr. Limited
testing suggests that the formatting you desire is preserved in the
filename ft56f001 catalog 'work.sasmacr.<NAME>.macro';
On 8/12/08, Alan Churchill <email@example.com> wrote:
> I don't believe there is inconsistency in my statement. I don't want the log
> (run), just the statements. A macro is a macro so I can always run it if
> need be but the main gist is that I need the statements.
> I will just break the statements myself and do the formatting using Don's
> Thanks for the help,
> Alan Churchill
> -----Original Message-----
> From: ./ ADD NAME=Data _null_, [mailto:firstname.lastname@example.org]
> Sent: Tuesday, August 12, 2008 9:05 AM
> To: Alan Churchill
> Cc: SAS-L@listserv.uga.edu
> Subject: Re: Include SAS code w/o including SAS code
> You are not consistent. One time you say you don't want to execute
> the macro then you say you do.
> Question: Where is the "macro" when YOU begin to want it?
> Please describe your processing in complete detail.
> On 8/12/08, Alan Churchill <email@example.com> wrote:
> > I actually never want to store the macro code. I only want it available in
> > 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
> > 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.