Possible Values for DSJ.STAGELASTERR

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
anilkona
Participant
Posts: 50
Joined: Mon Nov 15, 2004 6:18 pm

Possible Values for DSJ.STAGELASTERR

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

Post 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.
Last edited by ray.wurlod on Tue Dec 21, 2004 11:12 pm, edited 1 time in total.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
anilkona
Participant
Posts: 50
Joined: Mon Nov 15, 2004 6:18 pm

Post by anilkona »

Thanks for the info. I figured out the problem. I had a typo in Stage name.

Thanks,
Post Reply