Passing Parameter from Job A To job B

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
daniele
Participant
Posts: 14
Joined: Fri Oct 12, 2012 12:23 am

Passing Parameter from Job A To job B

Post by daniele »

Hi all,
I have n job,
can you show step by step the passing parameter from Job A To job B

Thanks
bhasds
Participant
Posts: 79
Joined: Thu May 27, 2010 1:49 am

Post 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.
daniele
Participant
Posts: 14
Joined: Fri Oct 12, 2012 12:23 am

Post 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
bhasds
Participant
Posts: 79
Joined: Thu May 27, 2010 1:49 am

Post 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
daniele
Participant
Posts: 14
Joined: Fri Oct 12, 2012 12:23 am

Post 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
bhasds
Participant
Posts: 79
Joined: Thu May 27, 2010 1:49 am

Post 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.
daniele
Participant
Posts: 14
Joined: Fri Oct 12, 2012 12:23 am

Post by daniele »

ok , Thanks a lot
Post Reply