How to delete or change a status of an abended job

A lot of scripts ans example to extract information from Control-M tools.
Post Reply
User avatar
Mel_A
Nouveau
Nouveau
Posts: 13
Joined: 11 Jul 2013 12:00

How to delete or change a status of an abended job

Post by Mel_A » 06 Aug 2013 8:45

I have a scenario where a job abends or fails (which turns "red" in color)
When this happens we continue with the rest of the successor jobs until the schedule completes.

Upon "New Day Process", the abended job stays in the AJF or queue.
How can I delete the job or change the status of the job so it will roll-off upon "New Day Process" without manual intervention. In other words, without manually forcing the job ok. Preferred to do this in batch.

Any advise?

User avatar
Hubba
Nouveau
Nouveau
Posts: 69
Joined: 10 Dec 2007 12:00
Location: Boston

Post by Hubba » 07 Aug 2013 2:54

Just code a do ok for any return code

User avatar
Mel_A
Nouveau
Nouveau
Posts: 13
Joined: 11 Jul 2013 12:00

How to delete or change a status of an abended job

Post by Mel_A » 07 Aug 2013 5:18

Thanks for the reply.

I forgot to mention that when a job abends, several jobs are bypassed before the schedule continues to completion.

If I code do ok on the abended job, it will post and run the bypassed jobs. Perhaps adding a negative dependency in the abended job's "STEPS TAB" before the do ok? I'll try a few things. Meanwhile, any advise?

User avatar
Kelly
Nouveau
Nouveau
Posts: 10
Joined: 25 Sep 2010 12:00

Post by Kelly » 08 Aug 2013 2:52

I would suggest setting up all the out conditions using the STEPS TAB. We can do OK the job on any code, however posting the conditions can be taken care of with different codes on different steps, providing you with a lot of opportunities to handle dependent job streams.

User avatar
Mel_A
Nouveau
Nouveau
Posts: 13
Joined: 11 Jul 2013 12:00

How to delete or change a status of an abended job

Post by Mel_A » 08 Aug 2013 7:59

How can that be accomplished?

For Example:
On the STEPS Tab of the Abended Job. (JOB1)
I would do ON Statement *
Code=NOTOK
Do Condition NAME=xxxxx Date ODAT Sign + or - depending on the action

The NAME=xxxxx goes to the IN-CONDITION of the job affected. (JOB5)

My understanding is the Do Condition from a job's STEPS tab(JOB1) is related to the IN condition of another job's CONDTION Tab (JOB5).

Can you provide a sample on how to handle the abended jobs and the skipped jobs so they can roll at new day?

User avatar
Mel_A
Nouveau
Nouveau
Posts: 13
Joined: 11 Jul 2013 12:00

How to delete or change a status of an abended job

Post by Mel_A » 08 Aug 2013 8:51

Let me give your advise a thought and try a few more things. Thanks again for the replies, its much appreciated.

I'll post back if I run into issues or questions or share the results if successful!

User avatar
Kelly
Nouveau
Nouveau
Posts: 10
Joined: 25 Sep 2010 12:00

Post by Kelly » 09 Aug 2013 11:43

You may use compstat eq 0 in on statement just to add the out conditions. This will add conditions only upon successful completion of the job. You can use another on statement with statement * code * and do OK.
This should be sufficient to accomplish what you are looking for.

Good Luck!!!

User avatar
Mel_A
Nouveau
Nouveau
Posts: 13
Joined: 11 Jul 2013 12:00

How to delete or change a status of an abended job

Post by Mel_A » 15 Aug 2013 11:43

I was able to successfully test mulitple scenarios: (For example: JOB1 through JOB5 single thread)

If JOB1 fails, JOB2 and JOB3 are bypassed and JOB4 will continue to JOB5. This was accomplished from the recommended steps tab while posting the conditions with different codes on different jobs.

However, If I DO OK on the abended job (JOB1), the bypassed jobs (JOB2 and JOB3) are released. How can I prevent the successor jobs (JOB2 and JOB3) from running because of a 'DO OK' condition from a predecessor job? Can this be accomplisted? If so, How?

Any suggestions or examples?

User avatar
Kelly
Nouveau
Nouveau
Posts: 10
Joined: 25 Sep 2010 12:00

Post by Kelly » 16 Aug 2013 7:34

Do not use any out conditions in the normal out conditions tab of job1. Please use on step * compstat eq 0 do condition and then add conditions to job2 and job3. In this case un-necessary adding of condition on DO OK would be avoided.

User avatar
Mel_A
Nouveau
Nouveau
Posts: 13
Joined: 11 Jul 2013 12:00

How to delete or change a status of an abended job

Post by Mel_A » 17 Aug 2013 12:02

Excellent advise! It worked. Thank you!

From the abended job (JOB1) on STEP TAB: On statement * compstat eq 0 do condition name=abended job (or JOB1) sign = + and On Statement * Code notok DO OK. Note: Out conditions were removed from the Contiditons tab.

And on the successor job(JOB2), used the same depenency in the IN condition using JOB1

What I noticed however, was the table turned "yellow" in color. As though the jobs bypassed were still executing even though they are "gray" in color.

Will this "yellow" condition roll upon New Day Process? How can we handle these table to roll in NEW DAY PROCESS?

User avatar
Kelly
Nouveau
Nouveau
Posts: 10
Joined: 25 Sep 2010 12:00

Post by Kelly » 19 Aug 2013 4:44

The color scheme works like this if it is a group scheduling table. It totally depends on the maxwait which decides the stay of gray or red jobs in ajf. If your bypassed jobs have exhausted the maxwait value, then yellow color of table should not be a problem during the roll out process, provided there are no running jobs in the table.

Cheers!

User avatar
Mel_A
Nouveau
Nouveau
Posts: 13
Joined: 11 Jul 2013 12:00

How to delete or change a status of an abended job

Post by Mel_A » 19 Aug 2013 11:56

You are absolutely correct! I left the table in a yellow status over the weekend and when I came in on Monday, it had rolled off from an "executing" or yellow status without any jobs executing.

The following have been accomplished:
- Continue with the schedule when an abend condtion is acceptable
- Bypass and skip jobs depending on the job's predecessor and condition
- Use of the Steps tab vs the out/in cond
- Force job OK or complete through Batch
- Hold successors from a "DO OK" Condition
- Roll the schedule from New Day Process

Thank you so much for all the help! This has all been done through batch and will be implemented for automation.

Excellent help, service and advise! :D

User avatar
Kelly
Nouveau
Nouveau
Posts: 10
Joined: 25 Sep 2010 12:00

Post by Kelly » 20 Aug 2013 3:34

You're welcome! I am Glad I could help.

Cheers!

Post Reply