Mainframe Blog

SQL Positive Return Codes in Db2 12

6 minute read
Stephen Watts

(This article is part of our Db2 Guide. Use the right-hand menu to navigate.)

000 SUCCESSFUL EXECUTION
+012 THE UNQUALIFIED COLUMN NAME column-name WAS INTERPRETED AS A CORRELATED REFERENCE
+098 A DYNAMIC SQL STATEMENT ENDS WITH A SEMICOLON
+100 ROW NOT FOUND FOR FETCH, UPDATE OR DELETE, OR THE RESULT OF A QUERY IS AN EMPTY TABLE
+110 SQL UPDATE TO A DATA CAPTURE TABLE NOT SIGNALLED TO ORIGINATING SUBSYSTEM
+111 THE SUBPAGES OPTION IS NOT SUPPORTED FOR TYPE 2 INDEXES
+117 THE NUMBER OF INSERT VALUES IS NOT THE SAME AS THE NUMBER OF OBJECT COLUMNS
+162 TABLESPACE database-name.tablespace-name HAS BEEN PLACED IN CHECK PENDING
+203 THE QUALIFIED COLUMN NAME column-name WAS RESOLVED USING A NON-UNIQUE OR UNEXPOSED NAME
+204 name IS AN UNDEFINED NAME
+205 column-name IS NOT A COLUMN OF TABLE insert-name
+206 column-name IS NOT A COLUMN OF AN INSERTED TABLE, UPDATED TABLE, OR ANY TABLE IDENTIFIED IN A FROM CLAUSE
+217 THE STATEMENT WAS NOT EXECUTED AS ONLY EXPLAIN INFORMATION REQUESTS ARE BEING PROCESSED
+218 THE SQL STATEMENT REFERENCING A REMOTE OBJECT CANNOT BE EXPLAINED
+219 THE REQUIRED EXPLANATION TABLE table-name DOES NOT EXIST
+220 THE COLUMN column-name IN EXPLANATION TABLE table-name IS NOT DEFINED PROPERLY
+222 HOLE DETECTED USING CURSOR cursor-name
+231 CURRENT POSITION OF CURSOR cursor-name IS NOT VALID FOR THE SPECIFIED FETCH ORIENTATION OF THE CURRENT ROW OR ROWSET
+236 SQLDA INCLUDES integer1 SQLVAR ENTIRES, BUT integer2 ARE REQUIRED FOR integer3 COLUMNS
+236 SQLDA INCLUDES integer1 SQLVAR ENTIRES, BUT integer2 ARE REQUIRED FOR integer3 COLUMNS
+237 SQLDA INCLUDES integer1 SQLVAR ENTIRES, BUT integer2 ARE REQUIRED BECAUSE AT LEAST ONE OF THE COLUMNS BEING DESCRIBED IS A DISTINCT TYPE
+238 SQLDA INCLUDES integer1 SQLVAR ENTIRES, BUT integer2 SQLVAR ENTRIES ARE NEEDED FOR integer3 COLUMNS BECAUSE AT LEAST ONE OF THE COLUMNS BEING DESCRIBED IS A DISTINCT TYPE
+239 SQLDA INCLUDES integer1 SQLVAR ENTIRES, BUT integer2 ARE REQUIRED FOR integer3 COLUMNS BECAUSE AT LEAST ONE OF THE COLUMNS BEING DESCRIBED IS A DISTINCT TYPE
+252 A NON-ATOMIC statement STATEMENT SUCCESSFULLY PROCESSED ALL REQUESTED ROWS, WITH ONE OR MORE WARNING CONDITION
+304 A VALUE WITH DATA TYPE data-type1 CANNOT BE ASSIGNED TO A HOST VARIABLE BECAUSE THE VALUE IS NOT WITHIN THE RANGE OF THE HOST VARIABLE IN POSITION position-number WITH DATA TYPE data-type2
+331 THE NULL VALUE HAS BEEN ASSIGNED TO A HOST VARIABLE OR PARAMETER BECAUSE THE STRING CANNOT BE CONVERTED FROM source-ccsid TO target-ccsid. REASON reason-code, POSITION position-number
+335 DBS CONVERTED A HOST VARIABLE, PARAMETER, OR COLUMN NUMBER var-num var-name-or-num TO COLUMN NAME, HOST VARIABLE, OR EXPRESSION NUMBER col-name-or-num FROM from ccsid TO to-ccsid, AND RESULTING IN SUBSTITUTION CHARACTERS
+339 THE SQL STATEMENT HAS BEEN SUCCESSFULLY EXECUTED, BUT THERE MAY BE SOME CHARACTER CONVERSION INCONSISTENCIES
+347 THE RECURSIVE COMMON TABLE EXPRESSION name MAY CONTAIN AN INFINITE LOOP
+354 A ROWSET FETCH STATEMENT MAY HAVE RETURNED ONE OR MORE ROWS OF DATA. HOWEVER, ONE OR MORE WARNING CONDITIONS WERE ALSO ENCOUNTERED. USE THE GET DIAGNOSTICS STATEMENT FOR MORE INFORMATION REGARDING THE CONDITIONS THAT WERE ENCOUNTERED
+361 COMMAND WAS SUCCESSFUL BUT RESULTED IN THE FOLLOWING: msg-token
+364 DECFLOAT EXCEPTION exception-type HAS OCCURRED DURING operation-type OPERATION, POSITION position-type
+385 ASSIGNMENT TO AN SQLSTATE OR SQLCODE VARIABLE IN AN SQL ROUTINE routine-name MAY BE OVERWRITTEN AND DOES NOT ACTIVATE ANY HANDLER
+394 ALL USER SPECIFIED OPTIMIZATION HINTS USED DURING ACCESS PATH SELECTION
+395 USER SPECIFIED OPTIMIZATION HINTS ARE INVALID (REASON CODE= ‘reason-code’). THE OPTIMIZATION HINTS ARE IGNORED
+402 LOCATION location IS UNKNOWN
+403 THE LOCAL OBJECT REFERENCED BY CREATE ALIAS STATEMENT DOES NOT EXIST
+434 clause IS A DEPRECATED FEATURE
+438 APPLICATION RAISED WARNING WITH DIAGNOSTIC TEXT: text
+440 NO routine-type BY THE NAME routine-name HAVING COMPATIBLE ARGUMENTS WAS FOUND
+445 VALUE value HAS BEEN TRUNCATED
+462 EXTERNAL FUNCTION OR PROCEDURE name (SPECIFIC NAME specific-name) HAS RETURNED A WARNING SQLSTATE, WITH DIAGNOSTIC TEXT text
+464 PROCEDURE proc RETURNED num QUERY RESULT SETS, WHICH EXCEEDS THE DEFINED LIMIT integer
+466 CREATE PROCEDURE proc RETURNED num QUERY RESULTS SETS
+494 NUMBER OF RESULT SETS IS GREATER THAN NUMBER OF LOCATORS
+495 ESTIMATED PROCESSOR COST OF estimate-amount1 PROCESSOR SECONDS (estimate-amount2 SERVICE UNITS) IN COST CATEGORY cost-category EXCEEDS A RESOURCE LIMIT WARNING THRESHOLD OF limit-amount SERVICE UNITS
+535 THE RESULT OF THE POSITIONED UPDATE OR DELETE MAY DEPEND ON THE ORDER OF THE ROWS
+541 THE REFERENTIAL OR UNIQUE CONSTRAINT name HAS BEEN IGNORED BECAUSE IT IS A DUPLICATE
+551 auth-id DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION operation ON OBJECT object-name
+552 auth-id DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION operation
+558 THE WITH GRANT OPTION IS IGNORED
+561 THE ALTER, INDEX, REFERENCES, AND TRIGGER PRIVILEGES CANNOT BE GRANTED PUBLIC AT ALL LOCATIONS
+562 A GRANT OF A PRIVILEGE WAS IGNORED BECAUSE THE GRANTEE ALREADY HAS THE PRIVILEGE FROM THE GRANTOR
+585 THE COLLECTION collection-id APPEARS MORE THAN ONCE WHEN SETTING THE special-register SPECIAL REGISTER
+599 COMPARISON FUNCTIONS ARE NOT CREATED FOR A DISTINCT TYPE BASED ON A LONG STRING DATA TYPE
+610 A CREATE/ALTER ON OBJECT object-name HAS PLACED OBJECT IN utility PENDING
+650 THE TABLE BEING CREATED OR ALTERED CANNOT BECOME A DEPENDENT TABLE
+653 TABLE table-name IN PARTITIONED TABLESPACE tspace-name IS NOT AVAILABLE BECAUSE ITS PARTITIONED INDEX HAS NOT BEEN CREATED
+655 STOPGROUP stogroup_name HAS BOTH SPECIFIC AND NON-SPECIFIC VOLUME IDS. IT WILL NOT BE ALLOWED IN FUTURE RELEASES
+658 THE SUBPAGES VALUE IS IGNORED FOR THE CATALOG INDEX index-name
+664 THE INTERNAL LENGTH OF THE LIMIT-KEY FIELDS SPECIFIED IN THE PARTITION CLAUSE OF THE statement-name STATEMENT EXCEEDS THE EXISTING INTERNAL LIMIT KEY LENGTH STORED IN CATALOG TABLE table-name
+738 DEFINITION CHANGE OF object object-name MAY REQUIRE SIMILAR CHANGE ON READ-ONLY SYSTEMS
+799 A SET STATEMENT REFERENCES A SPECIAL REGISTER THAT DOES NOT EXIST AT THE SERVER SITE
+802 EXCEPTION ERROR exception-type HAS OCCURRED DURING operation-type OPERATION ON data-type DATA, POSITION position-number
+806 BIND ISOLATION LEVEL RR CONFLICTS WITH TABLESPACE LOCKSIZE PAGE OR LOCKSIZE ROW AND LOCKMAX 0
+807 THE RESULT OF DECIMAL MULTIPLICATION MAY CAUSE OVERFLOW
+863 THE CONNECTION WAS SUCCESSFUL BUT ONLY SBCS WILL BE SUPPORTED
+883 ROLLBACK TO SAVEPOINT OCCURRED WHEN THERE WERE OPERATIONS THAT CANNOT BE UNDONE, OR AN OPERATION THAT CANNOT BE UNDONE WAS PERFORMED WHEN THERE WAS A SAVEPOINT OUTSTANDING
+4726 THE STATEMENT WAS SUCCESSFULLY PREPARED, BUT IT CANNOT BE EXECUTED
+4745 A SECTION WAS BOUND SUCCESSFULLY, BUT AN ERROR OCCURRED WHEN A STATEMENT IN A RELATED EXTENDED SECTION WAS BOUND. INFORMATION RETURNED: SECTION NUMBER section-number, SQLCODE sqlcode, SQLSTATE sqlstate, AND MESSAGE TOKENS token-list
+4751 bind-type WARNING FOR PACKAGE = package-name, THE USE OF keyword RESULTED IN UNSUCCESSFUL COMPLETION FOR ONE OR MORE STATEMENTS
+20002 THE clause SPECIFICATION IS IGNORED FOR THE OBJECT object-name
+20007 USE OF OPTIMIZATION HINTS IS DISALLOWED BY A DB2 SUBSYSTEM THE SPECIAL REGISTER ‘OPTIMIZATION HINT’ IS SET TO THE DEFAULT VALUE OF BLANKS
+20122 DEFINE NO OPTION IS NOT APPLICABLE IN THE CONTEXT SPECIFIED
+20141 TRUNCATION OF VALUE WITH LENGTH length OCCURRED FOR hv-or-parm-number
+20187 ROLLBACK TO SAVEPOINT CAUSED A NOT LOGGED TABLE SPACE TO BE PLACED IN THE LPL
+20237 FETCH PRIOR ROWSET FOR CURSOR cursor-name RETURNED A PARTIAL ROWSET
+20245 NOT PADDED CLAUSE IS IGNORED FOR INDEXES CREATED ON AUXILIARY TABLES
+20270 OPTION NOT SPECIFIED FOLLOWING ALTER PARTITION CLAUSE
+20271 THE NAME AT ORDINAL POSITIONposition number IN THE STATEMENT, WITH NAME object-name, WAS TRUNCATED
+20272 TABLE SPACE table-space-name HAS BEEN CONVERTED TO USE TABLE-CONTROLLED PARTITIONING INSTEAD OF INDE CONTROLLED PARTIONING, ADDITIONAL INFORMATION old-limit-key-value
+20341 OWNERSHIP TRANSFER WAS IGNORED BECAUSE auth-id IS ALREADY THE OWNER OF THE OBJECT
+20348 THE PATH VALUE HAD BEEN TRUNCATED
+20360 TRUSTED CONNECTION CAN NOT BE ESTABLISHED FOR SYSTEM AUTHID authorization-name
+20365 A SIGNALING NAN WAS ENCOUNTERED, OR AN EXCEPTION OCCURRED IN AN ARITHIMETIC OPERATION OR FUNCTION INVOLVING A DECFLOAT
+20367 OPTION clause IS NOT SUPPORT IN THE CONTEXT IN WHICH IS WAS SPECIFIED
+20371 THE ABILITY TO USE TRUSTED CONTEXT context-name WAS REMOVED FROM SOME, BUT NOT ALL AUTHORIZATION IDS SPECIFIED IN THE STATEMENT
+20378 A NON-ATOMIC statement STATEMENT SUCCESSFULLY COMPLETED FOR SOME OF THE REQUESTED ROWS, POSSIBLY WITH WARNING, AND ONE OR MORE ERRORS, AND THE CURSOR CAN BE USED
+20458 THE PROCEDURE procedure-name HAS ENCOUNTERED AN INTERNAL PARAMETER PROCESSING ERROR IN PARAMETER number1. THE VALUE FOR PARAMETER number2 CONTAINS FURTHER INFORMATION ABOUT THE ERROR
+20459 THE PROCEDURE procedure-name HAD ENCOUNTERED AN INTERNAL PARAMETER PROCESSING ERROR. THE VALUE FOR PARAMETER number CONTAINS FURTHER INFORMATION ABOUT THE ERROR
+20460 THE PROCEDURE procedure-name SUPPORTS A HIGHER VERSION, version1. THAN THE SPECIFIED VERSION, version2, FOR PARAMETER number
+20461 THE PROCEDURE procedure-name RETURNED OUTPUT IN THE ALTERNATE LOCALE, locale1, INSTEAD OF THE LOCALE locale2, SPECIFIED IN PARAMETER number
+20468 THE COMBINATION OF TARGET NAMESPACE target-namespace AND SCHEMA LOCATION HINT location-hint IS NOT UNIQUE IN THE DB2 XML SCHEMA REPOSITORY
+20520 ATTEMPT TO USE A DEPRECATED FEATURE ON OBJECT object-name. REASON CODE reason-code
+20543 A SYSTEM PARAMETER WAS OVERRIDDEN FOR object-name WHEN PROCESSING THE statement-name STATEMENT.REASON reason-code
+30100 OPERATION COMPLETED SUCCESSFULLY BUT A DISTRIBUTION PROTOCOL VIOLATION HAS BEEN DETECTED. ORIGINA SQLCODE=original-sqlcode AND ORIGINAL SQLSTATE=original-sqlstate

