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

query on db2 cursor


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
abdulrafi

Active User


Joined: 14 Sep 2009
Posts: 184
Location: Coimbatore

PostPosted: Tue Nov 02, 2010 4:17 pm
Reply with quote

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
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Tue Nov 02, 2010 4:50 pm
Reply with quote

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
View user's profile Send private message
abdulrafi

Active User


Joined: 14 Sep 2009
Posts: 184
Location: Coimbatore

PostPosted: Tue Nov 02, 2010 4:59 pm
Reply with quote

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
View user's profile Send private message
abdulrafi

Active User


Joined: 14 Sep 2009
Posts: 184
Location: Coimbatore

PostPosted: Tue Nov 02, 2010 5:00 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Nov 02, 2010 8:55 pm
Reply with quote

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
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 RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Issue with EXEC CICS QUERY SECURITY c... CICS 6
Search our Forums:

Back to Top