Accesing Variables in Sequences

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
sgubba
Participant
Posts: 30
Joined: Wed Apr 16, 2008 11:06 am

Accesing Variables in Sequences

Post by sgubba »

I want to check if there is a method where you read a value from Oracle Table and pass that value on Sequencer
I know i can do this by having a job which reads from oracle table writes to a file and then read that file using read file stage and then use that value in sequencer......
To give my scenario... I have to generate a batch id which increment on each run ........I am planning to use a table which just holds a value and increments after each run ....I want to know if we I can directly read from the table and pass on the batch id variable in all my datastage jobs

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

Post by ray.wurlod »

My preferred technique is to have a server job read the value and store the value in the job's user status area. This can be accessed as the Job activity's $UserStatus activity variable.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Use a Server job and put the id into the job's USERSTATUS area for easy access. Search here for DSSetUserStatus for examples of the wrapper routine you'll need for that.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply