Problem with DSGetStageInfo

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
Sanket_Saraph
Participant
Posts: 20
Joined: Tue Jun 13, 2006 5:16 am
Location: Pune

Problem with DSGetStageInfo

Post 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...
SANKET SARAPH
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You need to add this line to the beginning of your code:

Code: Select all

   $INCLUDE DSINCLUDE JOBCONTROL.H
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

JOBCONTROL.H contains a list of possible values returned by each of the DataStage API functions.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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.
Sanket_Saraph
Participant
Posts: 20
Joined: Tue Jun 13, 2006 5:16 am
Location: Pune

Post 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...
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post 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)
Last edited by ArndW on Tue Nov 14, 2006 8:08 am, edited 1 time in total.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Ah yes... the dreaded 'negative cool' error. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

I fixed it -8).
Post Reply