Scheduling based on Database value

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
edsxpedx
Premium Member
Premium Member
Posts: 16
Joined: Mon Sep 24, 2007 12:01 pm

Scheduling based on Database value

Post by edsxpedx »

Jobs need to be run(monthly/Weekly) based on the value of database.
I want to automate this piece. EX: There is a vendor table.. In RUNONLY column we have two values Monthly and Weekly. Based on that we have to schedule our jobs at VENDOR level.

Your suggestions are appreciate.

Thanks
Venu
sachin1
Participant
Posts: 325
Joined: Wed May 30, 2007 7:42 am
Location: india

Re: Scheduling based on Database value

Post by sachin1 »

Please let us know how are you sheduling job, sequencer or through basic code in Job Control.

In first case we can check values using routine activity stage.

in second cases we can find out value in database and call DSRunJob function.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Please be more precise about weekly and monthly. Is this on a specific day (e.g. weekday for weekly, month date for monthly)? Do you want to run something every day that determines whether the job runs or not?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
edsxpedx
Premium Member
Premium Member
Posts: 16
Joined: Mon Sep 24, 2007 12:01 pm

Post by edsxpedx »

Running jobs on specific days only. Weekly - Monday, Monthly - 6th day of every month
edsxpedx
Premium Member
Premium Member
Posts: 16
Joined: Mon Sep 24, 2007 12:01 pm

Re: Scheduling based on Database value

Post by edsxpedx »

sachin1 wrote:Please let us know how are you sheduling job, sequencer or through basic code in Job Control.
function.
Scheduling by using Sequence jobs only
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The job sequence needs to run daily. If it's Monday (Iconv(Date(),"DWA") = "Monday") it runs the weekly job. If it's the 6th (@DAY = 6) it runs the monthly job. You can add additional activities to retrieve the database value, of course.
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