Disclaimer: This Db2® 12 for z/OS Reference Guide was developed to help users in their daily activities in administrating and programming in Db2 for z/OS. There are no guarantees expressed or implied with the contents in this guide. We want to provide a quality and useful reference for users. Please notify us of any mistakes or errors in this reference guide at blogs@bmc.com. Db2 is a registered trademark of the IBM Corporation.

Order now! Get your free Db2 collateral from BMC!

Get your free Reference Guide and Catalog Tables Poster for z/OS from BMC. This collateral helps Db2 for z/OS users with daily activities in administering and programming for Db2 on z/OS.


These postings are my own and do not necessarily represent BMC's position, strategies, or opinion.

See an error or have a suggestion? Please let us know by emailing blogs@bmc.com.

Business, Faster than Humanly Possible

BMC works with 86% of the Forbes Global 50 and customers and partners around the world to create their future. With our history of innovation, industry-leading automation, operations, and service management solutions, combined with unmatched flexibility, we help organizations free up time and space to become an Autonomous Digital Enterprise that conquers the opportunities ahead.
Learn more about BMC ›

About the author

Stephen Watts

Stephen Watts (Birmingham, AL) contributes to a variety of publications including, Search Engine Journal, ITSM.Tools, IT Chronicles, DZone, and CompTIA.