Page 1 of 1

Accesing Variables in Sequences

Posted: Sun Feb 21, 2010 5:57 pm
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

Posted: Sun Feb 21, 2010 6:03 pm
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.

Posted: Sun Feb 21, 2010 6:04 pm
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.