From: Eli Y. Kling on
I do two things:
1. I contorl the information that is wrtten to the log.
2. I break up the log to indentifiable sections using proc printo;

have a look at these two macros:

/* Parameters: DebugMode - 0,1,2,3 the lowest level this message
should be shown */
/* 0 - Debug if
off */
/* 1 - Basic Debug = informative
messages */
/* 2 - Detailed
informatio */
/* 3 - Save listed datasets to Debug permanat
folder */
/* 4 - Panic -
symbolgen */
/* DebugPath - Physical path to which debug tables will
be written */

%Global DebugMode;
%let DebugMode=2;
%let DebugPath=D:\Debug;


%Macro init_debug(DebugMode,DebugPath);
options source Msglevel=N Notes=1;

%if 1<=&DebugMode. %then %do;
options source2 mprint mprintnest;
%end;

%if 3<=&DebugMode. %then %do;
/* redirect one level name datasets to a permanant folder */
Libname user "&DebugPath.";
%end;

%if 4<=&DebugMode. %then %do;
options symbolgen Fullstimer Msglevel=I STIMER ;
%end;
%mend;

%Macro debug_message(MessageLevel,EliMessage);
%if &MessageLevel. <= &DebugMode. %then %do;
%put ;
%put <<< ----------------------- Debug Point
-------------------------------------------- >>>;
%put
<<
>>;
%Put --> Eli Debug: &EliMessage. <--;
%put
<<
>>;
%put <<<
--------------------------------------------------------------------------------
>>>;
%put ;
%end;
%mend;
From: Reeza on
On Mar 24, 2:05 pm, Marc <morain...(a)gmail.com> wrote:
> For years I have been thinking and asking, why SAS, even the latest
> version, doesn't do something to mark/segment/divide different log
> pieces for different RUNs and with distinctive marks?
> It's pretty annoying each time to find where is where when debugging
> the programs, especially for me because there are always so many.
>
> I would like to know your opinion.
>
> ----Marc

There's also a bit of documentation at the beginning of my code that
prints out (program name/purpose), and I usually include a line of
********************************** astericks to make it easier to find
where the fresh run is. Adding the datetime stamp macrovariable will
also help with that.
From: Dave Haans on
On Mar 24, 5:05 pm, Marc <morain...(a)gmail.com> wrote:
> For years I have been thinking and asking, why SAS, even the latest
> version, doesn't do something to mark/segment/divide different log
> pieces for different RUNs and with distinctive marks?
> It's pretty annoying each time to find where is where when debugging
> the programs, especially for me because there are always so many.
>
> I would like to know your opinion.
>
> ----Marc

I usually just manually clear the log and output screens before doing
another run, but I think your job and my job are a bit different.

What I'd suggest is adding lines in the program between areas you want
to separate by redirecting the log to separate files. The relevant
SAS page is here:

http://support.sas.com/documentation/cdl/en/basess/58133/HTML/default/a001330273.htm

Basically, the code you need from that page is this:

proc printto print='alternate-output-file' new;
run;

proc print data=sat_scores;
title 'Mean SAT Scores for Entering University Classes';
run;

/*
proc printto;
run;

Cheers,

Dave.
From: Dave Haans on
Sigh, that got posted before I was ready. This code redirects the
log:

proc printto log='alternate-log-file';
run;
First  |  Prev  | 
Pages: 1 2
Prev: GLIMMIX warning
Next: Why won't SAS fix PROC EXPORT