Page 1 of 1

Value of Job-Handle

Posted: Thu Sep 27, 2007 3:41 am
by kausmone
Hello,

Is 0 (zero) ever returned as a valid job-handle by the DSAttachJob function? I have always seen a non-zero integer so far, but just wanted to confirm...

Thanks,
Kaustubh

Posted: Thu Sep 27, 2007 7:27 am
by chulett
Welcome! :D

No, zero is not a valid handle value. I present this slightly edited piece of DataStage generated job control code as evidence of that assertion:

Code: Select all

hJob1 = DSAttachJob("XXXX", DSJ.ERRFATAL)
If Not (hJob1) Then
  Call DSLogFatal("Job Attached Failed")
  Abort
End

Posted: Thu Sep 27, 2007 7:39 am
by kausmone
Thanks for the welcome, Craig... and for the confirmation :)

I am storing job-handles in an array, wherever an empty array-element exists, so wanted to confirm if I can use 0 to identify an empty slot

kaus