BookmarkSubscribeRSS Feed
Suzy_Cat
Pyrite | Level 9

Hi there,

 

I am stuck on export the project log for future checking/analysis.

 

The project has a couple of work flow and each includes a number of programmes. The intention is to export the project log to daily folder together with the data outputs for future investigation. The log also need be displayed in the normal window for error checking.

 

Currently I have below issues that I don't have a solution yet:

1) program logs in the flow are displayed on respective log tab as well as in the project log

2) if one of the program been run twice due to debugging, only the final successful log gets to write to the project log

3) The project log exported looks very messy. How to make it readable?

 

Any suggestions will be appreciated.  🙂

 

Thanks

 

Capture.PNG

 

 

 

 

 

 

 

 

4 REPLIES 4
ballardw
Super User

You will have to clarify what you mean by "messy". It should be a text file just like the log. If the program you use to view the log file is set to display a shorter line there may be line wrap issues.

Or are you getting lots of warnings, invalid data messages or similar. You may want to copy from the log, or that generated file and paste an example into a code box on the forum opened with either the </> or "running man" icons above the message window. Please use the code box for such text as the message windows on this forum will reformat text. And images are pretty hard to read sometimes and may not provide a good example of what you have issues with.

 

You might consider why you have the NEW option on your proc printto if you want to see more than the latest run's log.

Suzy_Cat
Pyrite | Level 9

@ballardw Thanks for your advice 🙂

 

ideally I wish I could check the each program log on the normal log destination as well as check the whole project log after the project being closed. This means we would have a copy of project log for the daily data and can be reviewed at a later time for any issue investigation.

 

Messy means not readable, no proper line breaks as per screenshot:

Capture.JPG

ballardw
Super User

Notepad is somewhat notorious for the line wrap on/off setting. If you have Word Wrap on, the check mark in the Format menu, then when you resize the window the lines will wrap to the width of the window. So the picture you show with a narrow window is likely caused by the combination of Word Wrap being on and the window size. If you turn the Word Wrap off the the lines will not wrap but will disappear off to the right of a narrow window. Or make the window wide enough to show about 80 characters per line.

Or you can associate LOG files with another program that reads text type files such as WordPad and use that instead of Notepad. Notepad is not a full featured editor by any stretch.

ChrisNZ
Tourmaline | Level 20

> The log also need be displayed in the normal window for error checking.
SAS doesn't do that . You have to choose sadly.

What you can do if you want is open the log file after the run with something like

call system("notepad &logfile");

or dump it in the log window by reading it with a data step.
Even better: parse it with a data step to display a summary of events.

 

You might also want to give your log files better names, by including the program/project name and date stamps.

 

 

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 1066 views
  • 3 likes
  • 3 in conversation