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
 

 

DB2 Insert successful, but no data inserted

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







PostPosted: Fri Jan 29, 2010 12:33 am    Post subject: DB2 Insert successful, but no data inserted
Reply with quote

Hi,
I am trying to insert a row into a DB2 table, i get a SQLCODE = 0 for the insert query yet the insert is not successful.Can someone help here as what could be the reasons for the same.

Thanks
Gk
Back to top

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Jan 29, 2010 1:06 am    Post subject:
Reply with quote

How do you know the insert is not successful?

What are you using to do the insert, spufi or a user written program?
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: Fri Jan 29, 2010 1:11 am    Post subject:
Reply with quote

Hello and welcome to the forum,

Quote:
what could be the reasons for the same
Something issued a ROLLBACK. . .?

As Craig asked - what are you using to do the insert?
Back to top
View user's profile Send private message
Guest







PostPosted: Fri Jan 29, 2010 1:58 am    Post subject:
Reply with quote

Hi,
I am using a program to insert into the table, how can i find if Roll back had been issued or not in this case
I had given a display statement after the execution of the query for finding the sql code and it returned 0
regards
gk
Back to top
dick scherrer

Site Director


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

PostPosted: Fri Jan 29, 2010 2:55 am    Post subject:
Reply with quote

Hello,

Currently, after the insert, does the process abend? Is the problem insert in a called module?

As an experiment, put a COMMIT immediately after the INSERT. Then end the process. Then check if the row is in the table.
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1753
Location: Bloomington, IL

PostPosted: Fri Jan 29, 2010 2:55 am    Post subject:
Reply with quote

gokuls wrote:
Hi,
I am using a program to insert into the table, how can i find if Roll back had been issued or not in this case
I had given a display statement after the execution of the query for finding the sql code and it returned 0
regards
gk

Is the program abending, or is it terminating normally (abeit with a non-zero completion code)? Are there explicit COMMIT and/or ROLLBACK statements in the program?
Back to top
View user's profile Send private message
bhairon singh rathore

New User


Joined: 19 Jun 2008
Posts: 91
Location: banglore

PostPosted: Fri Jan 29, 2010 12:11 pm    Post subject:
Reply with quote

Hi Gokul

I think you need to check your program logic.
Please check sqlerrd(3) for number of rows affected.
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 Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am
No new posts SPUFI -- Joining 3 tables – data in... Sysaron DB2 2 Wed Mar 08, 2017 4:18 am
No new posts Overriding PS data in rexx Shaheen Shaik CLIST & REXX 8 Fri Mar 03, 2017 5:08 pm


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