Desktop productivity for business analysts and programmers

Display log or dataset programmatically

Reply
Frequent Contributor
Posts: 97

Display log or dataset programmatically

A lot of code that I run displays data in the log, but the log doesn't display automatically. Is there a way to programmatically open the log? For example, after I use a put to write to the log, I would like it to open without having to look through the list of programs and find the appropriate log.

Also, when you run code to generate multiple datasets, only the last one opens. Can I tell each dataset programmatically to open/display?

Thanks,
Chris
Christopher Johnson
www.codeitmagazine.com
SAS Employee RMP
SAS Employee
Posts: 52

Re: Display log or dataset programmatically

What you are looking for is unfortunately not possible. The log is only displayed automatically when an error occurs in the code.

maybe in 4.3?

http://support.sas.com/documentation/cdl/en/whatsnew/62580/HTML/default/viewer.htm#egwhatsnew43.htm
Valued Guide
Posts: 2,174

Re: Display log or dataset programmatically

For my own consumption I always have LOG open automatically with code always submitted before and after the code node - in the boxes available in options for sas programs. I use this code

%put ERROR- &egservername %sysfunc( datetime(), datetime22.2) ;

It highlights the server name and timestamp in red

Contributor
Posts: 46

Re: Display log or dataset programmatically

Hi,

I am not sure it may be happen some times,

If we are using the procedure like

Proc Printto log="xxxxxxx\log.txt";

run;

automatically log information stored into output file not in log window.

better to stop log into outfiles.

Ask a Question
Discussion stats
  • 3 replies
  • 271 views
  • 0 likes
  • 4 in conversation