Page 1 of 1

Pass Parameters by Reference not by Value

Posted: Tue Dec 13, 2011 3:49 pm
by mark1024
I would like to pass a Job Parameter from a Sequence to a DataStage Job
and have the Job change the Parameter value.

I have tired setting the Job Paremeter to a different value in a TXFM stage.
but when my seqence calls the next Job, the Job Parameter remains the same.

Hence, how do you pass by Reference with out going to the OS
and Unix system file? Yea, I can always create a file sitting out there
but would rather not. Sticky to run multiple instances of the job when you do stuff like that

Posted: Tue Dec 13, 2011 7:14 pm
by ray.wurlod
Welcome aboard.

Job parameter values are read when the job starts and can not be changed while the job is running.

You may be able to do something with environment variables, but beware that environment variable value changes in a child process are not available (and are not passed back to) the parent process.

Posted: Tue Dec 13, 2011 10:25 pm
by chulett
If we're talking Server jobs as you've marked your post, have you tried using USERSTATUS to pass (possibly modified) values back out of the job?

Posted: Fri Dec 16, 2011 11:42 am
by mark1024
chulett wrote:If we're talking Server jobs as you've marked your post, have you tried using USERSTATUS to pass (possibly modified) values back out of the job?
Yes this would appear to work, I will try it. The environment variable approach would work, but would have to be unique so jobs had their own name. Maybe IBM will enhance this in 8.7 or a later fixpack.

Posted: Sun Dec 18, 2011 1:06 am
by roy
You have the USERSTATUS As Craig Said and the UserVariable Stage that you can use to create your on the fly user variable and use it along the flow stream there after.
There is no reason to change the value of any givven parameter during the sequence run, unless you try to bring yourself to a debug nightmare situation.
IHTH( I hope This Helps),