IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Verify DB2 table continuesly


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karisurya

New User


Joined: 02 Aug 2007
Posts: 64
Location: Bangalore

PostPosted: Tue Apr 07, 2009 2:20 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Apr 07, 2009 2:32 pm
Reply with quote

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
View user's profile Send private message
karisurya

New User


Joined: 02 Aug 2007
Posts: 64
Location: Bangalore

PostPosted: Tue Apr 07, 2009 2:39 pm
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Apr 07, 2009 2:45 pm
Reply with quote

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
View user's profile Send private message
karisurya

New User


Joined: 02 Aug 2007
Posts: 64
Location: Bangalore

PostPosted: Tue Apr 07, 2009 2:51 pm
Reply with quote

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
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Tue Apr 07, 2009 3:42 pm
Reply with quote

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
View user's profile Send private message
karisurya

New User


Joined: 02 Aug 2007
Posts: 64
Location: Bangalore

PostPosted: Tue Apr 07, 2009 4:04 pm
Reply with quote

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
View user's profile Send private message
shanuss

New User


Joined: 16 Jul 2008
Posts: 17
Location: Chennai

PostPosted: Wed Apr 15, 2009 8:12 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Multiple table unload using INZUTILB DB2 2
No new posts Check data with Exception Table DB2 0
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top