Output values of one job used as Parameter values in another

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

DS_MJ
Participant
Posts: 157
Joined: Wed Feb 02, 2005 10:00 am

Post by DS_MJ »

DSguru2B wrote:Job5 is not able to pickup the parameters because it is not in the format that it requires. It should be pipe delimited. Gateleys provided you with the correct format.
gateleys wrote: Notice that you must create and string to define all your parameter as :

" Paremeter = value | parameter2 = value | paramenter3 = value | ...| ParamenterN = ValueN"
In order to bring your parameters in that format, you have to use the command that gateleys provided

Code: Select all

UtilityRunJob('Job5',"Par1=":C1:"|Par2=":C2, 0,0) 
But my data is not seperated via "|" but rather "space". When I put a pipe the job fails.

JOB2 (fatal error from DSSetParam): Job control fatal error (-3)
(DSGetParamInfo) Parameter ' COL_B' not found in JOB5

When I dont put a "|" it runs and in the dummy file get to view the data as follows:

JOB5=3?JOB5?2006-05-15 15:43:12?2006-05-15 15:43:13?Xfm.Src?Xfm.ViewData?0?0
Thanks in advance,
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

From the error it looks like you have not defined the parameter COL_B.
Make sure you are hardcoding the correct parameter names when you call the UtilityRunJob().
Try this

Code: Select all

UtilityRunJob('Job5',"Col_Dt=":C1:"|Col_Tm=":C2, 0,0)
Where C1 is the value from columnA and C2 is the value from ColumnB.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
mab_arif16
Charter Member
Charter Member
Posts: 87
Joined: Sat Mar 18, 2006 11:45 pm

Post by mab_arif16 »

DSguru2B wrote:Job5 is not able to pickup the parameters because it is not in the format that it requires. It should be pipe delimited. Gateleys provided you with the correct format.
gateleys wrote: Notice that you must create and string to define all your parameter as :

" Paremeter = value | parameter2 = value | paramenter3 = value | ...| ParamenterN = ValueN"
In order to bring your parameters in that format, you have to use the command that gateleys provided

Code: Select all

UtilityRunJob('Job5',"Par1=":C1:"|Par2=":C2, 0,0) 
Can this same thing be done in parallel job,or there there some other way to do it in parallel
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

Hi Abdul,

Yes you can use UtilityJobRun transform function for parallel job too orelse as suggested by DSGURU2B you can pass these values through the unix script.

Thanks
Sam
mab_arif16
Charter Member
Charter Member
Posts: 87
Joined: Sat Mar 18, 2006 11:45 pm

Post by mab_arif16 »

us1aslam1us wrote:Hi Abdul,

Yes you can use UtilityJobRun transform function for parallel job too orelse as suggested by DSGURU2B you can pass these values through the unix script.

Thanks
Sam
I dont see the UtilityJobRun transform function in the transformer stage ,it is in user variable activity stage ,but dont know how to pass teh parameters from sequential file.
us1aslam1us
Charter Member
Charter Member
Posts: 822
Joined: Sat Sep 17, 2005 5:25 pm
Location: USA

Post by us1aslam1us »

That will be in the Basic transformer.

Thanks
Sam
Post Reply