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
 
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 MXG - Processing Compressed DB2 SMF r... vasanthz All Other Mainframe Topics 2 Thu May 10, 2018 12:47 am
No new posts Removing the period or dot from the v... gopinak COBOL Programming 6 Wed May 09, 2018 1:53 pm
No new posts Extract the records with a PD field's... sudhakar84 DFSORT/ICETOOL 11 Mon Apr 02, 2018 7:26 pm
No new posts Merge 2 records sancraig16 SYNCSORT 19 Tue Mar 27, 2018 8:17 pm
No new posts Copy set of records based on condition krish.deepu SYNCSORT 2 Thu Mar 08, 2018 11:39 am

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