IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SQLCODE is ZERO but Update is not happening in the database


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Tue Jan 12, 2010 3:56 pm
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: 1208
Location: Bangalore,India

PostPosted: Tue Jan 12, 2010 3:58 pm
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
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
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
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
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Jan 13, 2010 2:41 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts What database does Jobtrac use CA Products 4
No new posts Capturing COBOL job and program names... All Other Mainframe Topics 2
No new posts Products/Tools to Optimize Adabas Dat... Compuware & Other Tools 2
No new posts Read a flat file and update DB2 table JCL & VSAM 2
No new posts how to update an ISR appl var from an... TSO/ISPF 8
Search our Forums:

Back to Top