DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
gayathrisivakumar



Group memberships:
Premium Members

Joined: 17 Dec 2009
Posts: 60

Points: 589

Post Posted: Thu May 18, 2017 8:42 am Reply with quote    Back to top    

DataStage® Release: 9x
Job Type: Parallel
OS: Unix
Hi All,

I have source query that needs to be run for multiple date values.There are 2 date fields that will keep changing.

I need to find certain accounts that changed since 2016-01-01 to 2017-05-31 now (When we enter June that becomes 2016-01-01 to 2017-06-30. So the date range changes every month)
My requirement is to execute the query first for 2016-01-01 to 2016-01-31, then second instance for 2016-02-01 to 2016-02-29, then March etc. So in a single run of the job multiple instances needs to be executed.How can I provide all these dates as multiple inputs?

Thanks
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 42108
Location: Denver, CO
Points: 216151

Post Posted: Thu May 18, 2017 9:34 am Reply with quote    Back to top    

It only needs to be multi-instance is they all need to run at the same time. Your need sounds like a Sequence job looping a normal job to me.

_________________
-craig

Can't keep my eyes from the circling skies
Tongue tied and twisted just an earth bound misfit, I
Rate this response:  
UCDI



Group memberships:
Premium Members

Joined: 21 Mar 2016
Posts: 252

Points: 2537

Post Posted: Thu May 18, 2017 10:26 am Reply with quote    Back to top    

you could do it either way... you could make it multi-instance and fire it off N times with N different parameters. You could loop. The loop sounds like the right way to go here, but both would work if you had a good reason to do one or the other design. Multi instance gets into problems with writing to the same target in parallel (locks, etc) for a task like this one. Where MI seems to shine is a totally reusable job that has varying targets and sources.
Rate this response:  
PaulVL



Group memberships:
Premium Members

Joined: 17 Dec 2010
Posts: 1130

Points: 7490

Post Posted: Thu May 18, 2017 11:14 am Reply with quote    Back to top    

Since you are interacting with a database, you also need to understand the impact you will have there. Not knowing the complexity of the SQL you are performing we can't say if running them at the same time is prudent. Assuming you at some point you would be running 12 iterations of the job.

I would vote to run them sequentially just because of the database factor.
Rate this response:  
FranklinE



Group memberships:
Premium Members

Joined: 25 Nov 2008
Posts: 605
Location: Malvern, PA
Points: 5737

Post Posted: Thu May 18, 2017 2:02 pm Reply with quote    Back to top    

Even if running sequentially in a loop, multi-instance makes sense for the invocation id. I have a job that runs the same Px for ftp mutlitple times, reading a list for each subsequent file name. Reading the log in Director is very much easier because I label each run in the invocation id with the numeric instance of the loop.

_________________
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: http://www.dsxchange.com/viewtopic.php?t=143596
Rate this response:  
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours