passing parameters in between stages of a sequence

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
stivazzi
Participant
Posts: 52
Joined: Tue May 02, 2006 3:53 am

passing parameters in between stages of a sequence

Post by stivazzi »

Good morning. i have a server job, writing to oracle tables.
if a record is rejected, i send mail using DSSendMailTester(), and set the error variable in the userStatus with setUserStatus()...
in the sequence job, i get the userStatus and pass it to a new server job, because i want to get the userStatus's value and write log to the db...
now the situation is: new job, with a variable with errorLog value... how can i get that variable and write it to db?

thanks a lot
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

That variable will be passed as an Parameter to the next job. You can make you of the parameter in transformer stage or even in you DB stage to write in to table.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

Put in the transformer's derivation (as a job parameter) for the column of the db where you want it finally. That's all about it.
Success consists of getting up just one more time than you fall.
stivazzi
Participant
Posts: 52
Joined: Tue May 02, 2006 3:53 am

Post by stivazzi »

ok... that was what i thought... but... the new server job... can not have just transformer and oci stage...
should have something before transformer.... what?
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

Even it can be without having any source, just need to put one stage variable and a constraint to the output link so that it runs atleast once.

Try it.
Success consists of getting up just one more time than you fall.
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

It is possible to have a job which has a transform stage as the source. You need to define at least one stage variable and also put a constraint on the output so that the job finishes. But this is exactly what you are trying to do - write just one record to your database with the value of the parameter.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

The simple solution as been shared. If you are not comfortable, you can aslo have another DS stage with user defined query as "SELECT #PARAMETER# from DUAL"; and pass this value to the consecutive DB stage.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Using a User Variables activity upstream of these other activities is an erudite manner in which to expose the values to those other activities in a consistent and easily-maintained way.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply