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

COBOL-DB2 program or JCL LOAD-REPLACE utility


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Sagar_mainframe

New User


Joined: 07 Jun 2008
Posts: 34
Location: Harrisburg, Pennsylvania

PostPosted: Thu Apr 28, 2011 8:02 pm
Reply with quote

If I have to delete all exixting rows and load new data the table with around 50,000 rows daily.Which approach will be faster??

COBOL-DB2 program or JCL LOAD-REPLACE utility

Also I want to know which approach will NOT LOCK the table while deleting and inserting records.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Apr 28, 2011 8:13 pm
Reply with quote

DB2 load utility as it is ment to do that... but I did not understand what you are trying to say by this..
Quote:
which approach will NOT LOCK the table while deleting and inserting records
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Thu Apr 28, 2011 8:23 pm
Reply with quote

I agree the load utility is designed for that, but at 50,000 records, Cobol would not be that long.

The Load utility may put the table into check pending status, a situation you will need to rectify (reset the flag). If this happens, the table is not 'locked' but it can not be accessed until the check pending flag is reset.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Apr 28, 2011 11:04 pm
Reply with quote

Quote:
COBOL-DB2 program or JCL LOAD-REPLACE utility

Do you mean JCL COBOL-DB2 program or LOAD-REPLACE utility?
Back to top
View user's profile Send private message
Sagar_mainframe

New User


Joined: 07 Jun 2008
Posts: 34
Location: Harrisburg, Pennsylvania

PostPosted: Fri Apr 29, 2011 12:20 pm
Reply with quote

I have to load around 50000 rows daily and delete the existing rows before loading.

1st approach: JCL-COBOL-DB2 pogram - First delet the records and then read the file and insert the record. Finally commit all the records.

2nd approach: JCL- Load-replace utility - This will also delete the records and replace it with new records.


So out of these two approaches which one is faster?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Fri Apr 29, 2011 2:18 pm
Reply with quote

2nd approach is much quicker.

and db2 does not have records, it has rows.

if you would learn correct terminology and use it in your conversations,
you would get where you want to go, quicker.
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts Load new table with Old unload - DB2 DB2 6
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
Search our Forums:

Back to Top