BookmarkSubscribeRSS Feed
Suzy_Cat
Pyrite | Level 9

Hi there,

 

Did some research, but haven't found the best way yet.

 

Can anyone suggest how to get a list of errors and warnings (text message combined together) after a project completed where the project contains lots of sub-programes?

 

syscc & syserr:

&syswarningtext

&syserrortext

 

Cheers

8 REPLIES 8
Suzy_Cat
Pyrite | Level 9

My point here is: the project will be handover and I will only be checking (or update) the project when there is issue with the code or outputs. I am not the one actually running after the handover.

 

 

SASKiwi
PROC Star

@Suzy_Cat  - You can step through the EG project warnings and errors by going to the SAS log window and using the CTRL plus E keys together. A programmatic approach would involve parsing the SAS log with a program to pick up messages that start ERROR or WARNING. SAS provides a procedure for this - SCAPROC. In any case you would have to review the SAS log manually to diagnose what is going wrong.

Suzy_Cat
Pyrite | Level 9
SCAPROC - good direction to go. Thanks for the help!
Patrick
Opal | Level 21

Just to add to what others wrote: The macro variables you're listing only ever contain the LAST message but you need normally to start on top with the FIRST message for investigation. If you're after a list of all messages then you need to parse them out of the SAS log - either directly or from an already more structured Proc Scaproc output.

 

Suzy_Cat
Pyrite | Level 9

@Patrick 

 

Thanks for your suggestions. Really helpful.

Any better solution to extract required information from the project log summary?

if the info under Error & Warnings can be sent to who ever is maintaining the project, it will be quite handy to prioritize the task.

 

eg71_projlogsummary.png

Suzy_Cat
Pyrite | Level 9

Found some useful link, need time to work on and test if it serves the purpose:
https://communities.sas.com/t5/ODS-and-Base-Reporting/Extract-Errors-and-Warnings-from-log/td-p/2958...

Paper 1173-2017
Check Please: An Automated Approach to Log Checking
Richann Watson, Experis
https://support.sas.com/resources/papers/proceedings17/1173-2017.pdf

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

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
  • 8 replies
  • 2645 views
  • 3 likes
  • 4 in conversation