Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Verify DB2 table continuesly

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Verify DB2 table continuesly
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Tue Apr 07, 2009 2:32 pm    Post subject: Reply to: Verify DB2 table continuesly
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    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10274
Location: italy

PostPosted: Tue Apr 07, 2009 2:45 pm    Post subject: Reply to: Verify DB2 table continuesly
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    Post subject:
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: 1232
Location: Israel

PostPosted: Tue Apr 07, 2009 3:42 pm    Post subject: Re: Verify DB2 table continuesly
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us