Page 1 of 1

Editing to Job Control

Posted: Tue Jan 13, 2009 6:04 pm
by iwin
Hi,
I am trying to edit Job Control in Sequencer using dsadm and i see that i dont have edit access to it. It been long time i'm back to server, does anyone know if i need to enable anything in order to edit job control.

-- Thanks in advance.

Posted: Tue Jan 13, 2009 6:49 pm
by ray.wurlod
You're not alone. The job control code in a job sequence (and note that it's not "sequencer", which is a component in a job sequence) is deliberately read-only so that the nexus between the graphical design and the generated code is preserved.

If you wish you can copy the code into the job control tab of a server job and edit that. In this wise you are using the job sequence as a prototyping tool; you can never legally paste the edited code back.

Posted: Tue Jan 13, 2009 10:08 pm
by chulett
Curious why you would think you'd need to edit the generated job control.

Posted: Wed Jan 14, 2009 10:28 am
by iwin
chulett wrote:Curious why you would think you'd need to edit the generated job control.
Craig,
I am using a routine activity in Sequencer and have a condition to run the jobs down the line if it meet. There will be a warning in the log if the condition is not met which i do not want. So, i thought editing the job control by removing the DSlogwarn code in the Sequencer Job make things work.

Posted: Wed Jan 14, 2009 10:50 am
by chulett
What exact warning are you receiving? The fact that it doesn't return a zero value? These can be dealt with, there should be no need to go under the covers for something like that.

Posted: Wed Jan 14, 2009 11:11 am
by iwin
chulett wrote:What exact warning are you receiving? The fact that it doesn't return a zero value? These can be dealt with, there should be no need to go under the covers for something like that.
I do get a warning in the log when the return code <> 0 as "The routine activity did not finish ok, return code='XXX'". I do not want this warning in the log even if return code <> 0 unless there is someother issue with the routine activity.

Posted: Wed Jan 14, 2009 11:27 am
by chulett
That comes from having the option "Automatically handle activities that fail" turned on as routines that do not return a zero value are considered to have failed. It should also have mentioned the fact that it is an "unhandled" failure and the secret to making it go away is to (in essence) handle the alleged "failure" yourself.

From your Routine Activity stage create two triggers and run them to a Sequencer set to 'Any' before going to the next actual activity. One would be an "OK" trigger to catch any return values of zero and then an "Otherwise" trigger to get everything else - i.e. your actual valid values. The presence of both lets the Sequence job know you are handling any "problems" and thus won't log the warning, even though you know you'll never see a zero from the routine.

I've done this with three triggers checking for "=0", "> 0" and "< 0" where the "< 0" link captures an actual error from the routine.

ps. This is all documented in the online help for that "automatically handle" option.

Posted: Wed Jan 14, 2009 11:40 am
by iwin
chulett wrote:That comes from having the option "Automatically handle activities that fail" turned on as routines that do not return a zero value are considered to have failed. It should also have mentioned the fact that it is an "unhandled" failure and the secret to making it go away is to (in essence) handle the alleged "failure" yourself.

From your Routine Activity stage create two triggers and run them to a Sequencer set to 'Any' before going to the next actual activity. One would be an "OK" trigger to catch any return values of zero and then an "Otherwise" trigger to get everything else - i.e. your actual valid values. The presence of both lets the Sequence job know you are handling any "problems" and thus won't log the warning, even though you know you'll never see a zero from the routine.

I've done this with three triggers checking for "=0", "> 0" and "< 0" where the "< 0" link captures an actual error from the routine.

ps. This is all documented in the online help for that "automatically handle" option.
Thanks Craig!! this helps.