Insert

Ask question on - DataBase Concepts, IBM Mainframe DB2, DB2/UDB, DB2 Tools, SQL , DB2 programming with languages like COBOL, PL1.

Moderators: Kalicharan, Moderator Group

Post Reply
rajkumarprajapati
Member
Posts: 40
Joined: Tue Sep 18, 2007 1:17 pm

Insert

Post by rajkumarprajapati » Mon Mar 02, 2009 10:24 am

How to insert more than one rows in DB2 database using COBOl-DB2
application program?

User avatar
Natarajan
Moderator
Posts: 537
Joined: Fri Oct 10, 2008 12:57 pm
Location: chennai
Contact:

Post by Natarajan » Mon Mar 02, 2009 11:02 am

Using cobol PERFORM you can add multiple rows into db2 table... i.e, by calling DB2 INSERT statement mutiple times.

other way is... using DB2 INSERT INTO... SELECT statement.

where SELECT statement return the no of rows.. those many no of rows will be passed to INSERT statement.


It look like a interview question... if so, please post these questions in INTERVIEW QUESTIONS forum, it will be helpful to others who are searching for interview questions.
Natarajan
Chennai

Anuj Dhawan
Moderator
Posts: 1625
Joined: Sat Aug 09, 2008 9:02 am
Location: Mumbai, India

Post by Anuj Dhawan » Mon Mar 02, 2009 12:07 pm

Regards,
Anuj

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others