Sequencer aborting when it calls a 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
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Sequencer aborting when it calls a routine.

Post by DeepakCorning »

I have sequencer job which calls up a routine (which requires one input parameter and that is the job name ) . I don;t know where I am going wrong in calling this routine in the sequencer but the sequencer fails and gives the follwing error.

Exception raised: @Job, Error calling DSSetParam(XYZ), code=-4 [ParamValue/Limitvalue is not appropriate]

If any one can help me with what may be the possible reasons or direct me to some post related to it , it will be gr8.

Thanks.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

What does your routine do? Sounds more like an internal problem trying to put that input argument to use rather than an issue of actually calling the routine.

Include any datatypes of the various parameters involved.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Post by DeepakCorning »

The routine is a type of lookup. It tries to find a number field on the basis of a date lookup.
It searches for todays date in a hash file and then selects a number from it to assign it to the next stage.
The output of this routine call is a parameter used in the next stage.Its something like -->
Select num from HASH where HASH.DT = @date
chulett wrote:What does your routine do? Sounds more like an internal problem trying to put that input argument to use rather than an issue of actually calling the routine.

Include any datatypes of the various parameters involved.
ucf007
Charter Member
Charter Member
Posts: 18
Joined: Fri Feb 27, 2004 2:25 pm

Post by ucf007 »

Hi,

When you are using a routine that returns a value inside a sequencer, you need to set the trigger to Failed (Conditional) ie the link will always be red in the sequencer design, this applies when the checkbox - Automatically handle activities that fail - in Job properties/General.

Youssef
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That's a different problem, when a non-zero return code is interpreted as a failure when that "Automatically handle" option is checked.

This is a parameter passing problem. It sounds like your parameter value being passed back from the routine is "not appropriate" for the parameter's datatype in the next job that is trying to use it.

Double-check what is actually being returned from the routine.
-craig

"You can never have too many knives" -- Logan Nine Fingers
DeepakCorning
Premium Member
Premium Member
Posts: 503
Joined: Wed Jun 29, 2005 8:14 am

Post by DeepakCorning »

The parameter passed back by the routine is a integer of length 10 and I checked twice , the datatype is correct .
Can it be due to HASH file?? I tried deleting the HASH file and then rebuilding it but no use. The job still fails with the same problem.
:cry:
chulett wrote:That's a different problem, when a non-zero return code is interpreted as a failure when that "Automatically handle" option is checked.

This is a parameter passing problem. It sounds like your parameter value being passed back from the routine is "not appropriate" for the parameter's datatype in the next job that is trying to use it.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Check the value of the parameter being passed back. An Integer datatype requires a valid numeric value, so trying to set it to a non-numeric ( or even null) will result in that error message.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code -4 means that the value you have supplied (presumably the return value from the routine) is not appropriate for the parameter type when you're requesting the run of a job.

For example, "" is not appropriate for Integer, Date, Time, Pathname parameter types.
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