Pass Parameters by Reference not by Value

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
mark1024
Participant
Posts: 9
Joined: Mon Nov 07, 2011 12:23 pm

Pass Parameters by Reference not by Value

Post 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
Mark THomas
Data Architect
IBM GBS
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
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 »

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?
-craig

"You can never have too many knives" -- Logan Nine Fingers
mark1024
Participant
Posts: 9
Joined: Mon Nov 07, 2011 12:23 pm

Post 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.
Mark THomas
Data Architect
IBM GBS
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post 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),
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Post Reply