Date: Wed, 23 Feb 2011 16:18:12 -0600
Reply-To: "Data _null_;" <iebupdte@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "Data _null_;" <iebupdte@GMAIL.COM>
Subject: Re: Forcing SAS to print macro line numbers in the log
In-Reply-To: <01384B2401936142AF5F65E3D1240278095CB70C@EX3VS1.nyced.org>
Content-Type: text/plain; charset=ISO-8859-1
I think you might be interested in looking into the
MFILE
routes output produced by the MPRINT option to an external file. This
option is useful for debugging.
I have never used this option myself. My programs are very simple.
On Wed, Feb 23, 2011 at 3:45 PM, Bolotin Yevgeniy
<YBolotin@schools.nyc.gov> wrote:
> I've just read a riveting account of how SAS calculates those strange
> line numbers when displaying macro errors
> http://analytics.ncsu.edu/sesug/2007/PO26.pdf
>
> Unfortunately, this doesn't seem to be quite so straightforward when %do
> loops are present - each iteration causes a new block to spawn*, and
> when there are a few nested loops this gets VERY hairy. (i.e. I have a
> single DATA statement inside a macro, which ends up with several hundred
> "lines" generated in it, while the entire macro is under 50)
>
> Is there a way to force SAS to print the line/block/whatever numbers in
> the log when mprint is enabled?
>
> Thanks
>
>
> * maybe it's just the *statement-comments; sprinkled here and there
> throughout the code, which get replicated by the loops - I haven't
> delved deeply enough to find out, but the question still holds.
>
>
> SAS 9.2
> WinXP SP3
>
|