AS/400 failed batch job records

5 pts.
Tags:
AS/400
How can I get the record of number of times an AS/400 batch job failed during x to y date?
1

Answer Wiki

Thanks. We'll let you know when a new response is added.

The only way I can think of is to dump your QHST log to *print and the scan the spool for the job failure. This will only be as good as how long you retain the QHST data on your system.

Another option would be to monitor for the error ID and then log to a PF with the date/time for retrieval in a query or program. 
The best solution is to identify the problem and fix the code to prevent future problems. 

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • Splat
    Is the failing job producing a job log and/or program dump? If so, you could use that information to record the failures (and causes, if inclined).
    12,865 pointsBadges:
    report
  • azohawk

    You might try looking in outq QEZDEBUG, however this is not fool proof as some jobs do not create a debug spool file, and you have to know how often this outq is cleaned up. (Craig Rutledge (www.jcrcmds.com) has a program in his set of free utilities that will summarize this for you).

    The best bet is to have the program monitor for errors and write that information to a file. Depending on the language (CL, RPG, etc.) there are different ways to accomplish this. There is also the question of how much detail you want to collect to give you an indication of the problem.  Job logs can be helpful, but they have to be turned on (our system is set to not create job logs as a default-which makes troubleshooting issues at times a nightmare). The job logs need to be kept (if there is an issue) long enough to look at them.

    If I know of an issue with a job, I want to check on it to find out why the program malfunctioned. In my current environment, I find that frequently it is because users entered invalid parms to run the program.  Sometimes there is an issue with the program that needs to be addressed. Sometimes the program doesn't malfunction and create an error, but it does produce incorrect results. 

    Any time a program fails, it should be reviewed by the programming staff.  So I guess I am wondering why you are looking for the number of failures of the program.

    4,055 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: