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 to insert more rows at a time thru query

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

New User


Joined: 22 Sep 2006
Posts: 33

PostPosted: Tue Apr 24, 2007 1:22 pm    Post subject: how to insert more rows at a time thru query
Reply with quote

Hi,

I have a req like....some values i have to insert in 1 DB table....

for example...i want to insert 10 rows at a time with differenet values....

Is it possible with simple query...or i have to write 1 time prog to perform this...

Could any one help me in this regard...
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: Tue Apr 24, 2007 8:24 pm    Post subject:
Reply with quote

Hello,

Pretty much by definition "insert" works on an individual row. There is no "insert 10" that i'm aware of.

If you write a bit of code that can be performed to so the insert, you can put your data values into the variables and perform the insert code. 10 sets of move/perform will get your rows inserted wasily. If you put the data in an external file, you would not need 10 sets of moves/performs. Just read the file, move the values, and issue the insert.

If you then save the code, you will be able to easily do this another time without writing a new bit of code. It would be easily clonable to add rows to other tables when needed for testing.

If you place your 10 records in a qsam file (in the proper format) you could also load the records in batch. My preference is to have a program because often the requirement grows and additional code is required.
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 Comparision with current time arunsoods DFSORT/ICETOOL 5 Thu Nov 09, 2017 10:37 am
No new posts Query on IEFBR14 with GDG Ashishpanpaliya JCL & VSAM 3 Tue Nov 07, 2017 8:34 pm
This topic is locked: you cannot edit posts or make replies. Comparing current time with the time ... arunsoods SYNCSORT 1 Mon Oct 30, 2017 4:07 pm
This topic is locked: you cannot edit posts or make replies. Incrementing current time field by 30... arunsoods DFSORT/ICETOOL 11 Thu Oct 26, 2017 3:22 pm
No new posts Query on XMITIP abdulrafi All Other Mainframe Topics 1 Wed Oct 25, 2017 6:54 pm

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