Page 1 of 1

Problem with DSGetStageInfo

Posted: Mon Nov 13, 2006 5:18 am
by Sanket_Saraph
Hi DS Gurus,

1.
I want to write a server routine in which want to know the stage status,
which name is passed as parameter to routine.

The routine contains following code,

Ans = DSGetStageInfo(DSJ.ME, StageName, DSJ.STAGESTATUS).

But when I compile the above routine I get following error:

Compiling: Source = 'DSU_BP/DSU.TestStageStatus', Object = 'DSU_BP.O/DSU.TestStageStatus'

0002 Ans = DSGetStageInfo(DSJ.ME, StageName, DSJ.STAGESTATUS)
^
',' unexpected, Was expecting: '!', ')', '=', "AND", "OR", "LT", "LE",
"GT", "GE", "NE", "EQ", "MATCH"
Array 'DSGetStageInfo' never dimensioned.
WARNING: Variable 'DSJ.ME' never assigned a value.

2 Errors detected, No Object Code Produced.

2.
When I try to write above code in the job control the I get the stage status as 8.
Can anybody tell me where I can get the meaning of status code?

Thanks,
Sanket...

Posted: Mon Nov 13, 2006 5:24 am
by ArndW
You need to add this line to the beginning of your code:

Code: Select all

   $INCLUDE DSINCLUDE JOBCONTROL.H

Posted: Mon Nov 13, 2006 7:43 am
by ray.wurlod
JOBCONTROL.H contains a list of possible values returned by each of the DataStage API functions.

Posted: Mon Nov 13, 2006 8:01 am
by ArndW
The file also contains the requisite

Code: Select all

 Deffun DSGetStageInfo(JobHandle, StageName, InfoType)
statement which was missing in the original code so that the program takes DSGetStageInfo as a routine and not an array.

Posted: Tue Nov 14, 2006 7:34 am
by Sanket_Saraph
Thanks a lot for your replies.

The code is working fine now, but as I mentioned it is returning the numeric values like 8, -7.
I am not able to get the meaning of these codes.
So any upgradation on this front?

Thanks in advance,
Sanket...

Posted: Tue Nov 14, 2006 7:46 am
by ArndW
You need to check for the other possible return values, as documented in the routine. These are DSJE.NOTINSTAGE and/or DSJE.BADSTAGE (which happen to be error codes -7 and -8)

Posted: Tue Nov 14, 2006 8:07 am
by chulett
Ah yes... the dreaded 'negative cool' error. :wink:

Posted: Tue Nov 14, 2006 8:09 am
by ArndW
I fixed it -8).