How to handle job errors in as400 what is the command and where can we find out whether the job has any errors?

470 pts.
Tags:
AS/400
AS/400 job logs
AS/400 jobs
V5R3
how to handle job errors in as400 what is the command and where can we find out whether the job has any errors and how do we handle it

Software/Hardware used:
V5R3

Answer Wiki

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

There is no “command” to handle ‘job errors’. Every language has a different way to handle errors.

As for how an error should be handled, it would be different for each kind of error — it’s up to you to decide how to handle them; that’s a big part of what programmers are paid to do.

Tom

Discuss This Question: 1  Reply

 
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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • TomLiotta
    where can we find out whether the job has any errors Ideally, a job will report its errors in the joblog. While a job is active, the "joblog" is the job's external message queue. You can view this message queue for any active job by running DSPJOB for the job name and taking option 10="Display job log, if active, on job queue, or pending" from the Display Job menu. When a job ends, it will copy the messages from its external message queue to a spooled file named QPJOBLOG. It will only copy messages that meet the criteria specified in the job's LOG() attribute. The LOG() attribute can specify that no messages are to be copied, so no QPJOBLOG spooled file will be created. The spooled files for a job can be seen by taking option 4="Display spooled files" from the Display Job menu for that job. There are some problems that can make this difficult. First, programs don't have to log messages to the job's external message queue. Programs can also remove messages from the external message queue. This is often done in an attempt to to 'clean up' the joblog and make it more readable or simply to keep it small. But when messages are removed (or not logged), the program should be sure that the messages won't be needed later. Sometimes a large number of repeated messages might be removed. It can be a good idea to send a single message to the joblog telling how many were removed and what the message identifiers were. The point is that your question can totally depend on the programs that run in a job. The first place to look is in a job's joblog. Usually that is where you will see messages about errors. But the programmer is responsible for logging proper messages. If messages don't show up and the job's LOG() attribute looks appropriate, then the source for the programs is where you should look. There might be supporting messages in the history log in the time range when the job ran. Use the DSPLOG command to see the history logg. And there might be supporting messages in the QSYSOPR or QSYSMSG message queues. Use the DSPMSG command to look at those. There are other possibilities, but it all depends on the programmer. Tom
    125,585 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.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

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

Following