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

need help for mass insert in db2 for online system


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Avanti

New User


Joined: 11 Mar 2010
Posts: 12
Location: pune

PostPosted: Fri May 07, 2010 1:57 pm
Reply with quote

Hi,

As a part of CPU reduction,we are planning to have mass insert into DB2 tables. I analyzed for Batch programs.

Now,we have one online program in which user is entering the data through screen.The sama data is received through MQ.The message is processed and tables are updated.Now,the second data is entered and processed and so on. No file is involved. Is it possible to apply mass insert for these kind of system.

Thanks
Avanti
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Fri May 07, 2010 6:25 pm
Reply with quote

I will suggest that you use IMS BMP (Batch Message Partition) programs/jobs for this. Be sure to issue checkpoints with high frequency to free up any locks held on database updates.
Back to top
View user's profile Send private message
Avanti

New User


Joined: 11 Mar 2010
Posts: 12
Location: pune

PostPosted: Mon May 10, 2010 8:58 am
Reply with quote

Hi Kjeld,

Thanks for your reply.I tried searching for IMS BMP for mass insert as you have suggested.But I did not get from where exactly I should start since I am completely new to this thing.Can you please give me some hint from where and which direction I should begin?

Regards,
Avanti
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon May 10, 2010 9:16 am
Reply with quote

Hello,

This is posted in the db2 part of the forum, but some of the dialog is about IMS.

If this is for db2, read about "multiple-row-insert". . .
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/dsnsqj10/5.74
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Wed May 12, 2010 1:46 am
Reply with quote

I gave this advice because in my experience, mass inserts have a tendency to create locking problems when used in concurrency with online applications. The larger units of work you create the higher the risk.

So I would suggest a solution that would allow dividing the LUW into smaller units.

If IMS is not employed on OP's site, then just forget it. And I am not able to supply a crash course in IMS application design and programming within the forum constraints. If IMS is available, internal advice and tutoring should be tried first.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 12, 2010 1:59 am
Reply with quote

Hi Kjeld,

Quote:
And I am not able to supply a crash course in IMS application design and programming within the forum constraints.
If you were to post this, we could surely make it a "Sticky" in the IMS part of the forum icon_smile.gif

Avanti - i may have misunderstood what you meant by mass insert. How many is a mass? If you mean adding several rows in one db2 insert instead of several inserts, this will work well. I'd be wary of adding (inserting) very high volume - this would be better served in batch (IMHO).
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Thu May 13, 2010 2:00 am
Reply with quote

Incidentally there are stickys in the IMS DB/DC forum with links to some IMS documentation, though the documentation is not offered this site's IBM manual collection from the top menu. icon_smile.gif

Be sure to check with your database administrators for constraints before employing multi row inserts of larger volumes in application programs.
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 -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts How to delete a user's alias from the... JCL & VSAM 11
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
No new posts Insert system time/date (timestamp) u... DFSORT/ICETOOL 5
No new posts JCL Dynamic System Symbols JCL & VSAM 3
Search our Forums:

Back to Top