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 or Cobol

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Mon Nov 14, 2011 4:46 pm    Post subject: DB2 or Cobol
Reply with quote

I have a huge file with 60 million records. These records have to be loaded in a target table. Before loading it into the target table for each and every record I have to read some other tables to get some additional information.

What is quicker?

- Read the input file into a cobol-program, get the additional information by reading the necessary tables, form a BMC-output file (file has the layout of the target table) and then dump the BMC-file into the target table
- Store the input file into a DB2-table, get the necessary information from the other tables and then insert row by row into the target table?

In other words: is sequentailly reading a table quicker than a join in a cursor?

Thnx
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Mon Nov 14, 2011 5:03 pm    Post subject: Reply to: DB2 or Cobol
Reply with quote

I'd strongly suspect getting all the data you need andthen loading with a utility would be quicker.

For an answer with your set-up, best would be to do a "mock-up" with a reasonable sample of test data for the task.

Another advantage of doing it in two logical pieces is that if you get errors from the pre-processing of the file, you haven't even disturbed the DB yet. You could also consider "splitting" the file into more manageable chunks for the DB load rather than 60 million at once.
Back to top
View user's profile Send private message
pramod prasad

New User


Joined: 20 May 2007
Posts: 6
Location: hyderabad

PostPosted: Mon Nov 14, 2011 6:31 pm    Post subject: Reply to: DB2 or Cobol
Reply with quote

If your target table is partitioned then I would suggest split your input file into multiple smaller file using SORT. Run jobs parallely to insert/update different partitions at the same time.
If you try to insert/update with 60 Million records without using partitions at a time then you might end up with -911.

Thanks,
Pramod
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: Mon Nov 14, 2011 9:33 pm    Post subject:
Reply with quote

Hello,

No matter what, you do NOT want to do 60 million INSERTS. . .
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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
This topic is locked: you cannot edit posts or make replies. Extract all "IF" Statements... Adarsh Damodaran CLIST & REXX 1 Wed Sep 06, 2017 9:28 am
No new posts ALPHABETIC check in COBOL vidyaa COBOL Programming 8 Thu Aug 17, 2017 7:13 pm
No new posts XML Parse for COBOL 5.2 Bhanu Praveen COBOL Programming 1 Sat Jul 08, 2017 8:58 pm

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