Page 1 of 1

Sequencer aborting when it calls a routine.

Posted: Fri Sep 16, 2005 7:55 am
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.

Posted: Fri Sep 16, 2005 8:07 am
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.

Posted: Fri Sep 16, 2005 11:23 am
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.

Posted: Fri Sep 16, 2005 12:04 pm
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

Posted: Fri Sep 16, 2005 12:26 pm
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.

Posted: Fri Sep 16, 2005 1:21 pm
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.

Posted: Fri Sep 16, 2005 2:14 pm
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.

Posted: Fri Sep 16, 2005 4:34 pm
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.