Maximum number of failed objects in Backup

All questions about Control-M jobs definitions
Post Reply
User avatar
Ross_T_Boss
Nouveau
Nouveau
Posts: 21
Joined: 08 Aug 2008 12:00

Maximum number of failed objects in Backup

Post by Ross_T_Boss » 14 Aug 2008 5:54

Hi,

I have about 40 NT backups failing regularly, due to failed objects.

In reality, we have numerous failures that aren't critical, so a message "Failed Objects 53" for example appears in the sysout, and the job is investigated. We close off any cases if the failures are below a threshold (usually 100, dependant on the backup).

I'd like to automate this using the DO commmands - is there anyway of setting something up that essentially says, STATEMENT = "Failed Objects <100" THEN JOB OK ?

I've recently started using the "Steps" tab to improve our batch and still have lots to learn; I can't figure this one out and it would be a huge advantage if it could be used like this.

Thanks
Ross

hipikll

Post by hipikll » 16 Aug 2008 1:19

The logic i would use is:
1) if found 'Object error' then increase global variable FO by 1 - in each backup job
2) last job in chain will compare FO with your trashold: if FO > 100 then .. do action

But implement you need it yourselves ;)

User avatar
Ross_T_Boss
Nouveau
Nouveau
Posts: 21
Joined: 08 Aug 2008 12:00

Post by Ross_T_Boss » 18 Aug 2008 3:54

Thanks for that - I assume you use 'DO' Set-var %%FO = 1 to do that?

It is a little more complicated, but if it is possible I'd like to fail the job dependant on the number.

So for instance:

ANS1802E Incremental backup of 'server1' finished with 4 failed objects - Would be OK

ANS1802E Incremental backup of 'server1' finished with 317 failed objects - Would be NOTOK as >100 failed objects

Is there any of way of having CTM pick up the figure in the log and use it in such a way?

Cheers
Ross

hipikll

Post by hipikll » 19 Aug 2008 11:22

If I understand:
So, you have a number in one sysout of some job and you want to cut this number and compare it?

In this case i would prefere to use 'copy sysout' to another file/location from this job. Then append special job - script at the end of chain which will cut the number and compare it with your treshold.
FO=`cat $sysout | cut -f8 -d' '`
[ $FO -gt 100 ] && exit 1;


The CM for distributed environment can not parse the sysout and evaluate the parts of it and use it later.
In Mainframe i think there is such 'utility' (control-o??)

User avatar
Derick
Nouveau
Nouveau
Posts: 26
Joined: 22 Jun 2007 12:00

Post by Derick » 19 Aug 2008 2:28

Hi,

You can use 2 ON - DO NOTOK statements, where you use ?'s as placeholders for hundreds and thousands.

Example:
ON - Stmt=* - Code=*finished with ??? failed objects* - DO NOTOK
and
ON - Stmt=* - Code=*finished with ???? failed objects* - DO NOTOK

:D

Post Reply