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
 

 

How a COMMIT logic can be coded After loading 1000 records

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

New User


Joined: 05 Apr 2006
Posts: 4

PostPosted: Tue Apr 17, 2007 5:23 pm    Post subject: How a COMMIT logic can be coded After loading 1000 records
Reply with quote

A COBOL-DB2 program is reading a flat file and loading the data from that file to a DB2 table. After loading 1000 records how a COMMIT logic can be coded.
Back to top
View user's profile Send private message

William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Tue Apr 17, 2007 10:13 pm    Post subject:
Reply with quote

For starters, try looking in the manual under COMMIT.
Back to top
View user's profile Send private message
prasadvrk

Active User


Joined: 31 May 2006
Posts: 200
Location: Netherlands

PostPosted: Wed Apr 18, 2007 4:31 pm    Post subject:
Reply with quote

You can declare a counter variable, go on incrementing that after each updation and commit when it reaches 1000. But in case of abend you will still not be able to get the record for which the program abended so always implement the restart logic.
Back to top
View user's profile Send private message
priyamnavada

New User


Joined: 24 Dec 2005
Posts: 52
Location: hyderabad

PostPosted: Tue May 15, 2007 5:56 pm    Post subject:
Reply with quote

pass commit count through PARM parameter. keep count in the COBOL program. once the count in program exceeds the PARM count, COMMIT all the data.
Back to top
View user's profile Send private message
deepak.vl

New User


Joined: 17 Feb 2007
Posts: 38
Location: Hyderabad

PostPosted: Sun May 27, 2007 8:07 pm    Post subject:
Reply with quote

But this may create problems if the job abends in between. You need to restart the loading from the record which is next to the record which was last committed. This may not be possible in this case, since the input is from a flat file and you cannot direcly identify the records that were committed.

In my opinion, it is better not to have any commit logic in these scenarios.
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 Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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