Using Stage variables in After Stage job
Moderators: chulett, rschirm, roy
Using Stage variables in After Stage job
Is it possible to pass stage variables used in a Transformer Stage as a parameter to the shell script I am calling in the After Stage job? If not, are there any alternatives?
Hmmm... no. Or at least not directly. A couple of alternatives off the top of my head:
Pass the Stage Variable out of the job using DSSetUserStatus. Write a routine to 'wrapper' the call to the function and other to execute your shell script and have the value it needs passed in as an argument. Use a Sequencer job to automate the connection between the two - a Job Activity stage and then a Routine Activity stage that takes its input argument from the $UserStatus area of the previous job. I generally like this more 'modular' approach, each piece can be tested (and run) seperately if desired. More restartable that way, too.
You could also look into the @USER0 thru @USER4 system variables. Values can be 'parked' there and then picked up in later routines. You'd still need your routine, but it could be run after job.
I'm sure there are other ways.![Wink :wink:](./images/smilies/icon_wink.gif)
Pass the Stage Variable out of the job using DSSetUserStatus. Write a routine to 'wrapper' the call to the function and other to execute your shell script and have the value it needs passed in as an argument. Use a Sequencer job to automate the connection between the two - a Job Activity stage and then a Routine Activity stage that takes its input argument from the $UserStatus area of the previous job. I generally like this more 'modular' approach, each piece can be tested (and run) seperately if desired. More restartable that way, too.
You could also look into the @USER0 thru @USER4 system variables. Values can be 'parked' there and then picked up in later routines. You'd still need your routine, but it could be run after job.
I'm sure there are other ways.
![Wink :wink:](./images/smilies/icon_wink.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers