routine activity problem

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
battleboy1
Participant
Posts: 24
Joined: Fri Nov 25, 2005 4:16 pm

routine activity problem

Post by battleboy1 »

Hi All,

I have problem running a sequencer job which has a routine activity stage.
the routine activity stage in the job calls a routine which searches a sequential file for 'yes' or 'no' flags and returns 'y' or 'n' respectively. If the flag is yes then the rest of the jobs would continue or else the sequencer terminates. the routine has been working fine on my local machine which has windows XP. but when i run the same thing on windows NT server the routine when run throws an error saying that the routine activity did not 'finish ok' and controller problem , unhandled failure (*) encountered calling routine DSU.Routinename. "* has return value i.e either 'y' or 'n' ". In the routine activity stage> properties> triggers, i used the return value (conditional) ='y' to divert the control to the rest of jobs and continue and return value (conditional) ='n' to divert the control to terminate . the routine activity is only working i.e not throwing any errors when the return value is 0 . any other number or character or string returned makes datastage throw the error. both the sequencer jobs running on XP and NT are identical copies. and one more thing. I had problem with the sequencer where i couldnt open most of the stage properties on the canvas. so i came to know that i need to install a patch for datastage. i installed it on xp but not on NT. do you think this is why the DS server on NT is not executing the routine in sequencer job. or is there any other solution. If you do not understand any part of the above sentences or need more information, please let me know. I will be happy to explain it to you again.

thanks in advance,
jzparad
Charter Member
Charter Member
Posts: 151
Joined: Thu Apr 01, 2004 9:37 pm

Post by jzparad »

First thing I would do is confirm that the routine works OK.

Run it from DataStages test harness for routines and see what happens.
Jim Paradies
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Change to a Custom trigger on the Routine activity. The default trigger assumes that a return value of 0 is success, and that anything else is failure. Your custom triggers can be based on the return value, rather than simply on "OK".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
Your problem is quite simple:
you have a sequence which is being imported to a project that sets the option to automaticaly handle activities that fail.
This means that any routine returning a none 0 (zero) value is concidered as a failed activity hence invoking the exception handler.
A simple work around would be to set up a user variable stage and invoke your routine from there, setting your user variable which you can test leter in the sequence flow.

IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Post Reply