Value of Job-Handle

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
kausmone
Participant
Posts: 39
Joined: Fri Sep 21, 2007 1:47 am
Location: Prague

Value of Job-Handle

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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
-craig

"You can never have too many knives" -- Logan Nine Fingers
kausmone
Participant
Posts: 39
Joined: Fri Sep 21, 2007 1:47 am
Location: Prague

Post 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
Post Reply