Date: Tue, 15 Dec 2009 08:17:29 -0800
Reply-To: Tom Abernathy <tom.abernathy@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Tom Abernathy <tom.abernathy@GMAIL.COM>
Subject: Re: symbolgen and log size
Content-Type: text/plain; charset=ISO-8859-1
I cannot fathom a reason why you would need a macro variable with
32,767 blanks in it.
I find that in general SYMBOLGEN and MLOGIC are next to useless to
debug a macro. Usually a macro is written to generate SAS
statements. So the values of the variables will be present in the
generated statements hence you do not need SYMBOLGEN. When the code
branches you can tell which branch it took from the code it generates
hence you do not need MLOGIC.
When it gets really tricky to find a problem then put in a few %PUT
On Dec 15, 10:48 am, "yoon...@gmail.com" <yoon...@gmail.com> wrote:
> Hi all,
> I'm writing a sas macro program with a do loop in it.
> For debugging, I use mprint, symbolgen and mlogic options.
> In each loop, I use proc printto to put out the log as a txt file.
> The problem is that the log text files gets really big mainly due to
> empty space or lines. I'm talking about
> 3-4 pages empty lines. I think I figured out why the log text file has
> such a large amount of empty space.
> It was because that one macro variable that I generate by symput
> option referering to a column with a length
> set at the maximum ($32767). I need it to be at the maximum but the
> actual macro variable can resolve to
> a few hundred characters. However, the symbolgen option seems to put
> all 32,767 spaces in the log.
> Try the example code below and see what happens in the log. The macro
> variable "sel" has no character
> in it but when you look at the log, there are lots of empty lines
> before "quit;".
> Is there any way to make SAS log show only the actual resolved
> character that are trimmed for all empty spaces
> to reduce the log file size?
> options mprint symbolgen mlogic;
> data _null_;
> length eff $32767;
> call symput ('sel', eff);
> %put &sel;