DSWaitForJobList

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
freef1yer
Participant
Posts: 12
Joined: Thu Sep 25, 2003 3:01 am
Location: London
Contact:

DSWaitForJobList

Post by freef1yer »

Hi Everyone

I've been having some trouble trying to get the DSWaitForJobList function working, which results in the following error:

Code: Select all

0610    Return Value = DSWaitForJobList("Add", singleStreamJob, 1);
               ^
Variable Name (UNDEFINED) unexpected, Was expecting: ';', End of Line
The documentation suggests that the second argument of the function (singleStreamJob above) should be a handle, but gives an example of it quoted as a string, as follows:
rtn$ = DSWaitForJobList("Add","Function Err",1)
Does anyone have experience of using this?

Thanks

Dave
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

If your code example is literally what you are trying to run, the problem is the whitespace in your variable name. Try it using "ReturnValue" instead of "Return Value" and you should be ok... or at least more ok.
-craig

"You can never have too many knives" -- Logan Nine Fingers
freef1yer
Participant
Posts: 12
Joined: Thu Sep 25, 2003 3:01 am
Location: London
Contact:

Post by freef1yer »

Doh! Sorry...... abstracted it a bit and managed to put another bug in.

The real error is this.....

Code: Select all

0611    ReturnValue = DSWaitForJobList("Add", singleStreamJob, 1)
                                                          ^
',' unexpected, Was expecting: '!', ')', '=', "AND", "OR", "LT", "LE", 
"GT", "GE", "NE", "EQ", "MATCH"
Array 'DSWaitForJobList' never dimensioned.
Thanks

Dave
ogmios
Participant
Posts: 659
Joined: Tue Mar 11, 2003 3:40 pm

Post by ogmios »

Where do you find DSWaitForJobList in the documentation? I find DSWaitForJob but not the one you use. From the error message I would think DataStage does not think the DSWaitForJobList exists as well.

Ogmios
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

That was a new one on me, too. Found it in the BASIC reference. Not sure how to utilize it... all I've managed to do so far is duplicate the original problem. :(
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

"Array never dimensioned" errors usually mean that you've forgotten to include a DEFFUN declaration for a function.

When the compiler encounters an identifier followed by a left parenthesis it assumes - because it's not been informed that the identifier is a function name - that the identifier is the name of a dimensioned array, it then checks through it's list of array structures and fails to find the DIMENSION statement.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I've just checked on a DataStage version 5.2 system. There is no supplied DSWaitForJobList function here.

Therefore, if you do have it, and it's compiled, it's in the "user written functions" part of the repository, so your DEFFUN declaration must refer to "DSU.DSWaitForJobList".

Code: Select all

DEFFUN DSWaitForJobList(Arg1,Arg2,Arg3) CALLING "DSU.DSWaitForJobList"
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
freef1yer
Participant
Posts: 12
Joined: Thu Sep 25, 2003 3:01 am
Location: London
Contact:

Post by freef1yer »

Thanks for the input guys.

This isn't a user-written function, it's a supplied function I found in the documentation, but which apparently doesn't exist (thanks Ray for confirming that).

FYI The documentation I found it in is online help on DataStage 5.2.2.

Thanks

Dave
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

It's even there for DS 5.2.1 (in on-line help), so maybe it's an intrinsic function for job sequences. I'll have to do more investigation.
However, re-reading your error message, the caret isn't under the DSWaitForJobList token, so it's probably not that.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply