Count warnings and stop job

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
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Count warnings and stop job

Post 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 ?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post by snassimr »

As how I can count warning mesages in log ? And write it for postponed decision.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
manojmathai
Participant
Posts: 23
Joined: Mon Jul 04, 2005 6:25 am

Post 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
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post 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 .
manojmathai
Participant
Posts: 23
Joined: Mon Jul 04, 2005 6:25 am

Post 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
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post by snassimr »

What is batch Job by you . Routine code that do DSRUNJOB ?
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post 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
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post 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
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post 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
snassimr
Premium Member
Premium Member
Posts: 281
Joined: Tue May 17, 2005 5:27 am

Post 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 ?
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post 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.
Thanks,
Naveen
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post 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
Post Reply