Page 1 of 1

Passing Parameter from Job A To job B

Posted: Fri Oct 19, 2012 1:13 am
by daniele
Hi all,
I have n job,
can you show step by step the passing parameter from Job A To job B

Thanks

Posted: Fri Oct 19, 2012 3:24 am
by bhasds
Hi daniele,

This may be possible through job sequence-

1. In after job subroutine of JobA, echo #param1# #param2# #param3# etc > paramfile.
2.In Job sequence after JobA take an execute command and cat the paramfile.
3.In JobB activity read each parameter from execute command output through field function.
Eg. Param1 Field(ExecuteCommandOutput,"|",1)
Param2 Field(ExecuteCommandOutput,"|",2)
Please let me know if this works fine.

Posted: Fri Oct 19, 2012 3:54 am
by daniele
can I write the parameters in file directly in job with transformer ? instead use subroutine ?
otherwise can you explain how can I do subrouitine

Posted: Fri Oct 19, 2012 4:10 am
by bhasds
You can call the parameters in the output derivation of transformer or in job properties genearl tab, go to after job subroutine, choose ExecSh and echo "#param1# #param2# #param3# etc" > pathname/paramfile

Posted: Fri Oct 19, 2012 4:58 am
by daniele
I have 3 job (A,B,C)

job A: key generator (IdA) -> Transforme->ORA_A (In Ora_A I insert IdA)

job B: Source File + Key generator (IdB)->Transformer->ORA_B (In Ora_ B I insert IdA + IdB +SourceFile)

Job C: same think

Posted: Fri Oct 19, 2012 5:06 am
by bhasds
So what problem you are facing now to implement the logic? put this 3 jobs in job sequence.

JobA
|
|
ExecuteCommandAcitivity
|
|
JobB
|
|
JobC

And implement what I have already told in the previous post.

Posted: Fri Oct 19, 2012 5:12 am
by daniele
ok , Thanks a lot