View previous topic :: View next topic
|
Author |
Message |
karisurya
New User
Joined: 02 Aug 2007 Posts: 64 Location: Bangalore
|
|
|
|
Hi,
I have a continues running job which will sink 2 Applications and updated time stamp in common table. When time stamp is same for both applications in that table (Presently i have to do a manual check), i need to run another job which will terminate the continues running job.
I am taking the following approach to do this checking automatically, I created a SPUFI JCL which will extract data and create a seq. file from DB2 table only if the time stamp matches for both applications. In rexx i will submit the above spufi job and check the seq. file and continue this process until there is data in this file.Once i see data in seq file job which will do the termination of 1st job.
Can Please check and let me know is this correct approach and please let me know just in case if any of you have any other good alternatives to this problem.
eg:
JOB1 - Continuesly running job and update DB2 table for application say ABCD,EFGH (Application name is primary key)
Verification - Check time stamp of ABCD and EFGH and if both are equal submit JOB2
JOB2 - Terminate JOB1
Please let me know in case if you have any questions.
Thanks,
Surya |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
if it crucial not to have duplicated timestamp
then the best thing to do is to discover it as soon as it happens
review the application design to act on it ,
the way You approached it puts too much delay between the events
what happens for duplicates?? |
|
Back to top |
|
|
karisurya
New User
Joined: 02 Aug 2007 Posts: 64 Location: Bangalore
|
|
|
|
Thank you for your quick response,
There wont be any duplicates, lets say ABCD and EFGH 2 applications, JOB1 continuesly updated time stamp for both applications and once both time stamps are equal JOB1 wont process any thing it will still be running till JOB2 manually terminates it. i.e., basically when time stamp is equal for both applications JOB1 wont do any thing.
I hope i answered your questions, let me know if you need any further info.
Thanks,
Surya |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
basically when time stamp is equal for both applications JOB1 wont do any thing.
|
if JOB1 can discover the event why not exit/terminate itself ?? |
|
Back to top |
|
|
karisurya
New User
Joined: 02 Aug 2007 Posts: 64 Location: Bangalore
|
|
|
|
I am not suppose to touch JOB1 its a existing JOB and this process they are following from long time, I am just checking if i can do automation with out toucing the existing jobs. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
karisurya wrote: |
In rexx i will submit the above spufi job and check the seq. file |
Why can't the rexx program fetch the data directly from DB2 ? |
|
Back to top |
|
|
karisurya
New User
Joined: 02 Aug 2007 Posts: 64 Location: Bangalore
|
|
|
|
Hi Marso,
Thank you for your response,Yes initially i thought of that but i am not comfortable calling DB2 in rexx. Before trying DB2+REXX i am trying toe to find what are all the options available to me.
Thanks,
Surya |
|
Back to top |
|
|
shanuss
New User
Joined: 16 Jul 2008 Posts: 17 Location: Chennai
|
|
|
|
Let me throw some idea.....
There is something called trigger in DB2. You can create a trigger for the UPDATE which (may be able to)can send a alert to scheduler to submit JOB2 when your condition is met. Please somebody help on implementation perspective. |
|
Back to top |
|
|
|