Page 1 of 1

Return a Job abort

Posted: Wed Jun 20, 2007 11:13 am
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.

Posted: Wed Jun 20, 2007 11:26 am
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.

Posted: Wed Jun 20, 2007 12:50 pm
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

Posted: Wed Jun 20, 2007 1:00 pm
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

Posted: Wed Jun 20, 2007 1:11 pm
by DSguru2B
The last zero in your parameters is the warning limit. Set that to 1.

Posted: Wed Jun 20, 2007 1:18 pm
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

Posted: Wed Jun 20, 2007 1:23 pm
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.

Posted: Wed Jun 20, 2007 2:40 pm
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

Posted: Wed Jun 20, 2007 5:19 pm
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.

Posted: Thu Jun 21, 2007 7:23 am
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.