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
 

 

How to resolve -532

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

Active User


Joined: 15 Dec 2005
Posts: 236

PostPosted: Thu Aug 06, 2015 10:03 pm    Post subject: How to resolve -532
Reply with quote

Hi all

In my program I am using multi row cursor for three tables table A table B and table C. Table A is parent of table B and table B is parent of table C. In my program I have used 3 multi row with for update cursors. Cursor 1 is declared as below
Code:

Declare cursor cursor1 with hold
 With rowset positioning
Select c1
From tableA
where crdate  < current date - 10 days
For update

Declare cursor  cursor2 with hold
With rowset positioning
Select 1
From tableB
Where c1 = :TableA.C1
For update

Declare cursor  cursor3 with hold
With rowset positioning
Select 1
From tableC
Where c1 = :TableA.C1
For update



After fetching rows from table A, I am deleting rows from
Table C followed with table B, while I am deleting the row using where current of in table A I am getting -532. I have issued commit before deleting from table A till it gives the same sql code. If rows of child table is deleted then why I am getting this sql code? Please let me know how to resolve it.
I have replaced delete of table A where current of with normal delete using where clause for sql code =100 and sqlerrd(3) > 0 (during fetch of cursor1 )
It worked. But I need to know why current of failed?
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Fri Aug 07, 2015 12:25 am    Post subject:
Reply with quote

Quote:
I have issued commit before deleting from table A

why? Are you sure the rows are still alive for delete?
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 236

PostPosted: Fri Aug 07, 2015 7:09 am    Post subject:
Reply with quote

Without commit also I got the same error. I tried to commit to ensure the descendants table rows are deleted so that it won't throw sql code -532
Back to top
View user's profile Send private message
Garry Carroll

Active Member


Joined: 08 May 2006
Posts: 988
Location: Dublin, Ireland / Edinburgh, Scotland

PostPosted: Fri Aug 07, 2015 5:51 pm    Post subject:
Reply with quote

The -532 is described as
Quote:
-532
THE RELATIONSHIP constraint-name RESTRICTS THE DELETION OF ROW WITH RID X rid-number


So you need to see what the relationship constraint is.

Garry
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 How to resolve IMS DB status code FM Priyanka Boga IMS DB/DC 3 Fri Jun 10, 2016 1:54 pm
No new posts how to Resolve SQL Error Code -924 Rajesh3825 ABENDS & Debugging 2 Thu Dec 10, 2015 2:39 pm
No new posts Resolve symbolics - other than starti... Shrinika Rajendran JCL & VSAM 4 Tue May 27, 2014 6:15 pm
No new posts SOC7 abend- How to resolve it sandeep kumar302 COBOL Programming 24 Wed Apr 30, 2014 5:57 pm
No new posts How to resolve -911 and -913 Kmr.deepakcs DB2 3 Sun Jan 05, 2014 5:27 pm


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