BookmarkSubscribeRSS Feed
HeatherNewton
Quartz | Level 8

Hi I have some very big log file and I have already used

options nocenter nodate nonumber nomlogic nosymbolgen;

options notes=no;

 

what else can I add to reduce log size?

 

 

 

6 REPLIES 6
PaigeMiller
Diamond | Level 26

To tell you the truth, I wouldn't recommend reducing the log size at all. It contains useful information. You can turn off the macro debugging tools once you have finished debugging.

 

I would print the log to a file, and then the size is mostly irrelevant and it can be viewed by any text editor (which of course allows you to search for errors). Example:

 

proc printto log="c:\yourfolder\whatever\program12.log" new;
run;
/* Your SAS code goes here */
proc printto;
run;

 

 

--
Paige Miller
ballardw
Super User

Which particular entries in the log are offensive?

Are you using PUT statements? - Remove them or comment them out.

 

How large is your log that you find too big? 100 lines? 1000 lines? 100K lines?

How many lines of code are in your program? Generally  if your program doesn't have any errors you typically get about 5 or 6 lines per procedure or datastep more than the actual code submitted. If you are getting much more than that I would say that you likely have problems with data or code than need to be addressed but would have to see examples with code and possibly data of where to start.

 

Nocenter, nodate and nonumber only affect output pages so have zero impact on log size.

HeatherNewton
Quartz | Level 8

I use proc export and it created lots of lines

 

SASKiwi
PROC Star

If its code lines then I suggest turning NOTES on so you can see evidence of the step being run and SOURCE off to avoid all of the PUT statements in PROC EXPORT:

options notes nosource;

proc export......;
run;

options source;
Kurt_Bremser
Super User

@HeatherNewton wrote:

I use proc export and it created lots of lines

 


Unless you have thousands of variables, this should not be a problem. You can reduce the size of such export code considerably by writing the step yourself and omitting unnecessary statements.

PaigeMiller
Diamond | Level 26

@HeatherNewton wrote:

I use proc export and it created lots of lines

 


What does this have to do with log size?

--
Paige Miller

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 6 replies
  • 791 views
  • 1 like
  • 5 in conversation