The SAS Output Delivery System and reporting techniques

all information in log file is suppressed

Accepted Solution Solved
Reply
Contributor
Posts: 33
Accepted Solution

all information in log file is suppressed

Hi,

My SAS log file suddenly becomes the following. I need to know how many observations were read in and how many observations are saved in new data etc. How can I get them back in log file? 

Many thanks.


Sunny



1695     

1696      data a;

1697       set out.regdata(keep=mtime todays_state tomorrows_state);

1698       if mtime<=mdy(4,1,2014) &  todays_state=0 & tomorrows_state in(0,1,4)

1698    & mtime<mdy(5,1,2014) ;

1699      run;

1700      quit; run;

1701      ODS _ALL_ CLOSE;

1702      ODS _ALL_ CLOSE;

1703      FILENAME WPSWBHTM TEMP;

1704      ODS HTML(ID=WBHTML) BODY=WPSWBHTM GPATH="R:\WPS\TEMP\sunyi\WPS Temporary Data\_TD4152"

1704    ! ;


Accepted Solutions
Solution
‎11-26-2014 08:50 AM
Super User
Posts: 10,044

Re: all information in log file is suppressed

Posted in reply to Sunny_Sun

Sure just put these at the end of code:

%let dsid=%sysfunc( out.regdata);

%let in=%sysfunc(attrn(&dsid,nlobs));

%let dsid=%sysfunc(&dsid);

%let dsid=%sysfunc( a);

%let out=%sysfunc(attrn(&dsid,nlobs));

%let dsid=%sysfunc(&dsid);

footnote "&in  obs read in, &out obs be output";

ods _all_ close;

Xia Keshan

View solution in original post


All Replies
Super User
Super User
Posts: 7,988

Re: all information in log file is suppressed

Posted in reply to Sunny_Sun

Well, that shows that the compiler isn't actually executing this.  Its normally due to having unbalanced quote marks, however in this instance I would assume its broken due to the use of ampersand (&) rather than the word AND.

So start a new session (especially with quotes, you can sometimes never clear it without re-starting), then change the code to:

if mtime<=mdy(4,1,2014) and  todays_state=0 and tomorrows_state in(0,1,4) and mtime<mdy(5,1,2014) ;

Also ensure that all your single and double quote marks have a corresponding ending single or double quote.

Contributor
Posts: 33

Re: all information in log file is suppressed

Thanks. It was a very long statement. So when I copied them to prepare the question, I shortened them. It was right when I ran it in SAS. 

For example,

data a;

     set b;

   

run;

in the log file, there is no observation information. It was fine before. For example, it usually tells how many observations have been read in from source data and how many observations are saved in destination data set.  But suddenly it disappeared.

Can you please tell me how I can get them back in log file?

Thanks,

Sunny

Respected Advisor
Posts: 4,173

Re: all information in log file is suppressed

Posted in reply to Sunny_Sun

You can influence via SAS options how much log information you're getting. If things suddenly changed without you doing anything then may be some SAS admin changed the options on a higher level.

If you execute "proc options; run;" you can see in the log which options are currently set in your session.

Many of the SAS options can be set or overwritten during run time. Below a few options which will create more log information. Add them on top of your code and let us know if this changed things for you.

options fullstimer msglevel=i notes source source2;

options spool;

option sastrace=',,,d' sastraceloc=saslog nostsuffix;

Solution
‎11-26-2014 08:50 AM
Super User
Posts: 10,044

Re: all information in log file is suppressed

Posted in reply to Sunny_Sun

Sure just put these at the end of code:

%let dsid=%sysfunc( out.regdata);

%let in=%sysfunc(attrn(&dsid,nlobs));

%let dsid=%sysfunc(&dsid);

%let dsid=%sysfunc( a);

%let out=%sysfunc(attrn(&dsid,nlobs));

%let dsid=%sysfunc(&dsid);

footnote "&in  obs read in, &out obs be output";

ods _all_ close;

Xia Keshan

Contributor
Posts: 33

Re: all information in log file is suppressed

Many thanks! It works

Trusted Advisor
Posts: 1,326

Re: all information in log file is suppressed

Posted in reply to Sunny_Sun

Any chance that you are making use on the code / or on your autoexec/config file / or on the options of your SAS client software / some options to modify the behaviour of your log?

Some examples:

Step-by-Step Programming with Base SAS(R) Software

Super User
Super User
Posts: 7,076

Re: all information in log file is suppressed

Posted in reply to Sunny_Sun

Perhaps you have some unbalanced quotes, parentheses or macro definitions and SAS is merely echoing the statements to the log because it thinks they are all part of a long quoted string for example.

If it is really running then add :

OPTIONS NOTES;

and it should start writing notes again.

Contributor
Posts: 33

Re: all information in log file is suppressed

Posted in reply to Sunny_Sun

Many thanks all of you! It works.

Have a good thanksgiving holiday.

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 8 replies
  • 725 views
  • 0 likes
  • 6 in conversation