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

DB2 commit


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Wed May 05, 2010 11:51 am
Reply with quote

Hi,
I have code which reads records from the file.
File is sorted on field empx Defined as:
01 EMP-NO .
05 EMPX PIC 9(6).
05 EMPAX PIC 9(6).

I have to update the 20 records in the table for each fromat of EMPX.
Ex: (000000 - 20 records, 000001 - 20 record,000002 - 20 records and so on)
IF suppose 000001 has 10 records than i need to rollback the changes keeping changes for 000000 form.

Kindly provide ur inputs on the same
_________________
Krunal
Back to top
View user's profile Send private message
bhairon singh rathore

New User


Joined: 19 Jun 2008
Posts: 91
Location: banglore

PostPosted: Wed May 05, 2010 12:14 pm
Reply with quote

Can you please brief your requirement properly.....
Back to top
View user's profile Send private message
krunalbafna
Warnings : 1

Active User


Joined: 18 Jan 2010
Posts: 143
Location: Pune

PostPosted: Wed May 05, 2010 12:17 pm
Reply with quote

In my code,
I have one counter starting from 0
for counter = 0 , i have to read 50 records from file and update the table on particular condition.

For counter = 1, condition repeats.

Suppose for counter = 1 there are only 20 records in file so what ever records i have updated i need to rollback keeping all the previous changes intact
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 05, 2010 8:02 pm
Reply with quote

Hello,

One way is to read the records into an array. Then process the array when there is an update to be done (rather than doing the update and then taking it back out).
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts filter COMMIT/ROLLBACK statements DFSORT/ICETOOL 13
No new posts Commit limit for Delete query through... DB2 10
No new posts Commit a DB2 Table on Unix Server and... DB2 3
No new posts Need information on DB2 COMMIT DB2 9
No new posts DB2 Commit thru Xpediter DB2 4
Search our Forums:

Back to Top