How to abort a job in Afterjob sub routine

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

kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

If you still want to abort the Job sequence, you can externalize the Abort functionality in a routine outside the job. Which check if the reject table is greater than 0 records for the current run, and calls the Abort signal accordingly.
As mentioned to you several times in the post and in the mail, you can use LinkRowcount to check the number of records that been passed to a link or if you maintain a table, you can count the number of records. Based that, you can use 'ABORT' or DsLogFatal().
Hope you are using BASIC routine for this purpose.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
nvuradi
Participant
Posts: 54
Joined: Tue Dec 12, 2006 11:03 pm

Post by nvuradi »

kumar_s wrote:If you still want to abort the Job sequence, you can externalize the Abort functionality in a routine outside the job. Which check if the reject table is greater than 0 records for the current run, and calls the Abort signal accordingly.
As mentioned to you several times in the post and in the mail, you can use LinkRowcount to check the number of records that been passed to a link or if you maintain a table, you can count the number of records. Based that, you can use 'ABORT' or DsLogFatal().
Hope you are using BASIC routine for this purpose.
hi thanks all for u r help i am able to abort the job using the function
DSLogFatal.

Thanks,
Naru
bkerebel
Participant
Posts: 15
Joined: Wed Jan 05, 2005 3:18 am

Post by bkerebel »

perhaps you could use too the
Call DSFatalInfo(xxx, yyy) to give a fatal message into your log

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

Post by DSguru2B »

bkerebel wrote: Call DSFatalInfo(xxx, yyy)
I have never heard of that function, you sure it exists :?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply