View previous topic :: View next topic
|
Author |
Message |
abdulrafi
Active User
Joined: 14 Sep 2009 Posts: 184 Location: Coimbatore
|
|
|
|
Hi,
I need some help in db2. I am updating a db2 table and for every 500 records insertion I am taking a checkpoint. Finally my program updated 25000 records. After that when I rerun the same program with my jcl it is showing -310 as the cursor was unable to open. I looked into the abend details to resolve it. But my db2 variables dint had any decimal values moving to non-decimal values. I gave display statements to check it but I am not able to find out where went the problem.
Could anybody please help me out to figure out the problem. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
taking a checkpoint |
meaning your program issues a COMMIT?
updated 25,000 ROWS - they were COMMITed?
(by the way, even though Personal Computer based databases use the terms fields and records,
on the mainframe, db2 tables have columns and rows.
Failure to following correct naming/word-usage standards leads to confusion.
If you received a -310 on an OPEN CURSOR, then you had non-decimal data in host variables.
no, do not argue about that. db2 does not make that mistake.
do yourself a favor and accept the fact,
that your host variables were populated with non-decimal data.
Does your program populate the host-variables prior to issuing the OPEN Cursor statement?
IF so, with what? |
|
Back to top |
|
|
abdulrafi
Active User
Joined: 14 Sep 2009 Posts: 184 Location: Coimbatore
|
|
|
|
yes they were committed.
But i am not moving any values to my host variables beore opening the cursor. i displayed all my host variables but it had only junk values in it and I really dont know from where it came. :-( |
|
Back to top |
|
|
abdulrafi
Active User
Joined: 14 Sep 2009 Posts: 184 Location: Coimbatore
|
|
|
|
when i initially ran it all my data were inserted correctly but when i ran the same jcl, actually it should not update anything or insert anything but it shows an abend with -310. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Why did you not specify initial values for the host variables?
Quote: |
i displayed all my host variables but it had only junk values in it and I really dont know from where it came. |
The values are junk because you did not specify valid values. . . |
|
Back to top |
|
|
|