As400 JOB Scheduling

335 pts.
Tags:
AS/400 jobs
AS400 - job scheduling
Job scheduling
Hi Tom I have one question to discuss with you. There are two jobs job A and Job B which is scheduled every day. here my question is to JOB B should be scheduled only when JOB A got completed normally. How i can do this task. Actually JOB B is the job which i have created,where as JOB A is Client's JOB? How can i check the status of this JOB A in a progarm and further i can execute my JOB. Hope u got my question. Thanks

Answer Wiki

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

There are different possibilities.
1. Can you change JOB A to do the SDMJOB for JOB b?
2. Does JOB A do something unique?
Like write records to a file that is normally empty. If so, Add logic in JOB B to first see if there are records in the file and also make sure there is no lock on the file. This should mean JOB A completed normally. JOB B can continue. If no records in file ot if you cannot ALCOBJ, then you can either do a DLYJOB for x period of time, then loop to see if condition has changed and this job can run. It would continue to loop until JOB A is completed.

There are otehr methods, but these are the easist I know.

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
    If scheduled on the system default job scheduler, change the schedule entry MSGQ() parameter to set a message queue for the submitted job. When the job is submitted, message ID CPC1236 will be sent to that message queue. When the job finishes, message ID CPF1241 will be sent to that message queue for a normal completion and CPF1240 will be sent for abnormal completion. You can have a program that receives the messages from the message queue. This program could be scheduled to run If CPF1241is found, then your program can go ahead and call PGMB. If only CPC1236 is found, your program might retrieve the status of JOBA to see if it's active; when it finishes, you can check the message queue again to see if it completed normally. The combinations that your program can test are up to you. 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