Page 1 of 1

Using Stage variables in After Stage job

Posted: Sat Jul 17, 2004 2:46 pm
by dwscblr
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?

Posted: Sat Jul 17, 2004 3:55 pm
by chulett
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:

Posted: Sat Jul 17, 2004 4:06 pm
by kduke
There are utility to read and write to hash files. I would always use these. Hash files exist between jobs, stages or whatever.