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 Inefficient BUILD - VB records paddin... Daniel Prosser SYNCSORT 3 Thu Dec 14, 2017 3:52 pm
No new posts ISSUE IN copying Sequential file reco... thesumitk JCL & VSAM 2 Wed Dec 13, 2017 3:07 pm
No new posts Merging 2 records at multiple rows wi... Bijesh DFSORT/ICETOOL 2 Wed Dec 06, 2017 1:50 am
No new posts Is CICS BMS logic on z/OS different ... Andi1982 CICS 2 Fri Dec 01, 2017 1:56 pm
No new posts Increment number for every group of r... srajendran2 DFSORT/ICETOOL 7 Thu Nov 09, 2017 10:31 pm

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