Job ending abnormally instead of going to MSGW

60 pts.
Tags:
AS/400
MSGW
I have a scheduled job with a command: SBMJOB CMD(CLRPFM TEST). If the file is lock, the job just ends abnormally saying the file cannot be cleared coz it is lock. Without putting the CLRPFM command in a CL PGM, is there a way to set it up that the job will go on MSGW in order for me to do a retry? Thank you
1

Answer Wiki

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

You can try to ALCOBJ and handle the error. But if your job is ending abnormally now I suspect you may have a MONMSG that is preventing the error from holding up your job and allowing a reply.

Discuss This Question: 4  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
    Best practice would be to write a program that would include both the CLRPFM and monitor for resulting messages.
    12,865 pointsBadges:
    report
  • TheRealRaven
    I don't know a way to do it without a program. There might be one. But since a program can be nothing but 'CLRPFM TEST', it's hard to see why a "program" shouldn't be used.
    34,430 pointsBadges:
    report
  • ToddN2000
    Is there a reason for not wanting to create a CL program? The only other option I see is, if there is a job that is locking the object, end that job prior to running your CLRPFM.
    131,560 pointsBadges:
    report
  • TheRealRaven
    A monitor isn't needed if the 'CLRPFM TEST' is compiled as a program. As a CL program, *ESCAPE messages can be handled via message queue replies. A locked file would generate a CPA0702 *INQUIRY message that a reply list entry or other means could effect a 'R'etry.
    34,430 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: