Editing to Job Control

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
iwin
Premium Member
Premium Member
Posts: 99
Joined: Mon Apr 11, 2005 9:20 pm

Editing to Job Control

Post 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.
Every person you meet knows something you don't, Learn from them.
-- H. Jackson Brown
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Curious why you would think you'd need to edit the generated job control.
-craig

"You can never have too many knives" -- Logan Nine Fingers
iwin
Premium Member
Premium Member
Posts: 99
Joined: Mon Apr 11, 2005 9:20 pm

Post 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.
Every person you meet knows something you don't, Learn from them.
-- H. Jackson Brown
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
iwin
Premium Member
Premium Member
Posts: 99
Joined: Mon Apr 11, 2005 9:20 pm

Post 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.
Every person you meet knows something you don't, Learn from them.
-- H. Jackson Brown
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
iwin
Premium Member
Premium Member
Posts: 99
Joined: Mon Apr 11, 2005 9:20 pm

Post 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.
Every person you meet knows something you don't, Learn from them.
-- H. Jackson Brown
Post Reply