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

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
I_Server_Whale
Premium Member
Premium Member
Posts: 1255
Joined: Wed Feb 02, 2005 11:54 am
Location: United States of America

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

Post 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.
Anything that won't sell, I don't want to invent. Its sale is proof of utility, and utility is success.
Author: Thomas A. Edison 1847-1931, American Inventor, Entrepreneur, Founder of GE
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

You can work with DSSetUserStatus() and DSGetUserStatus(). In PX jobs they can be set as part of the before/after job routines.
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

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