Passing value from buildop back to job

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
thompsonp
Premium Member
Premium Member
Posts: 205
Joined: Tue Mar 01, 2005 8:41 am

Passing value from buildop back to job

Post by thompsonp »

I have some PX jobs that use a buildop as part of their reconciliation and error handling in conjunction with before and after job subroutines.

The buildop has the required information to detect specific conditions which we now want to affect the status of the job (and ultimately whether the next job in the sequence should run or not).

I could get the buildop to write a file if the condition occurs and then test for this file in the after job subroutine but this is not very elegant.
Is there any way for a buildop to pass a value or status back to the job that we can then detect in an after job subroutine and take appropriate action. I don't want the buildop to cause the job to abort immediately as this would prevent all the data being validated.

There may be more than one instance of the buildop in a single job so potentially we need each to pass back a value to the job (in the post loop).

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

Post by ray.wurlod »

A Build stage can transfer rows to its output. That is what it does. Perhaps you can put a special value onto one field on the output?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
blewip
Participant
Posts: 81
Joined: Wed Nov 10, 2004 10:55 am
Location: London

Re: Passing value from buildop back to job

Post by blewip »

thompsonp wrote:I have some PX jobs that use a buildop as part of their reconciliation and error handling in conjunction with before and after job subroutines.
Get the BuildOp to output to a link only if the condition is met. The link could do nothing, possibly connected to a peek.

Then from the after job routines check of the link has a row count greater than 0.

LinkCountBuildOp= DSGetLinkInfo(DSJ.ME, BuildOpName, LinkName, DSJ.LINKROWCOUNT)
if LinkCountBuildOp>0 ..........
Modern Life is Rubbish - Blur
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A second output, perhaps?
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