Pass values from one job to 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

Post Reply
SonShe
Premium Member
Premium Member
Posts: 65
Joined: Mon Aug 09, 2004 1:48 pm

Pass values from one job to another

Post by SonShe »

I would appreciate if any one can please help me with the following:

I have a job where I determine 2 date values. These two dates are goin to be used in the next job. My project uses Oracle 8i as the database. I have a need to use the dates in the where clause like as under:

Select ....... from Table Where Ship_Date between Date1 and Date2.

Date1 and Date2 are being determined in the previous job. Basically it is just a SQL statement that determines these dates.

My question is how do I pass these two dates from Job1 to Job2?

Thanks.
Amos.Rosmarin
Premium Member
Premium Member
Posts: 385
Joined: Tue Oct 07, 2003 4:55 am

Post by Amos.Rosmarin »

Hi,

you can use the user status returned by the first job.

write yourself a routine that looks like this:

Code: Select all

$INCLUDE DSINCLUDE JOBCONTROL.H
Call DSSetUserStatus(Arg1)
Ans = 0
and put in it the 2 dates like you want to see it in the sql.

the 2nd job will accept as a parameter job1.$UserStatus and use it in the sql .... where x_date between #date_param#



HTH
amos
SonShe
Premium Member
Premium Member
Posts: 65
Joined: Mon Aug 09, 2004 1:48 pm

Post by SonShe »

Thank you so much.
soham296
Participant
Posts: 33
Joined: Fri Jan 13, 2006 5:13 am

Post by soham296 »

hey...can u tell me what to write in that arg1 when u wanna pass something from a output link of a transformer
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Anything you like
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply