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
 

 

Updating Db2 tables in succession

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
deeptik

New User


Joined: 21 Mar 2006
Posts: 8

PostPosted: Fri Jul 10, 2009 10:30 am    Post subject: Updating Db2 tables in succession
Reply with quote

Hi,

There is a table T1. For each row of T1, I need to update tables T2, T3 and T4 in succession i.e if T2 update is successful, then update T3 and if T3 successful then T4 and so on. What is the shortest way to implement this logic in cobol db2 program.

thanks.
Back to top
View user's profile Send private message

bipinpeter

Active User


Joined: 18 Jun 2007
Posts: 208
Location: Cochin/Kerala/India

PostPosted: Fri Jul 10, 2009 10:40 am    Post subject:
Reply with quote

Hi deeptik,
I dont know it is the correct answer.sometimes i saw that if i insert a row in to one table the corresponding row will insert in to its child table automatically.I think if you check in the referential integrity topic .May be you will get something.
Excuse me if i'm wrong.
Back to top
View user's profile Send private message
deeptik

New User


Joined: 21 Mar 2006
Posts: 8

PostPosted: Fri Jul 10, 2009 11:56 am    Post subject:
Reply with quote

Ok, but here the requirement is to update other tables and not insert..
Back to top
View user's profile Send private message
anandinmainframe

Active User


Joined: 31 May 2007
Posts: 171
Location: India

PostPosted: Fri Jul 10, 2009 12:45 pm    Post subject: Reply to: Updating Db2 tables in succession
Reply with quote

Hi deeptik,
Just update the next(through basic perform) if the sqlcode is 0.
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts To know activities on db2 tables ashek15 DB2 4 Fri Mar 03, 2017 11:23 pm
No new posts ERM-Diagram of SysIBM-Catalog-Tables Auryn DB2 2 Fri Feb 17, 2017 6:22 pm
No new posts Updating the counters after eliminati... PANDU1 DFSORT/ICETOOL 12 Mon Nov 21, 2016 9:47 am


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