Page 1 of 1

Setting a return code in a PX job and accessing it in a seq.

Posted: Wed Nov 05, 2008 1:07 am
by I_Server_Whale
Hi Folks,

Is there a way to set a return code in a PX job based on a condition and then access this return code in the job sequence to branch control of the sequence?

Your inputs are greatly appreciated!!!

Whale.

Posted: Wed Nov 05, 2008 3:22 am
by ArndW
You can work with DSSetUserStatus() and DSGetUserStatus(). In PX jobs they can be set as part of the before/after job routines.

Posted: Wed Nov 05, 2008 7:07 am
by Mike
This is the technique that I use when I have "data" that is discovered inside of a PX job that needs to be passed to another job:

1) In the PX job, write the "data" out to a simple flat file as a simple string. If there are multiple "data" items, write a delimited string.
2) Use a command activity in a job sequence to "cat" the contents of the sequential file.
3) Use the Field function in the derivation of a downstream activity stage to parse the command output from the command activity.

ArndW,
I'm interested in your technique using DSSetUserStatus(). How would I access data inside the PX job from an after job routine?

Thanks,
Mike