Error encountered calling 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

Post Reply
kbsuryadev
Premium Member
Premium Member
Posts: 46
Joined: Wed Jun 06, 2007 10:32 am

Error encountered calling routine

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

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kbsuryadev
Premium Member
Premium Member
Posts: 46
Joined: Wed Jun 06, 2007 10:32 am

Post 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.
kbsuryadev
Premium Member
Premium Member
Posts: 46
Joined: Wed Jun 06, 2007 10:32 am

Post by kbsuryadev »

I forgot to mention that all the triggers are unconditional for all the sequences
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply