Stop Cyclic when AFT JOB as reached 4 times

Tools and several solutions to manage Control-M products
Post Reply
User avatar
osafr71
Nouveau
Nouveau
Posts: 26
Joined: 21 Jan 2010 12:00

Stop Cyclic when AFT JOB as reached 4 times

Post by osafr71 » 14 Jun 2012 6:43

Hi there.

I have 15 AFT Jobs copying every 30 minutes audit logs, but when after 4 attempts whith no files to transfer ( * No matching files for pattern* ) i need do :

- Stop Cyclic
- Do NOT_OK

Anybody knows how can i do that?

Thanks

osafr71

User avatar
sjones77
Nouveau
Nouveau
Posts: 2
Joined: 19 Jun 2012 12:00

Post by sjones77 » 19 Jun 2012 2:31

Use RUNCOUNT in the Step tab

User avatar
osafr71
Nouveau
Nouveau
Posts: 26
Joined: 21 Jan 2010 12:00

Post by osafr71 » 04 Jul 2012 6:37

Hi there. Thanks for all that reply, but the RUNCOUNT option i already use for cont the number of iteractions.

It seems the chookgate solutions will be more appropriate for me, but the tests a used it diddn't work because the postcmd will increment eache time it executes, and i want to count only when the string ( * No matching files for pattern* ) appears.

Any suggestions?

User avatar
brownbag
Nouveau
Nouveau
Posts: 161
Joined: 11 Oct 2007 12:00
Location: Melbourne

Stop Cyclic when AFT JOB as reached 4 times

Post by brownbag » 23 Jul 2012 7:17

I think you may be best to use a shout to a program to handle this.
On first run of the job, set a global variable (say %%\NOFILECOUNT) to 0.

Every time the job gets the output "No matching files for pattern*:
1. Increment %%\NOFILECOUNT by 1.
2. Run the script, passing to it the value of %%\NOFILECOUNT and the order id.

The script will use ctmvar to check the value of %%\NOFILECOUNT
If the value is 4, then use ctmpsm to perform the Stop Cyclic and Do NOTOK.

Cheers.

Post Reply