Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
What is the SQLCODE = -253 means?

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 256

PostPosted: Mon May 24, 2010 11:32 am    Post subject: What is the SQLCODE = -253 means?
Reply with quote

Hi all,

I am getting SQLCODE=-253. I have searched for sqlcode=-253 in google not able to find the exact reason for this error. Please explain.

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

dick scherrer

Site Director


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

PostPosted: Mon May 24, 2010 12:01 pm    Post subject:
Reply with quote

Hello,

As you know, there is a link to "IBM Manuals" at the top of the page. From there look in the DB2/UDB Messages & Codes.
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 256

PostPosted: Mon May 24, 2010 1:17 pm    Post subject:
Reply with quote

Thanks Dick. I am getting -253 SQLCODE while inserting a table using multi row insert. The SQLCODE =-253 means

Quote:
A NON-ATOMIC statement STATEMENT SUCCESSFULLY COMPLETED FOR SOME OF THE REQUESTED ROWS, POSSIBLY WITH WARNINGS, AND ONE OR MORE ERRORS


I have used non-atomic with my insert SQL. I want to know what is the exact error happened like duplicate error(-803) or -180(timestamp format) for the particular row. Is it possible to get the exact sqlcode for the particular row while using multi row insert?

Thanks,
Murali.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon May 24, 2010 1:44 pm    Post subject:
Reply with quote

Hi Murali...

It also says....
Quote:

Use GET DIAGNOSTICS to obtain information about the error and warning conditions that occurred.
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 256

PostPosted: Mon May 24, 2010 2:35 pm    Post subject:
Reply with quote

Sambhaji,

In GET Diagonistics what is the function which will give me the SQLCODE of the particular row?

NATIVE_ERROR is not working.

Constraint_Name is not working.
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Mon May 24, 2010 2:50 pm    Post subject:
Reply with quote

Code:

EXEC SQL BEGIN DECLARE SECTION;
  long row_count, num_condns, i;
  long ret_sqlcode, row_num;
  char ret_sqlstate[6];
  ...
EXEC SQL END DECLARE SECTION;
...
EXEC SQL
  INSERT INTO DSN8810.ACT
    (ACTNO, ACTKWD, ACTDESC)
    VALUES (:hva1, :hva2, :hva3)
    FOR 10 ROWS
    NOT ATOMIC CONTINUE ON SQLEXCEPTION;

EXEC SQL GET DIAGNOSTICS
  :row_count = ROW_COUNT, :num_condns = NUMBER;
printf("Number of rows inserted = %d\n", row_count);

for (i=1; i<=num_condns; i++) {
  EXEC SQL GET DIAGNOSTICS CONDITION :i
    :ret_sqlcode  = DB2_RETURNED_SQLCODE,
    :ret_sqlstate = RETURNED_SQLSTATE,
    :row_num      = DB2_ROW_NUMBER;
    printf("SQLCODE = %d, SQLSTATE = %s, ROW NUMBER = %d\n",
            ret_sqlcode, ret_sqlstate, row_num);
 }

Simulate above for cobol...
Back to top
View user's profile Send private message
pkmurali
Warnings : 1

Active User


Joined: 15 Dec 2005
Posts: 256

PostPosted: Sun Jul 22, 2018 1:46 pm    Post subject:
Reply with quote

I have used the get diagnostics condition for multi row insert not sure why it is not giving -180 if any one of the row is having date format problem. I am getting -253 after executing diagnostics condition getting duplicate error message and sqlcode 80L (-803) . I checked whether it is duplicate but it's not. Please clarify.

Ex

2018-21-12 x y
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2122
Location: UK

PostPosted: Sun Jul 22, 2018 2:35 pm    Post subject: Reply to: What is the SQLCODE = -253 means?
Reply with quote

You ARE joking are you not? EIGHT YEARS after the original topic was posted you are requesting clarification! I suspect that you do not have the original problem (surely that was resolved 8 years ago?) but a new one. New problem, new topic. Locked.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    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 Licensed Materials & Restricted M... vasanthz General Talk & Fun Stuff 10 Wed Aug 08, 2018 12:52 am
No new posts Sqlcode =-253 pkmurali DB2 6 Sun Jul 22, 2018 3:13 pm
No new posts SQLCODE 518 while executing DB2 module. abdulrafi DB2 8 Wed Feb 07, 2018 10:46 am
No new posts SQLCODE=100 and SQLSTAE 02000 pshongal DB2 12 Fri Jan 19, 2018 10:14 am
No new posts DB2 SQL Error: SQLCODE=-440, SQLSTATE... kishpra DB2 1 Sat Feb 18, 2017 2:31 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us