BookmarkSubscribeRSS Feed
mdavidson
Quartz | Level 8

It's been a few years since I've really looked into error checking for production SAS EG jobs. What I've done in the past is write the SAS logs to a folder, then import the log and scan the text of the log for errors and warnings. My company is currently on SAS EG 7.15 and I was wondering if there was another way to check a log for errors. Is there anything built into the EG tool that will do this or is the log scan process I described the best way to accomplish this? Perhaps the Project Log?

 

The idea would be to notify someone if a job fails.

3 REPLIES 3
Quentin
Super User

I use EG for development only, so I don't have production EG jobs.  That said, I often do log scanning in EG just as you discuss, because it allows me to search for errors, warnings, and NOTEs that I think should be unallowed.  If you have a good log scanning macro, you can use it at the end of a PC SAS job, batch job, EG job, DI studio job, stored process, etc etc. It can send an email if it finds problem.

 

That said, EG does have a nice built-in log filtering window, which makes it easy to check for warnings and errors ad-hoc.

 

There are lots of user group papers on log scanning (search lexjansen.com) My favorite approach is still http://www.nesug.org/proceedings/nesug01/cc/cc4008.pdf.

BASUG is hosting free webinars Next up: Jane Eslinger presenting PROC REPORT and the ODS EXCEL destination on Mar 27 at noon ET. Register now at the Boston Area SAS Users Group event page: https://www.basug.org/events.
SASKiwi
PROC Star

Personally I'm not a fan of log-scanning. I find the log summary in EG is perfect for my needs. At a glance it will tell you how many errors, warnings and notes are in your job. If there are errors then I use the Cntrl E function in the log to jump to each of the errors.

 

We also run a lot of batch jobs for production purposes and there we rely on the sending of emails if there is an error in the job along with automatically switching to syntax check mode using the SYNTAXCHECK option.

 

Like @Quentin, EG is primarily used for development and ad-hoc analytics and we use batch jobs exclusively for production.

Kurt_Bremser
Super User

"production SAS EG jobs" is some kind of oxymoron. EG is a nice development environment, but, being desktop-only, not suited for a production environment. Production jobs should always run in batch on the server under control of a solid scheduling environment, either that supplied by SAS, or the one already in use in your organization.

 

With batch jobs, you can include all kinds of error checking in the shell script that is used by the scheduler. And since SAS already provides proper return codes for WARNINGs (1) and ERRORs (2), the scheduler will easily flag the run as unsuccessful.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 468 views
  • 0 likes
  • 4 in conversation