Page 1 of 1

how to abort the job

Posted: Fri Aug 18, 2006 2:50 am
by mohanraj
Hi

Can anyone tell me that how can I abort the job.For one of my research work I am taking data in sequential file and it contains 100 records and my target is DRS.I want to make after 50 records my job should get abort.Please send me some problems by which I can abort my job.
It may looks silly for you guys but,please send it fast asap.

thanks
mohan

Posted: Fri Aug 18, 2006 3:01 am
by loveojha2
Explicit call to DSLogFatal would abort the job. You can use it within the stage variable.

Posted: Fri Aug 18, 2006 3:01 am
by kumar_s
There are several ways of doing it. Use Abort after n rows option available in Transformer. Or by counting the number of rows passing on a column, you can use AbortUlitility. Or Teminator stage in JobSequence(If you have in your version). You can search for this.
But Why do you need to abort the job. Rather you have change you design to send some notification and stop the further process.

Posted: Fri Aug 18, 2006 3:22 am
by balajisr
loveojha2 wrote:Explicit call to DSLogFatal would abort the job. You can use it within the stage variable.
Can you clarify this.

I tried using DSLogFatal in my transformer stage before but it did not work. I know we can use this subroutine in Afterjob subroutine or transform function but not sure we can use it in stage variables.

Posted: Fri Aug 18, 2006 3:32 am
by dprasanth
balajisr wrote:
loveojha2 wrote:Explicit call to DSLogFatal would abort the job. You can use it within the stage variable.
Can you clarify this.

I tried using DSLogFatal in my transformer stage before but it did not work. I know we can use this subroutine in Afterjob subroutine or transform function but not sure we can use it in stage variables.
When you mean abort .. you mean stopping the job right.. so what you can do is when you click the run button , there is a tab called LIMITS, there is an option called STOP STAGES AFTER and you can specify after how many rows you want to stop the job.

Posted: Fri Aug 18, 2006 7:11 am
by chulett
balajisr wrote:I tried using DSLogFatal in my transformer stage before but it did not work. I know we can use this subroutine in Afterjob subroutine or transform function but not sure we can use it in stage variables.
Works just fine. All you need to do is call it and your job is dead, so not sure under what circumstances it wouldn't work. :?

And it would be simple enough to do that conditionally when @INROWNUM hits 50, if someone really wanted to do that.

Posted: Fri Aug 18, 2006 9:46 am
by ray.wurlod
Best practice is to design server jobs so that they never abort, so that you retain control at all times, in my opinion.

Etiquette Note
Terms like "fast" and "asap" create negative feelings here. This is an all volunteer site; folks post as and when they can. If you want "fast" or "asap" sign up for premium service from your support provider and learn the true cost of "urgent".

Posted: Mon Aug 21, 2006 2:00 am
by balajisr
chulett wrote: Works just fine. All you need to do is call it and your job is dead, so not sure under what circumstances it wouldn't work. :?

And it would be simple enough to do that conditionally when @INROWNUM hits 50, if someone really wanted to do that.
When i tried to call DSLogFatal in the derivation of the transformer stage i got an error like 'Array DSLogFatal not dimensioned' which is same as one would get if the header files are missing when you call it from a routine.

Posted: Mon Aug 21, 2006 3:38 am
by ArndW
The DSLogFatal is not called as a function but as a routine, which is why you are getting the error. I would recommend putting a transform output link into your job that is set to fail the job if any rows go down that link; this is simple to do and easy for people looking at the job to understand.

Posted: Mon Aug 21, 2006 7:16 am
by chulett
balajisr wrote:When i tried to call DSLogFatal in the derivation of the transformer stage i got an error like 'Array DSLogFatal not dimensioned' which is same as one would get if the header files are missing when you call it from a routine.
You're right... I didn't mean you could use it directly in the derivation, but would need to wrapper it in a routine and include the appropriate headers. Should have explicitly mentioned that.

Posted: Mon Aug 21, 2006 10:39 pm
by balajisr
chulett wrote:You're right... I didn't mean you could use it directly in the derivation, but would need to wrapper it in a routine and include the appropriate headers. Should have explicitly mentioned that.
Thanks Craig for the clarification.

Re: how to abort the job

Posted: Tue Aug 22, 2006 6:17 am
by ray.wurlod
mohanraj wrote:Can anyone tell me that how can I abort the job.
The ol' power switch is singularly effective! :lol: