Page 1 of 1

Count warnings and stop job

Posted: Mon Aug 29, 2005 7:41 am
by snassimr
I want to run job in sequence and if the job creates number of warning over the definit number of errors ( I want to define the number per each job) not to go on with it sequence and abort

How to do this ?

Posted: Mon Aug 29, 2005 5:15 pm
by ray.wurlod
You can set this in the Constraints grid in a Transformer stage within the job.

I prefer never to abort jobs - see other posts on this topic.

Posted: Tue Aug 30, 2005 1:41 am
by snassimr
As how I can count warning mesages in log ? And write it for postponed decision.

Posted: Tue Aug 30, 2005 2:08 am
by ray.wurlod
All link row counts can be obtained from DSGetLinkInfo() function.

If the job has not aborted, link row counts can also be obtained by interrogating the log "active stage finished" messages.

If the job has aborted, and has been reset, the number of rows on the reject link may also be able to be captured from the job log.

Posted: Tue Aug 30, 2005 11:58 pm
by manojmathai
Hi

Use the following
ErrCode = DSSetJobLimit(hJob1, DSJ.LIMITWARN, 50)
before running the job in the Batch which call individual jobs.
Pls set the warnings accordingly for each jobs.

Regards
Manoj

Posted: Wed Aug 31, 2005 12:48 am
by snassimr
Where I can do it in job sequence . I want to run Jobs not with routine or something.

Can I use routine activity to set limit for warning befor Job Activity Stage

?

Can I do it inside Job Activity ?

My question is About DSSetJobLimit and DSGetLinkInfo .

Posted: Wed Aug 31, 2005 1:18 am
by manojmathai
Hi
I was under an impression that you are using a batch job to call individual jobs in sequence.

You can use a batch job to call the individual jobs instead of using the sequencer. While calling the individual jobs you can set the limit for each jobs using this command.

Thanks
Manoj

Posted: Wed Aug 31, 2005 2:52 am
by snassimr
What is batch Job by you . Routine code that do DSRUNJOB ?

Posted: Wed Aug 31, 2005 3:13 am
by elavenil
Batch job is nothing but the code is written by DS when add a job in the jobcontrol. You can write your BASIC code as well to control the dependency in the ETL process.

HTWH.

Regards
Saravanan

Posted: Wed Aug 31, 2005 4:13 am
by snassimr
Batch job is nothing but the code is written by DS when add a job in the jobcontrol
where i can see the code of batch ? Can I change it ? Is it good technique dont use the job sequence

Posted: Wed Aug 31, 2005 4:26 am
by elavenil
Goto the job properties and select the job control tab. There you find drop down box and 'Add Job' button then select the job from drop down and click on 'Add job' button. This process will create BASIC code to execute the job in sequence. And of course this can be modified.

HTWH.

Regards
Saravanan

Posted: Wed Aug 31, 2005 4:58 am
by snassimr
I have The "Add Job" only in Job not for Job sequence.

And in Job Control the code not editable.

Are you use usual Server Job to run other jobs ?

Posted: Wed Aug 31, 2005 7:27 am
by pnchowdary
Hi snassimr,

I guess that elavenil meant that, once you see the generated code in either server job using add job or in job sequencer on the job control tab, you can copy the code to a batch job and add your custom code in it. Then you can use the batch job from the command prompt to run the sequence of jobs.

Posted: Wed Aug 31, 2005 7:32 am
by elavenil
Hi Snassmir,

As Naveen mentioned, you can copy the code from the sequencer and paste it in the job control and you can edit that code.

What i am trying to say is the job control is only available to normal jobs but not to the sequencer and you can edit the code, which is created as mentioned in my earlier post.

HTWH.

Regards
Saravanan