Passing Parameters from one server job to another in runtime

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
Arthur
Participant
Posts: 18
Joined: Thu Oct 11, 2007 4:12 am

Passing Parameters from one server job to another in runtime

Post by Arthur »

Hi! All

I am having 2 server job.
In 1 server job i defined parameters like prev_Year, Month, Week, count.
After successful execution of this sevrer job those parameters will hold values.
I want to pass those parameters values prev_Year, Month, Week, count to the 2nd server job.

How to acheive, pls...guide me.

Thanks in Advance.
--ArThUr
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Passing Parameters from one server job to another in run

Post by sachin1 »

hello please let us know where have your parameters like prev_Year, Month, Week, count, been stored, in sequential file or database.
Arthur
Participant
Posts: 18
Joined: Thu Oct 11, 2007 4:12 am

Post by Arthur »

Hi! I defined parameters like DtEffec, ct in job properties. Laterly Source ODBC Stage through user-defined SQL statements Select #DtEffec#=(max(D_dt) -1 ) from TableA where D_dt <= getdate() ..those parameters will be populated.
--ArThUr
Alokby
Premium Member
Premium Member
Posts: 9
Joined: Wed Sep 15, 2004 7:27 am

Post by Alokby »

There are many ways to do this and it depends on your design:

The method I used to implement this is in unix:
1) Use dsjob in a script to run the first job and write the parms to a parms file.
2) In a UNIX script, source the parms from the parm file, use dsjob to run the second and pass the parms via the dsjob.

Second method is to write the parms to a hash file and use the sequencer(UserVariables_Activity) to read the hash file. and pass the parms to the second job.
Post Reply