Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us