Page 1 of 1

Error encountered calling routine

Posted: Thu Apr 03, 2008 12:33 pm
by kbsuryadev
Routine
|
|
job ActivitY1---->job ActivitY2---->job ActivitY3--->job ActivitY4--->job ActivitY5--->job ActivitY6
Each Sequnce is calling a set of sequences with the jobs

Example job Activity1

J1--J2---J3 so on

I am passing a Routine.$returnvalue in the first sequence as a parameter and then as BATCH_SID in the following sequences



The routine is used to assign a batch number to each sequence
there is a job which is used to store the batch_sid in a flat file

trn---->flat file(with columns: Batch_sid,jobname,username,jobstrat timestamp)
If i dont use the routine to get the batch_sid the sequence runs fine.

Sequnce is aborting with the following error:
Log details
--GetBatchSeq..JobControl (@Coordinator): Starting new run of checkpointed Sequence job
--GetBatchSeq -> (J_Load_BATCH_INFO): Job run requested
Mode (row/warn limits) = 0/50
Job Parameters --->
GeneratedBatchID=3021
JobName=GetBatchSeq
UserName=dsadmin
StartTimestamp=2008-04-03 10:53:59
DSJobController=GetBatchSeq
--GetBatchSeq..JobControl (@Routine_Activity_97): Routine DSU.GetNextBatchNumber did not finish OK, return code = '3021'
--GetBatchSeq..JobControl (@Routine_Activity_97): Controller problem: Unhandled failure (3021) encountered calling routine DSU.GetNextBatchNumber
--GetBatchSeq..JobControl (@Coordinator): Summary of sequence run
10:54:00: Sequence started (checkpointing on)
10:54:00: Routine_Activity_97 (ROUTINE DSU.GetNextBatchNumber) started
10:54:03: Routine_Activity_97 finished, reply=3021
10:54:03: Exception raised: @Routine_Activity_97, Unhandled failure (3021) encountered calling routine DSU.GetNextBatchNumber
10:54:03: Sequence failed (restartable)
--GetBatchSeq..JobControl (fatal error from @Coordinator): Sequence job (restartable) will abort due to previous unrecoverable errors
--Attempting to Cleanup after ABORT raised in stage GetBatchSeq..JobControl

I would appreciate if anyone could make any suggestions on this issue

Posted: Thu Apr 03, 2008 4:58 pm
by ray.wurlod
The routine did not return 0 and you have not explicitly handled this "failure" condition. Search the forum for more information on automatically handling failure in job sequences.

Posted: Thu Apr 03, 2008 5:15 pm
by kbsuryadev
The options are checked in the job properties of the Job Sequnce


1. Add checkpoints so sequence is restartable on failure

2. Automatically handle activites that fail


If i am wrong, please do explain me


Thank you Ray.

Posted: Thu Apr 03, 2008 5:27 pm
by kbsuryadev
I forgot to mention that all the triggers are unconditional for all the sequences

Posted: Thu Apr 03, 2008 6:04 pm
by ray.wurlod
Automatically handle activities that fail will, if you do not have an Exception Handler in the design, abort the job sequence. Click on Help next time you're in that page; it's well explained there.