Page 1 of 1

Passing value from buildop back to job

Posted: Thu Apr 28, 2011 1:36 am
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

Posted: Thu Apr 28, 2011 1:42 am
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?

Re: Passing value from buildop back to job

Posted: Thu Apr 28, 2011 2:00 am
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 ..........

Posted: Thu Apr 28, 2011 5:03 pm
by ray.wurlod
A second output, perhaps?