Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
DB2 commit

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: DB2 commit
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Wed May 05, 2010 8:02 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Commit limit for Delete query through... mf_karthik DB2 10 Thu Dec 17, 2015 12:56 am
No new posts Commit a DB2 Table on Unix Server and... Vinodh S DB2 3 Sun Apr 12, 2015 5:05 am
No new posts Need information on DB2 COMMIT sivasaras COBOL Programming 9 Wed Jun 11, 2014 7:34 pm
No new posts DB2 Commit thru Xpediter kinatingopi DB2 4 Wed Apr 30, 2014 4:46 am
No new posts Regarding commit in cics calling db2 ... ram_vizag CICS 7 Wed Feb 05, 2014 10:56 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us