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
 

 

SQLCODE is ZERO but Update is not happening in the database

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
V K R A S Srinivas

New User


Joined: 02 Jan 2007
Posts: 9
Location: Hyderabad

PostPosted: Tue Jan 12, 2010 3:53 pm    Post subject: SQLCODE is ZERO but Update is not happening in the database
Reply with quote

HI !

I need your help.

In my program, we are updating a table using some valid values. All the DCLGEN are populated with proper values and all the Indicator variables are also populated with 0 & -1 accordingly. But still the data is not getting updated into Database eventhough the SQLCODE is zero.

Is there any other reason for the why this update is not happening.

THank you
Srinivas Vaddadi
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Jan 12, 2010 3:56 pm    Post subject:
Reply with quote

Perhaps if you share the SQL and/or source code it may help others to determine the problem.
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Jan 12, 2010 3:58 pm    Post subject:
Reply with quote

Please provide the code & sql that might help to find the solution
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jan 12, 2010 4:21 pm    Post subject:
Reply with quote

at what point in the process are you 'determining that the update had no effect'?
Back to top
View user's profile Send private message
V K R A S Srinivas

New User


Joined: 02 Jan 2007
Posts: 9
Location: Hyderabad

PostPosted: Tue Jan 12, 2010 4:56 pm    Post subject:
Reply with quote

Hi Dick,

I am coming out of the program and checking in the database.

Thanks,
Srini.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jan 12, 2010 5:03 pm    Post subject:
Reply with quote

Srini,
when you say you are comming out of the program,
do you mean you are in a debugging session
or
has the batch program/cics program ended - with a good return code.

I you are debugging,
you have to issue a commit before you check the database
or
wait until the program has ended.

until a commit is issued either by
  • an explicit commit in the program
  • implicit commit issued by the system upon program termination
the changes to the database will not be available to another task -
checking the database will be another task.
Back to top
View user's profile Send private message
V K R A S Srinivas

New User


Joined: 02 Jan 2007
Posts: 9
Location: Hyderabad

PostPosted: Tue Jan 12, 2010 6:14 pm    Post subject: Reply to: SQLCODE is ZERO but Update is not happening in the
Reply with quote

Hi Dick,

Thank you for the reply.

I am successfully coming out of the program by debugging in Xpediter. In our system, Implicit commit is issued by the system upon completion of the Program. I am checking the database once I am cmoing out of the program. I have checked the CICS region if any abends are occuring, but it shows nothing. But still I dont see the update happening in the table. Other queries in the Program are successful (ex: Inserting a new row and etc).

Thank you
Srini
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Jan 12, 2010 6:28 pm    Post subject:
Reply with quote

Srini,

1. try the transaction without xpeditor.

2. double check that
  1. the values in the host variables are indeed different from those present in the database before your UPDATE
  2. that the host variables you are populating with 'new' values are indeed those used in the UPDATE SQL
.

3. are you checking the same db2 tables that your program is updating.

sorry if the questions are simplistic/rude/demeaning but if you are getting INSERTs to work you don't have bind/load module issues.
the only thing left is something simple that you are overlooking because you assume that it is ok.

other than that, nothing...for a while. I have to think about it.

good luck.
Back to top
View user's profile Send private message
V K R A S Srinivas

New User


Joined: 02 Jan 2007
Posts: 9
Location: Hyderabad

PostPosted: Wed Jan 13, 2010 2:34 pm    Post subject: Reply to: SQLCODE is ZERO but Update is not happening in the
Reply with quote

Hi Dick,

I tried putting SYNCPOINT after the Update query in the Program and ran the message. It ran successfully and the Data is updated successfully into the DB2 tables. So looks like the implicit commit is not working in this case, but not sure why other Inserts are happening.

THank you
Srini.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10211
Location: italy

PostPosted: Wed Jan 13, 2010 2:41 pm    Post subject: Reply to: SQLCODE is ZERO but Update is not happening in the
Reply with quote

I just reread the whole thread/topic

still going down "wild guessing road"

You have told us nothing useful.

OK to put a syncpoint for a quick and dirty verification,
not a good long term solution, ( having syncpoints because You were not able to debug an issue)

sorry to disillusion You, but the ball is still in Your side of the court
... investigate further ( maybe with Your support help )
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jan 13, 2010 3:38 pm    Post subject:
Reply with quote

Quote:
and ran the message.


what message?

and I agree with enrico -
you have not solved the problem
there only thing that would inhibit the implicit commit at task termination
is something incorrect that you are doing.

as far as a syncpoint - does the CICS Transaction Server for z/OS V3R1 CICS DB2 Guide indicate that you always need to use a syncpoint?
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 -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts IMS Database backup info ashek15 IMS DB/DC 14 Wed Nov 16, 2016 5:29 am
No new posts How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts Updating Cursor row withour using FOR... chandan.inst DB2 15 Tue Nov 08, 2016 11:17 am
No new posts Getting list of tables defined under ... kishpra DB2 2 Wed Aug 24, 2016 10:36 am


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