Desktop productivity for business analysts and programmers

Display log or dataset programmatically

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?

Christopher Johnson
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?
Valued Guide
Posts: 2,177

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

Posts: 46

Re: Display log or dataset programmatically


I am not sure it may be happen some times,

If we are using the procedure like

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


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

better to stop log into outfiles.

Ask a Question
Discussion stats
  • 3 replies
  • 4 in conversation