Return a Job abort

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
shyamrai
Premium Member
Premium Member
Posts: 18
Joined: Tue May 22, 2007 12:41 pm

Return a Job abort

Post by shyamrai »

The jobs are designed such that there is a Datastage job(level 3) that is called by the sub master job(level 2). The sub master job is called by the master job.These master jobs(Level 1) are not in Job Sequence but they are run in Server Job. In the master job and the sub master jobs we are passing the parameters for each of the jobs through a transformer using the UtilityRunJob which calls the sub jobs.

We are facing a problem over here. When a datastage job aborts in Level-3, it is showing as finished with warnings for the sub master job(level 2) and all the rest of the sub master jobs(level2) continue running. At the end the master job(level 1) finishes successfully.

Can I know if there is a way to abort the whole master job when a level 3 job aborts.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You can set the warnining limit in the UtilityRunJob() to 1. So that your sequence job inherits this property and passes it down to the children jobs. This way, even if there is a single warning, your jobs will abort.
But I am not sure about the entire design, but then again, thats not the topic of discussion.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
shyamrai
Premium Member
Premium Member
Posts: 18
Joined: Tue May 22, 2007 12:41 pm

Post by shyamrai »

The UtilityRunJob in the Transformer is given as the following.

UtilityRunJob('SubMasterLoadBWFiles','MeridiumApplicationServer=' : ToSubMasterLoadBWFiles.Meridium_Application_Server : '|MeridiumDatasource=' : ToSubMasterLoadBWFiles.Meridium_Datasource : '|MeridiumUserId=' : ToSubMasterLoadBWFiles.Meridium_User_ID : '|MeridiumPassword=' : ToSubMasterLoadBWFiles.Meridium_Password, 0, 0)

This is used to run the next job in sequence.

Can I know where to set the limit to 1 for the UtilityRunJob
muruganr117
Participant
Posts: 40
Joined: Sun Jan 21, 2007 1:52 pm
Location: Chennai
Contact:

Post by muruganr117 »

shyamrai wrote:The UtilityRunJob in the Transformer is given as the following.

UtilityRunJob('SubMasterLoadBWFiles','MeridiumApplicationServer=' : ToSubMasterLoadBWFiles.Meridium_Application_Server : '|MeridiumDatasource=' : ToSubMasterLoadBWFiles.Meridium_Datasource : '|MeridiumUserId=' : ToSubMasterLoadBWFiles.Meridium_User_ID : '|MeridiumPassword=' : ToSubMasterLoadBWFiles.Meridium_Password, 0, 0)

This is used to run the next job in sequence.

Can I know where to set the limit to 1 for the UtilityRunJob
Hi,

From the Code given, my understanding is UtilityRunJob() is a routine which calls another sub master job, at the end of routine there are 2 values as 0,0, if you can verify what these parameters are and set the warning levels here, it can solve the problem, else its always better to use sequencer.

regards
Murugan
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

The last zero in your parameters is the warning limit. Set that to 1.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
shyamrai
Premium Member
Premium Member
Posts: 18
Joined: Tue May 22, 2007 12:41 pm

Post by shyamrai »

DSguru2B wrote:You can set the warnining limit in the UtilityRunJob() to 1. So that your sequence job inherits this property and passes it down to the children jobs. This way, even if there is a single warning, your jobs will abort.
But I am not sure about the entire design, but then again, thats not the topic of discussion.
This way it will abort the master job even if there is a warning in the sub master job which might not be the case where the sub job under the sub master job has aborted. Can I know if there is a way to abort the sub master only when there is an abort in the sub job
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

You need to design your sequence that way then. Stick in an exception handler connected to a terminator activity. Do not handle the scenario in which the job finishes with warnings, in the conditional trigger. This way if a job finishes with warnings, the control will go to the execption handler which will force the sub master sequence to abort.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
shyamrai
Premium Member
Premium Member
Posts: 18
Joined: Tue May 22, 2007 12:41 pm

Post by shyamrai »

[quote="DSguru2B"]You need to design your sequence that way then. Stick in an exception handler connected to a terminator activity. Do not handle the scenario in which the job finishes with warnings, in the conditional trigger. This way if a job finishes with warnings, the control will go to the execption handler which will force the sub master sequence to abort.[/quote]

Yes sir, but I am not using the Job sequence. I am using the server job and I will not be able to use the Job sequence and that's the reason all the jobs are called through the transformers with the use of UtilityRunJob in the SubMaster and MasterJob. The jobs are run for the delta loads and LastSuccessfulRun IS USED FOR THE trnsformer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's time to have a major re-think about your design. UtilityRunJob was originally a quick fix - it does not have all the functionality that a job sequence offers. Begin by documenting (in English, not in IT-speak) precisely what needs to happen under each circumstance. You will find that this leads to greater clarity of thought.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

shyamrai wrote: Yes sir, but I am not using the Job sequence. I am using the server job and ....
O yea, thats right.
Anywho, write a batch job to do your processing then. You will have greater control then.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply