want to the job sequence repeatedly until particular time

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
kvnbabu
Participant
Posts: 16
Joined: Fri Nov 02, 2007 1:43 am
Location: Hyderabad

want to the job sequence repeatedly until particular time

Post by kvnbabu »

I have 4 jobs and one job sequence which runs these 4 jobs. Now, my requirement is to jun the job sequnce repeatedly (looping, like once the job sequence completes running 4 jobs, the sequencer has to be kicked off immediately and run the 4 jobs again) until some time is reach.

Say I start the Job Sequnce at 4:00 AM and want to the sequence until 6:00 AM.

Could anybody guide me please?
asitagrawal
Premium Member
Premium Member
Posts: 273
Joined: Wed Oct 18, 2006 12:20 pm
Location: Porto

Post by asitagrawal »

Use the Loop stage. After finishing the last job of the sequence, check if the end time is reached ? Depending on the result, either proceed for next iteration else exit the loop.

HTH :)
Share to Learn, and Learn to Share.
asitagrawal
Premium Member
Premium Member
Posts: 273
Joined: Wed Oct 18, 2006 12:20 pm
Location: Porto

Post by asitagrawal »

Adding to my last post only..
Start the loop with a default inital value and set the "To" value to a value returned by a routine. The routine will always increment the "To" variables value.

HTH.
Share to Learn, and Learn to Share.
Ragunathan Gunasekaran
Participant
Posts: 247
Joined: Mon Jan 22, 2007 11:33 pm

Post by Ragunathan Gunasekaran »

Scheduling is done only when you determine when the seq has to be kicked off.This kind of looping will would only create a do nothing phenomenon where you loop cycles again and again.Please revamp your design ,i think this would be better
Regards
Ragu
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Do the looping in another Sequence that calls this Sequence inside the Start/End loop stages. A custom routine can exit the loop at the proper time.
-craig

"You can never have too many knives" -- Logan Nine Fingers
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Post by sachin1 »

hello dear,


1.Imagine your 4 jobs take 2 secs to run ok.

2.start your job with some time and imagine you want be in loop for 2 hours.


you have to use UserVariables_Activity,startloop,Job_Activity and EndLoop.

job design like below

UserVariables_Activity--->startloop------->Job_Activity------>EndLoop.

in UserVariables_Activity stage create 3 variables like below

New1---@time+Iconv("00:00:10", "MTS")(ex 10 secs is taken for looping, in your case take 2 hours).

New2---@time, time when job will start, just a starting time.

New3----Iconv("00:00:02", "MTS")(calculate exact time taken by your sequence which in turn runs 4 jobs).

and in start loop stage, loop from
start--New2
step---New3
To--New1

hope it helps.
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Post by PhilHibbs »

sachin1 wrote:hello dear,
1.Imagine your 4 jobs take 2 secs to run ok.
DS jobs usually take a variable length of time based on how much data they are processing. If he's checking for new files arriving, then it might take 2 seconds to find that there are no files, or half an hour if a big file drops in.
Phil Hibbs | Capgemini
Technical Consultant
Post Reply