Methods for using variable in-conditions

Tools and several solutions to manage Control-M products
Post Reply
User avatar
Ross_T_Boss
Nouveau
Nouveau
Posts: 21
Joined: 08 Aug 2008 12:00

Methods for using variable in-conditions

Post by Ross_T_Boss » 23 Sep 2010 12:53

I have a requirement to split a run stream; in the event of certain conditions a manual approval request job needs to be submitted. Otherwise an auto approval job runs by default. The users will need the ability to make an instant change. I have tested two methods:

First is to set an 'AUTO' and 'MANUAL' condition (STAT). The normal runstream has an AUTO approval job and the MANUAL approval job; each requiring their respective condition. During normal running the 'AUTO' condition is present. If the users switch to manual approval, the AUTO will be removed and MANUAL added meaning that on the next run the MANUAL job will be executed. The ony risk I can see is when the condition change is requested while the 'AUTO' or 'MANUAL' job is still running, the other will kick off.

Second uses a trigger job prior to the 'AUTO' or 'MANUAL' job that runs ctmcontb -ADD %%STATUS ODAT; rather than the user script updating conditions it will update %%\STATUS and as such there is no risk of both jobs being run at once. However I've not used variables in such a permanent state (i.e. using a global var daily, without it neccesarily being set each day). I could of course get round this by setting the variable to AUTO at the end of each day if the business are happy with that approach.

Anybody got any better ideas, or risks with these methods? Particuarly woud like some confirmation that the global variables are not housekept (i dont think they are) as my second method is preferred.

Post Reply