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
There's not much use for such a list. Clean up your code from the top down, as fixing the first problem usually cleans up later ones.
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.
The answer still applies: if you have any problem, fix the first, and rerun the code. Rinse, lather, repeat.
@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.
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.
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.
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
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.