Page 1 of 1

Possible Values for DSJ.STAGELASTERR

Posted: Tue Dec 21, 2004 9:05 pm
by anilkona
Hi,

Can anyone tell what are the possible values for DSJ.STAGELASTERR?
I tested in a sample job and it returns a value of -7. The doc says its a string representing the last error on the stage.

I am confused. I am trying to determine if there is any error on a stage and if so, reject rows for the next stage.

Thanks,

Posted: Tue Dec 21, 2004 9:29 pm
by ray.wurlod
DSJ.STAGELASTERR is a constant, whose value is 2.
It is meant to be used as the second argument of the DSGetStageInfo function when you want to determine whether there was any error in executing the stage.

Code: Select all

LastError = DSGetStageInfo(hJob, StageName, DSJ.STAGELASTERR)
hJob is a job handle obtained from an earlier call to DSAttachJob, or can be DSJ.ME if executed in the current job.

StageName is the name of the active stage about which you want information, or can be DSJ.ME if the call is executed within the stage.

DSGetStageInfo will return a negative integer if there is any problem with its own execution.
The -7 is an error code DSJE.BADSTAGE, which means that the spelling or casing of the stage name is incorrect, or that the stage name specified simply does not exist as an active stage in the job design.

Posted: Tue Dec 21, 2004 10:30 pm
by anilkona
Thanks for the info. I figured out the problem. I had a typo in Stage name.

Thanks,