check error starting master sequence

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
lory
Participant
Posts: 21
Joined: Tue Apr 13, 2004 9:05 am

check error starting master sequence

Post by lory »

I have a master sequence with several child sequences. These child sequences run other
child sequences.
How can I check error or warning with a unix shell starting by master sequence?

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

Post by ray.wurlod »

Build error checking into every sequence. A parent sequence can check it's child processes' exit status. You can use a custom trigger based on exit status, or you can use a Command or Routine activity to capture the status.
It's very difficult to do from the operating system, because you need to be able to determine the pid of the master process then of its children, then of their children and so on, but mainly because the DataStage status is not the same as the exit status of the executing process. The executing process will typically finish with an exit status of zero, even though the job aborted; this is not a UNIX issue; the abort condition is logged and, depending on the argument to DSAttachJob(), propagated to the parent process.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
lory
Participant
Posts: 21
Joined: Tue Apr 13, 2004 9:05 am

Post by lory »

"the abort condition is logged and, depending on the argument to DSAttachJob(), propagated to the parent process...."

Could you explain better?

I'm very new to datastage! :(
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Read the on-line help about DSAttachJob(). Its second argument determines whether, if the controlled job aborts:
(a) the controller aborts
(b) the controller logs a warning but keeps going
(c) the controller keeps going without logging anything

Automatically-generated job control code chooses option (a), while job sequences choose option (c). Inspect the code that is generated by compiling the job sequence, and find an occurrence of DSAttachJob() to see what I mean.
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