1348
Db2 11 for z/OS Codes IBM GC19-4053-08

Db2 11 for z/OS: Codes · Db2 offerings. For example, "DB2 for z/OS" is now referred to as "Db2 for z/OS," beginning with Db2 11. While IBM implements the change across the Db2 family

  • Upload
    others

  • View
    38

  • Download
    2

Embed Size (px)

Citation preview

  • Db2 11 for z/OS

    Codes

    IBM

    GC19-4053-08

  • Notes

    Before using this information and the product it supports, be sure to read the general information under"Notices" at the end of this information.

    Subsequent editions of this PDF will not be delivered in IBM Publications Center. Always download thelatest edition from PDF format manuals for Db2 11 for z/OS ().

    2020-03-02 edition

    This edition applies to Db2® 11 for z/OS® (product number 5615-DB2), Db2 11 for z/OS Value Unit Edition (productnumber 5697-P43), and to any subsequent releases until otherwise indicated in new editions. Make sure you are usingthe correct edition for the level of the product.

    Specific changes are indicated by a vertical bar to the left of a change. A vertical bar to the left of a figure captionindicates that the figure has changed. Editorial changes that have no technical significance are not noted.© Copyright International Business Machines Corporation 1983, 2020.US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract withIBM Corp.

    https://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/home/src/tpc/db2z_pdfmanuals.html

  • Contents

    About this information .......................................................................................... vWho should read this information................................................................................................................vDb2 Utilities Suite for z/OS...........................................................................................................................vTerminology and citations...........................................................................................................................viAccessibility features for Db2 11 for z/OS..................................................................................................viHow to send your comments..................................................................................................................... viiHow to interpret code numbers................................................................................................................. vii

    Subcomponent identifiers.................................................................................................................... viiHow to find additional information about messages................................................................................. ix

    Part 1. SQL codes.................................................................................................. 1

    Chapter 1. Successful execution SQL codes............................................................................................... 3

    Chapter 2. SQL error codes....................................................................................................................... 37

    Part 2. Db2 reason codes................................................................................... 349

    Chapter 3. X'C1......' codes...................................................................................................................... 351

    Chapter 4. X'C2......' codes...................................................................................................................... 367

    Chapter 5. X'C5......' codes...................................................................................................................... 421

    Chapter 6. X'C6......' codes...................................................................................................................... 427

    Chapter 7. X'C8......' codes...................................................................................................................... 429

    Chapter 8. X'C9......' codes...................................................................................................................... 431

    Chapter 9. X'D1......' codes...................................................................................................................... 499

    Chapter 10. X'D3......' codes.................................................................................................................... 563

    Chapter 11. X'D4......' codes.................................................................................................................... 829

    Chapter 12. X'D5......' codes.................................................................................................................... 841

    Chapter 13. X'D6......' codes.................................................................................................................... 843

    Chapter 14. X'D7......' codes.................................................................................................................... 845

    Chapter 15. X'D9......' codes.................................................................................................................... 863

    Chapter 16. X'E2......' codes.................................................................................................................... 891

    Chapter 17. X'E3......' codes.................................................................................................................... 911

    Chapter 18. X'E4......' codes.................................................................................................................... 943

    iii

  • Chapter 19. X'E5......' codes.................................................................................................................. 1055

    Chapter 20. X'E6......' codes.................................................................................................................. 1093

    Chapter 21. X'E7......' codes.................................................................................................................. 1135

    Chapter 22. X'E8......' codes.................................................................................................................. 1163

    Chapter 23. X'E9......' codes.................................................................................................................. 1187

    Chapter 24. X'F1......' codes.................................................................................................................. 1191

    Chapter 25. X'F3......' codes.................................................................................................................. 1193

    Chapter 26. X'F7......' codes.................................................................................................................. 1261

    Chapter 27. X'F9......' codes.................................................................................................................. 1267

    Appendix A. SNA sense codes ......................................................................... 1273

    Appendix B. New, changed, and deleted codes................................................. 1281

    Appendix C. z/OS diagnostic services...............................................................1283

    Appendix D. SQLSTATE values and common error codes................................... 1285

    Appendix E. Db2 abend completion codes (X'04E' and X'04F)............................1315

    Appendix F. Resource types............................................................................. 1317

    Appendix G. ABEND codes associated with DSN1COPY misuse......................... 1323

    Information resources for Db2 11 for z/OS and related products....................... 1329

    Notices............................................................................................................1331Programming interface information......................................................................................................1332Trademarks............................................................................................................................................1332Terms and conditions for product documentation...............................................................................1332Privacy policy considerations................................................................................................................1333

    Glossary.......................................................................................................... 1335

    iv

  • About this information

    This information helps you to understand the codes that you could receive while working with Db2 11 forz/OS (Db2 for z/OS). The topics provide detailed descriptions of the codes that are issued by Db2, withexplanations and user responses for the situations that are associated with these codes.

    Throughout this information, "Db2" means "Db2 11 for z/OS". References to other Db2 products usecomplete names or specific abbreviations.

    Important: To find the most up to date content, always use IBM® Knowledge Center, which is continuallyupdated as soon as changes are ready. PDF manuals are updated only when new editions are published,on an infrequent basis.

    This information assumes that Db2 11 is running in new-function mode, and that your application isrunning with the application compatibility value of 'V11R1'.

    Availability of new function in Db2 11

    The behavior of data definition statements such as CREATE, ALTER, and DROP, which embed datamanipulation SQL statements that contain new capabilities, depends on the application compatibilityvalue that is in effect for the application. An application compatibility value of 'V11R1' must be ineffect for applications to use new capability in embedded statements such as SELECT, INSERT,UPDATE, DELETE, MERGE, CALL, and SET assignment-statement. Otherwise, an applicationcompatibility value of 'V10R1' can be used for data definition statements.

    Generally, new SQL capabilities, including changes to existing language elements, functions, datamanipulation statements, and limits, are available only in new-function mode with applications set toan application compatibility value of 'V11R1'.

    Optimization and virtual storage enhancements are available in conversion mode unless statedotherwise.

    SQL statements can continue to run with the same expected behavior as in DB2® 10 new-functionmode with an application compatibility value of 'V10R1'.

    Who should read this informationDb2 Codes lists codes that are issued by Db2, with explanations and suggested responses. Thisinformation is intended for users and system programmers who might encounter Db2 messages andcodes.

    Db2 Utilities Suite for z/OSImportant: In Db2 11, the Db2 Utilities Suite for z/OS is available as an optional product. You mustseparately order and purchase a license to such utilities, and discussion of those utility functions in thispublication is not intended to otherwise imply that you have a license to them.

    Db2 11 utilities can use the DFSORT program regardless of whether you purchased a license for DFSORTon your system. For more information, see the following informational APARs:

    • II14047• II14213• II13495

    Db2 utilities can use IBM Db2 Sort for z/OS (5655-W42) as an alternative to DFSORT for utility SORT andMERGE functions. Use of Db2 Sort for z/OS requires the purchase of a Db2 Sort for z/OS license. For moreinformation about Db2 Sort for z/OS, see Db2 Sort for z/OS.

    © Copyright IBM Corp. 1983, 2020 v

    http://www.ibm.com/support/knowledgecenter/SSEPEK/db2z_prodhome.htmlhttp://www.ibm.com/software/data/db2imstools/db2tools/db2-sort/

  • Related conceptsDb2 utilities packaging (Db2 Utilities)

    Terminology and citationsWhen referring to a Db2 product other than Db2 for z/OS, this information uses the product's full name toavoid ambiguity.

    About the Db2 brand change: IBM is rebranding DB2 to Db2. As such, there will be changes to all theDb2 offerings. For example, "DB2 for z/OS" is now referred to as "Db2 for z/OS," beginning with Db2 11.While IBM implements the change across the Db2 family of products, you might see references to theoriginal name "DB2 for z/OS" or "DB2" in different IBM web pages and documents. "DB2 for z/OS" and"Db2 for z/OS" refer to the same product, when the PID, Entitlement Entity, version, modification, andrelease information match. For more information, see Revised naming for IBM Db2 family products.

    The following terms are used as indicated:

    Db2Represents either the Db2 licensed program or a particular Db2 subsystem.

    Tivoli® OMEGAMON® XE for Db2 Performance Expert on z/OSRefers to any of the following products:

    • IBM Tivoli OMEGAMON XE for Db2 Performance Expert on z/OS• IBM Db2 Performance Monitor on z/OS• IBM Db2 Performance Expert for Multiplatforms and Workgroups• IBM Db2 Buffer Pool Analyzer for z/OS

    C, C++, and C languageRepresent the C or C++ programming language.

    CICS®Represents CICS Transaction Server for z/OS.

    IMSRepresents the IMS Database Manager or IMS Transaction Manager.

    MVS™Represents the MVS element of the z/OS operating system, which is equivalent to the Base ControlProgram (BCP) component of the z/OS operating system.

    RACF®Represents the functions that are provided by the RACF component of the z/OS Security Server.

    Accessibility features for Db2 11 for z/OSAccessibility features help a user who has a physical disability, such as restricted mobility or limitedvision, to use information technology products successfully.

    Accessibility features

    The following list includes the major accessibility features in z/OS products, including Db2 11 for z/OS.These features support:

    • Keyboard-only operation.• Interfaces that are commonly used by screen readers and screen magnifiers.• Customization of display attributes such as color, contrast, and font size

    Tip: The IBM Knowledge Center (which includes information for Db2 for z/OS) and its related publicationsare accessibility-enabled for the IBM Home Page Reader. You can operate all features using the keyboardinstead of the mouse.

    vi About this information

    https://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/ugref/src/tpc/db2z_utlpackaging.htmlhttps://www-01.ibm.com/common/ssi/ShowDoc.wss?docURL=/common/ssi/rep_ca/3/897/ENUS217-363/index.html

  • Keyboard navigation

    For information about navigating the Db2 for z/OS ISPF panels using TSO/E or ISPF, refer to the z/OSTSO/E Primer, the z/OS TSO/E User's Guide, and the z/OS ISPF User's Guide. These guides describe how tonavigate each interface, including the use of keyboard shortcuts or function keys (PF keys). Each guideincludes the default settings for the PF keys and explains how to modify their functions.

    Related accessibility information

    IBM and accessibility

    See the IBM Accessibility Center at http://www.ibm.com/able for more information about the commitmentthat IBM has to accessibility.

    How to send your commentsYour feedback helps IBM to provide quality information. Please send any comments that you have aboutthis book or other Db2 for z/OS documentation.

    Send your comments by email to [email protected] and include the name of the product, the versionnumber of the product, and the number of the book. If you are commenting on specific text, please listthe location of the text (for example, a chapter and section title or a help topic title).

    How to interpret code numbersDb2 issues SQL execution codes, reason codes, abend reason codes, and Db2 instrumentation facilityinterface reason codes to communicate about normal and error situations. The format of the codenumbers can help you understand what the code applies to.

    SQL return codes have the following format:-418

    signWith the exception of the return code 000, SQL return codes are prefixed with either a + or - sign. Thesign represents either success (+) or error (-). The unsigned code 000 indicates success.

    numberThe numeric portion of an SQL return code is three to five digits long.

    All Db2 reason codes, including subsystem termination reason codes, are four bytes long and have thefollowing format:00E50041

    00The first byte is always 00, which is the high-order byte.

    E5The second byte is the hexadecimal identifier (hex ID), which identifies the Db2 subcomponent. In thisexample, E5 identifies the Db2 agent services manager.

    0041The last two bytes are the numeric identifier, which is unique within the subcomponent.

    The Db2 reason codes are grouped by hexadecimal identifier and listed in numeric order.

    Subcomponent identifiersThe numbers that are assigned to messages and reason codes in Db2 are associated with certain Db2subcomponents or functional areas.

    The following table lists the Db2 subcomponents and functional areas and shows the identifiers that areassociated with each one.

    About this information vii

    http://www.ibm.com/ablemailto:[email protected]

  • Table 1. Subcomponent identifiers used in messages and reason codes

    Subcomponent or functionalarea

    Associated identifier formessages

    Associated identifier for reasoncodes

    Call attachment facility A X'C1'

    Buffer manager B X'C2'

    TSO attachment facility E X'C5'

    Message generator F X'C6'

    Database descriptor manager G n/a

    Precompiler, DSNH CLIST H X'C8'

    Data manager I X'C9'

    Recovery log manager J X'D1'

    Distributed data facility L X'D3'

    IMS attachment facility M X'D4'

    XML manager n/a X'D5'

    Data space manager P X'D7'

    MQListener Q n/a

    Recovery manager R X'D9'

    Storage manager S X'E2'

    Service controller, install T X'E3'

    Utilities U X'E4'

    Agent services manager V X'E5'

    Instrumentation facility W X'E6'

    Relational data system X X'E7'

    Initialization procedures Y X'E8'

    System parameter manager Z X'E9'

    Service facilities 1 X'F1'

    Subsystem supportsubcomponent

    3 X'F3'

    Group manager 7 X'F7'

    Db2 Accessories Suite for z/OS 5 n/a

    Sample applications 8 X'F8'

    General command processor 9 X'F9'

    Messages with DSNC and DSN2 identifiers and codes in the X'C3®' range were previously used to displayCICS messages. For information about CICS messages, see the information in the Search the CICSLibrary..

    viii About this information

    http://www-01.ibm.com/support/knowledgecenter/search?scope=SSWHM2&scope=SS2L7A&scope=SSCLNZ&scope=SSPPUS&scope=SSPPVB&scope=SSPPU4&scope=SSQJMU&scope=SSBQNK&scope=SSB2L6&scope=SSZHFX&scope=SSZHJ2&scope=SSGMGVhttp://www-01.ibm.com/support/knowledgecenter/search?scope=SSWHM2&scope=SS2L7A&scope=SSCLNZ&scope=SSPPUS&scope=SSPPVB&scope=SSPPU4&scope=SSQJMU&scope=SSBQNK&scope=SSB2L6&scope=SSZHFX&scope=SSZHJ2&scope=SSGMGV

  • How to find additional information about messagesWhen you are working with Db2, you might encounter messages issued by other IBM products, such asIMS, CICS, or z/OS. Information about messages issued by these and other IBM products is available inIBM Knowledge Center.CICS

    Information for multiple versions of CICS are available as part of the CICS library. Search the CICSLibrary..

    IMSIMS messages are available in IMS messages and codes.

    IRLMMessages and codes related to the IRLM, which were previously part of Db2 Codes, are now providedin IRLM Messages and Codes for IMS and Db2 for z/OS. IRLM messages have the prefix dxr.

    • IRLM return and reason codes (IRLM)• IRLM abend codes (IRLM)• DXR messages (IRLM)

    z/OSInformation for multiple versions of z/OS is available as part of the z/OS library. Search the z/OSlibrary..

    About this information ix

    http://www-01.ibm.com/support/knowledgecenter/search?scope=SSWHM2&scope=SS2L7A&scope=SSCLNZ&scope=SSPPUS&scope=SSPPVB&scope=SSPPU4&scope=SSQJMU&scope=SSBQNK&scope=SSB2L6&scope=SSZHFX&scope=SSZHJ2&scope=SSGMGVhttp://www-01.ibm.com/support/knowledgecenter/search?scope=SSWHM2&scope=SS2L7A&scope=SSCLNZ&scope=SSPPUS&scope=SSPPVB&scope=SSPPU4&scope=SSQJMU&scope=SSBQNK&scope=SSB2L6&scope=SSZHFX&scope=SSZHJ2&scope=SSGMGVhttp://www-01.ibm.com/support/knowledgecenter/SSEPH2_15.1.0/com.ibm.ims15.doc.msgs/common/mc.htmhttp://www.ibm.com/support/knowledgecenter/SSEPEK_12.0.0/irlm/src/tpc/irlm_codes.htmlhttp://www.ibm.com/support/knowledgecenter/SSEPEK_12.0.0/irlm/src/tpc/irlm_abendcodes.htmlhttp://www.ibm.com/support/knowledgecenter/SSEPEK_12.0.0/irlm/src/tpc/irlm_messages.htmlhttp://www-01.ibm.com/support/knowledgecenter/search?scope=SSLTBWhttp://www-01.ibm.com/support/knowledgecenter/search?scope=SSLTBW

  • x Db2 11 for z/OS: Codes

  • Part 1. SQL codesWhen Db2 executes an SQL statement, it returns information about the statement execution. Thisinformation includes the SQL return code (SQLCODE) and the SQLSTATE, which indicate whetherstatement execution was successful.

    An application program that contains executable SQL statements must do one of the following things:

    • Declare SQLCODE and SQLSTATE (SQLCOD and SQLSTA in Fortran) as stand-alone host variables. If youspecify the STDSQL(YES) precompiler or SQL statement coprocessor option, these host variablesreceive the return codes, and you should not include an SQLCA in your program.

    • Provide a structure named SQLCA. The SQLCA includes the SQLCODE and SQLSTATE, in addition toother status information. You can provide an SQLCA by using the INCLUDE SQLCA statement. You cancall the DSNTIAR sample subroutine from your application program to format the contents of theSQLCA, or you can retrieve fields from the SQLCA yourself.

    In this section, the italicized phrases in the SQL return code message text corresponds to the tokens thatare returned in the SQLERRMC field of the SQLCA. If Db2 returns several tokens, they appear sequentiallyin SQLERRMC in the order that they appear in the message text.

    In some cases a token is not applicable or available for a specific instance of an error, and *N is returnedinstead.

    Tokens might sometimes refer to the names of objects on accelerators instead of the names ofassociated objects on Db2.

    SQLCODE

    Regardless of whether the application program provides an SQLCA or a stand-alone variable, SQLCODE isset by Db2 after each SQL statement is executed. Db2 conforms to the ISO/ANSI SQL standard as follows:

    • If SQLCODE = 0, execution was successful.• If SQLCODE > 0, execution was successful with a warning.• If SQLCODE < 0, execution was not successful.• SQLCODE = 100, "no data" was found. For example, a FETCH statement returned no data because the

    cursor was positioned after the last row of the result table.

    SQLSTATE

    SQLSTATE is also set by Db2 after the execution of each SQL statement. Thus, application programs cancheck the execution of SQL statements by testing SQLSTATE instead of SQLCODE. SQLSTATE (SQLSTT inFORTRAN) is a 5-byte character string variable in the SQLCA.

    SQLSTATE provides application programs with common codes for common error conditions (the values ofSQLSTATE are product-specific only if the error or warning is product-specific). Furthermore, SQLSTATE isdesigned so that application programs can test for specific errors or classes of errors. The coding schemeis the same for all IBM relational database products.

    Related conceptsSQL communication area (SQLCA) (Db2 SQL)Related tasksChecking the execution of SQL statements by using the SQLCA (Db2 Application programming and SQL)Displaying SQLCA fields by calling DSNTIAR (Db2 Application programming and SQL)Related referenceDescription of SQLCA fields (Db2 SQL)SQLSTATE values and common error codesDb2 produces SQLSTATE values when it works as an application server or requester.

    © Copyright IBM Corp. 1983, 2020 1

    https://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/sqlref/src/tpc/db2z_sqlcommunicationsareaintro.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/apsg/src/tpc/db2z_checkexecutionsqlca.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/apsg/src/tpc/db2z_displaysqlcadsntiar.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/sqlref/src/tpc/db2z_descriptionofsqlcafields.html

  • 2 Db2 11 for z/OS: Codes

  • Chapter 1. Successful execution SQL codesSQL return codes that are preceded by a plus sign (+) indicate that the SQL statement execution wassuccessful.

    Successful SQL execution codes for Java programs: For information on SQL execution codes in therange +4200 to +4299, and +4450 to +4499, see Error codes issued by the IBM Data Server Driver forJDBC and SQLJ (Db2 Application Programming for Java).

    000 SUCCESSFUL EXECUTION

    Explanation

    Unqualified successful execution or successfulexecution with one or more warnings. If SQLWARN0 isblank, there are no warnings. If SQLWARN0 = W, atleast one of the other warning indicators in the SQLCAhas been set to indicate a warning condition. Forexample, SQLWARN1 is used to indicate that a value ofa string column was truncated when assigned to a hostvariable.

    SQLSTATE

    00000 for unqualified successful execution

    SQLSTATE

    01ddd for successful execution with warning 'ddd'.

    Related conceptsSQL communication area (SQLCA) (Db2 SQL)Related referenceDescription of SQLCA fields (Db2 SQL)

    +012 THE UNQUALIFIED COLUMN NAMEcolumn-name WAS INTERPRETEDAS A CORRELATED REFERENCE

    Explanation

    The column name does not identify a column of a tableor view in the FROM clause of the subquery. However,it does identify a column of a table or view in a FROMclause at a higher level in the statement.

    System action

    The column name is interpreted as a correlatedreference.

    Programmer response

    If Db2 interpretates the column name differently thanyou intended, rewrite the SQL statement and submit itagain. If you intend the column name to refer to atable named at a higher level, we advise rewriting thestatement anyway, using a table name or correlation

    name as a qualifier for the column name. Theunqualified column name could be interpreteddifferently if you do a rebind after altering one of thetables to which you refer.

    SQLSTATE

    01545

    +020 BIND, REBIND, OR PRECOMPILEOPTION option-name IS NOTSUPPORTED BY THE TARGETSERVER AND WILL BE IGNORED.

    Explanation

    At least one option specified at bind, rebind, orprecompile time is not supported by the target server.

    option-nameThe name of the first unsupported option.

    System action

    Processing continues, but the unsupported options areignored.

    User response

    Ensure that the specification of bind, rebind, orprecompile option names or the associated optionvalues was intended while connected to this server.

    SQLSTATE

    01615

    Related referenceBIND PACKAGE (DSN) (Db2 Commands)REBIND PACKAGE (DSN) (Db2 Commands)

    +098 A DYNAMIC SQL STATEMENTENDS WITH A SEMICOLON.

    Explanation

    The statement string of a PREPARE or EXECUTEIMMEDIATE statement is a valid dynamic SQLstatement, but it ends with a semicolon.

    © Copyright IBM Corp. 1983, 2020 3

    https://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/java/src/tpc/imjcc_rjvjcsqc.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/java/src/tpc/imjcc_rjvjcsqc.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/sqlref/src/tpc/db2z_sqlcommunicationsareaintro.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/sqlref/src/tpc/db2z_descriptionofsqlcafields.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/comref/src/tpc/db2z_cmd_bindpackage.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/comref/src/tpc/db2z_cmd_rebindpackage.html

  • System action

    The semicolon and any subsequent text are ignored.

    Programmer response

    Check that the semicolon is being used as a statementterminator.

    SQLSTATE

    01568

    +100 ROW NOT FOUND FOR FETCH,UPDATE OR DELETE, OR THERESULT OF A QUERY IS AN EMPTYTABLE

    Explanation

    One of the following conditions occurred:

    • No row met the search conditions specified in anUPDATE or DELETE statement.

    • The result of a SELECT INTO statement was anempty table.

    • The result of the subselect of an INSERT statementis empty.

    • A FETCH statement was executed when the cursorwas positioned after the last row of the result table.

    • No available rows qualified for return when SKIPLOCKED DATA was specified with isolation level CSor RS.

    • A FETCH statement that returns a rowset wasissued, but there were not enough rows after thecurrent cursor position to reposition the cursor on afull rowset. The cursor has been positioned on apartial rowset. If a target was specified, data wasreturned only for the number of rows that wereactually fetched for the partial rowset. The numberof rows that were returned is in field SQLERRD3 ofthe SQLCA.

    When a SELECT statement is executed using SPUFI,this SQLCODE indicates normal completion.

    This SQLCODE is also issued when LOB data cannot bereturned. This situation can occur when an applicationis running with isolation level UR and anotherapplication has locked the LOB table space.

    System action

    No data was retrieved, updated, or deleted.

    SQLSTATE

    02000

    +110 SQL UPDATE TO A DATA CAPTURETABLE NOT SIGNALED TOORIGINATING SUBSYSTEM

    Explanation

    IMS DataPropagator exit routine issued an SQL datachange statement to a table defined with DATACAPTURE CHANGES. Since data capture is already inprogress, notification is not sent back to the originatingIMS subsystem.

    System action

    Db2 changes the data and records the change in thelog. Db2 does not notify IMS DataPropagator's exitroutine of the change, because doing so might causethe same change to be made again.

    SQLSTATE

    01561

    +111 THE SUBPAGES OPTION IS NOTSUPPORTED FOR TYPE 2 INDEXES

    Explanation

    You cannot use the SUBPAGES option for type 2indexes.

    System action

    The option is ignored and processing continues.

    Programmer response

    Remove the SUBPAGES option to get rid of thewarning.

    SQLSTATE

    01590

    +117 THE NUMBER OF INSERT VALUESIS NOT THE SAME AS THENUMBER OF OBJECT COLUMNS

    Explanation

    The number of insert values in the value list of theinsert operation is not the same as the number ofobject columns specified.

    System action

    A valid plan or package will be created if no errors aredetected. The statement is bound dynamically on eachexecution of the statement.

    4 Db2 11 for z/OS: Codes

  • Programmer response

    For better performance, rebind the plan or packageafter correcting the statement. To correct thestatement, specify one and only one value for each ofthe specified object columns.

    SQLSTATE

    01525

    +162 TABLESPACE database-name.tablespace-name HAS BEENPLACED IN CHECK PENDING

    Explanation

    The indicated table space is in check pending statusbecause the ALTER TABLE statement was used tospecify either of the following:

    • A referential constraint• A check constraint, when the CURRENT RULES

    special register is set to 'DB2'

    The table space is not generally available until thecheck pending status is removed from the table space.

    System action

    The table space was placed in check pending status.

    Programmer response

    Run the CHECK DATA utility. The enforcement of thereferential constraint or the check constraint isdeferred until the CHECK DATA utility is run.

    SQLSTATE

    01514

    +203 THE QUALIFIED COLUMN NAMEcolumn-name WAS RESOLVEDUSING A NON-UNIQUE ORUNEXPOSED NAME

    Explanation

    The table designator selected to resolve a qualifiedcolumn name is one of the following:

    • An unexposed name• An exposed name that has an exposed duplicate in

    the same FROM clause• An exposed name that has an unexposed duplicate

    which appears before the selected name in theordered list of names to which the qualifier iscompared

    Therefore, the statement does not conform to theguidelines for using only unique exposed names asqualifiers or it is possible that the column referencewas not resolved to the intended instance of the tableor view.

    System action

    Db2 uses the selected name to resolve the reference.

    Programmer response

    If Db2 did not resolve of the qualifier how youintended, rewrite the SQL statement and submit itagain.

    SQLSTATE

    01552

    Related conceptsResolution of column name qualifiers andcolumn names (Db2 SQL)Qualified column names (Db2 SQL)Language elements (Db2 SQL)

    +204 name IS AN UNDEFINED NAME

    Explanation

    The object identified by name is not defined in the Db2subsystem. This return code can be generated for anytype of Db2 object.

    System action

    A valid plan or package will be created if no errors aredetected. The statement is bound dynamically on eachexecution of the statement.

    Programmer response

    For better performance, rebind the plan or packageafter correcting the statement. To correct thestatement, determine that the object name wascorrectly specified in the SQL statement (including anyrequired qualifiers). If so, ensure that the object existsin the system before resubmitting the statement.

    SQLSTATE

    01532

    +205 column-name IS NOT A COLUMNOF TABLE table-name

    Explanation

    For ALTER TABLE ALTER COLUMN, column column-name is not a column in table table-name.

    Chapter 1. Successful execution SQL codes 5

    https://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/sqlref/src/tpc/db2z_columnnamequalifsandresolution.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/sqlref/src/tpc/db2z_columnnamequalifsandresolution.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/sqlref/src/tpc/db2z_qualifiedcolumnnames.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/sqlref/src/tpc/db2z_langelementsoverview.html

  • System action

    A valid plan or package will be created if no errors aredetected. The statement is bound dynamically on eachexecution of the statement.

    Programmer response

    Verify that the column and table names are specifiedcorrectly (including any required qualifiers) in the SQLstatement.

    SQLSTATE

    01533

    +206 column-name IS NOT A COLUMNOF AN INSERTED TABLE,UPDATED TABLE, MERGED TABLE,OR ANY TABLE IDENTIFIED IN AFROM CLAUSE

    Explanation

    This return code is used to report one of these errors:

    • In the case of an INSERT or UPDATE statement, orSELECT FROM INSERT or UPDATE statement, thespecified column is not a column of the table or viewthat was specified as the object of the insert orupdate.

    • In the case a SELECT or DELETE statement, thespecified column is not a column of any of the tablesor views identified in a FROM clause in thestatement.

    • There is a correlated reference in GROUP BY.• There is an unresolved qualified reference in

    HAVING.• In the case of a MERGE statement or SELECT from

    MERGE statement, the specified column is not acolumn in the target-table. Also, it is not a columnspecified in the include-columns clause.

    System action

    A valid plan or package will be created if no errors aredetected. The statement is bound dynamically on eachexecution of the statement.

    Programmer response

    For better performance, rebind the plan or packageafter correcting the statement. To correct thestatement, verify that the column and table names arespecified correctly in the SQL statement. In the case ofa SELECT statement, check to be sure that all of therequired tables were named in the FROM clause.

    SQLSTATE

    01533

    +217 THE STATEMENT WAS NOTEXECUTED AS ONLY EXPLAININFORMATION REQUESTS AREBEING PROCESSED.

    Explanation

    The current value of the EXPLAIN MODE specialregister has been set to EXPLAIN. This value allowsdynamic SQL statements to be prepared and explainedbut prevents any dynamic statement from beingexecuted.

    System action

    The statement was not executed because onlyinformation requests from EXPLAIN are beingprocessed.

    Programmer response

    To execute the statement, change the value of theEXPLAIN MODE special register to a setting other thanEXPLAIN. Issue the appropriate SET statement fromthe interface or application that is encountering thiscondition.

    SQLSTATE

    01604

    +218 THE SQL STATEMENTREFERENCING A REMOTE OBJECTCANNOT BE EXPLAINED

    Explanation

    The user has used EXPLAIN(YES) on the bindsubcommand to bind an application which has SQLstatement referencing a remote object or the user hasa static EXPLAIN SQL statement which references aremote object in the application program. EXPLAIN ona remote object is not supported by Db2.

    It is issued at BIND time, and only withVALIDATE(RUN).

    System action

    The plan or package will be bound successfully, but noinformation will be filled in the user's PLAN_TABLE forthe SQL statement referencing a remote object. AnSQLCODE -512 will be issued at run time if theEXPLAIN statement is found to explain a remoteobject.

    6 Db2 11 for z/OS: Codes

  • SQLSTATE

    01537

    +219 THE REQUIRED EXPLANATIONTABLE table-name DOES NOTEXIST

    Explanation

    The EXPLAIN statement assumes the existence of anEXPLAIN table and it is not defined in the Db2subsystem as a base table.

    System action

    A valid plan or package will be created if no errors aredetected. The statement is bound dynamically on eachexecution of the statement.

    Programmer response

    For better performance, rebind the plan or packageafter correcting the statement. To correct thestatement, determine whether the required EXPLAINtable does exist. If not, create the required table.

    SQLSTATE

    01532

    Related tasksCreating EXPLAIN tables (Db2 Performance)Related referenceEXPLAIN (Db2 SQL)EXPLAIN tables (Db2 Performance)PLAN_TABLE (Db2 Performance)

    +220 THE COLUMN column-name INEXPLANATION TABLE table-nameIS NOT DEFINED PROPERLY

    Explanation

    An error occurred during the insertion of a row into anoptional explanation table.

    column-nameThe name of the column that is the cause of theerror. Possible reasons for this error include:

    • A column is missing.• Columns are defined in the wrong order.• The table contains an extra column.• A column description is invalid because of its

    name, data type, length, or null attributes.

    table-nameThe name of the explanation table.

    System action

    A valid plan or package will be created if no additionalerrors are detected. The statement is bounddynamically on each execution of the statement.

    Programmer response

    For better performance, rebind the plan or packageafter correcting the statement. To correct thestatement, correct the definition of the requiredexplanation table.

    SQLSTATE

    01546

    Related tasksCreating EXPLAIN tables (Db2 Performance)Related referenceEXPLAIN tables (Db2 Performance)EXPLAIN (Db2 SQL)

    +222 HOLE DETECTED USING CURSORcursor-name

    Explanation

    A delete hole or an update hole has been detectedwhile processing a FETCH for cursor cursor-name.With a SENSITIVE STATIC cursor, a delete hole occurswhen Db2 tries to refetch a row from the database fora cursor and finds that the corresponding row of theunderlying table has been deleted. An update holeoccurs when Db2 tries to refetch a row from thedatabase for a cursor and finds that the correspondingrow of the underlying table no longer satisfies thesearch condition.cursor-name

    Name of the cursor used for the FETCH statement.

    System action

    The statement cannot be processed, and no data isfetched. The cursor is repositioned on the hole.

    Programmer response

    Correct the application program to handle thissituation, or change isolation levels so the base rowcannot be deleted during the cursor operation.

    SQLSTATE

    02502

    +231 CURRENT POSITION OF CURSORcursor-name IS NOT VALID FORTHE SPECIFIED FETCH

    Chapter 1. Successful execution SQL codes 7

    https://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/perf/src/tpc/db2z_createexplaintables.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/sqlref/src/tpc/db2z_sql_explain.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/usrtab/src/tpc/db2z_explaintables.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/usrtab/src/tpc/db2z_plantable.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/perf/src/tpc/db2z_createexplaintables.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/usrtab/src/tpc/db2z_explaintables.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/sqlref/src/tpc/db2z_sql_explain.html

  • ORIENTATION OF THE CURRENTROW OR ROWSET

    Explanation

    The cursor was not positioned on a row or rowset, andone of the following fetch orientations specified thatthe cursor was to be positioned relative to its currentposition:

    • CURRENT or CURRENT ROWSET• RELATIVE 0 or ROWSET STARTING AT RELATIVE 0

    cursor-nameName of the cursor used for the FETCH statement.

    System action

    The statement cannot be processed. No data wasfetched, and the cursor position is unchanged.

    Programmer response

    Correct the application program to establish a validcursor position before issuing this FETCH statement.

    SQLSTATE

    02000

    +236 SQLDA INCLUDES integer1SQLVAR ENTRIES, BUT integer2ARE REQUIRED FOR integer3COLUMNS

    Explanation

    The value of the SQLN field of the SQLDA should be atleast as large as the number of columns beingdescribed. integer3 is the number of columns beingdescribed.

    In the case that USING BOTH has been specified,twice as many SQLVAR entries are needed as thenumber of columns being described.

    The number of SQLVAR entries that are needed toreturn all of the information about the columns isinteger2.

    Attention: In the case of DESCRIBE INPUT, eachreference to column would actually be parameter.

    System action

    The SQLDAID 7th byte has been set to "on" with avalue of 2 indicating that 2 SQLVAR entries are neededfor each column. Db2 has not set any SQLVAR entries.

    Programmer response

    Increase the value of the SQLN field in the SQLDA tothe value indicated in the message (making sure theSQLDA is large enough to support that amount) andresubmit the statement.

    SQLSTATE

    01005

    +237 SQLDA INCLUDES integer1SQLVAR ENTRIES, BUT integer2ARE REQUIRED BECAUSE ATLEAST ONE OF THE COLUMNSBEING DESCRIBED IS A DISTINCTTYPE

    Explanation

    Given that at least one of the columns being describedis a distinct type, space should be provided for theextended SQLVAR entries in addition to the baseSQLVAR entries. The value of SQLN, integer1, indicatesthat there are not enough SQLVAR entries for the baseand extended SQLVAR entries.

    The total number of SQLVAR entries that are requireddepends on whether USING BOTH was specified (n isthe number of columns being described):

    • With USING BOTH, space should be allocated for 3nSQLVAR entries.

    • Otherwise, space should be allocated for 2n SQLVARentries.

    The number of SQLVAR entries that are needed toreturn all of the information about the columns isinteger2.

    Attention: In the case of DESCRIBE INPUT, eachreference to column would actually be parameter.

    System action

    Db2 has set the SQLDAID 7th byte flag "on" becausesufficient space was not provided for the extendedSQLVAR entries. The value of the 7th byte flagindicates how many SQLVAR entries are needed foreach column. Additionally, because there were enoughSQLVAR entries for the base SQLVARs, Db2 has set thefields of the base SQLVAR entries. However, Db2 hasnot set any extended SQLVAR entries.

    Programmer response

    If there is no need for the additional information aboutthe distinct type(s), then no action is required unlessUSING BOTH was specified (in which case additionalSQLVAR entries must be provided for the labels).

    8 Db2 11 for z/OS: Codes

  • If the distinct type information is needed, the value ofthe SQLN field in the SQLDA should be increased tointeger2 (after making sure that the SQLDA is largeenough to support that amount) and the statementshould be resubmitted.

    SQLSTATE

    01594

    +238 SQLDA INCLUDES integer1SQLVAR ENTRIES, BUT integer2SQLVAR ENTRIES ARE NEEDEDFOR integer3 COLUMNS BECAUSEAT LEAST ONE OF THE COLUMNSBEING DESCRIBED IS A LOB

    Explanation

    Given that at least one the columns being described isa LOB, space must be provided for the extendedSQLVAR entries in addition to the base SQLVARentries. The value of SQLN, integer1, indicates thatthere are not enough SQLVAR entries for the base andextended SQLVAR entries. One or more of the columnsbeing described may be a distinct type.

    The total number of SQLVAR entries that are requireddepends on whether USING BOTH was specified or not(n is the number of columns being described which isinteger3), and whether the columns include anydistinct types:

    • With USING BOTH, and one or more distinct types,space should be allocated for 3n SQLVAR entries.

    • Otherwise, space should be allocated for 2n SQLVARentries.

    The number of SQLVAR entries that are needed toreturn all of the information about the columns isinteger2.

    Important: In the case of DESCRIBE INPUT, eachreference to column would actually be parameter.

    System action

    Db2 has set the SQLDAID 7th byte flag "on" becausesufficient space was not provided for the extendedSQLVAR entries. The value of the 7th byte flagindicates how many SQLVAR entries are needed foreach column. Db2 has not set any SQLVAR entries.

    Programmer response

    Increase the value of the SQLN field in the SQLDA tointeger2 (after making sure that the SQLDA is largeenough to support that amount) and resubmit thestatement.

    SQLSTATE

    01005

    +239 SQLDA INCLUDES integer1SQLVAR ENTRIES, BUT integer2ARE REQUIRED FOR integer3COLUMNS BECAUSE AT LEASTONE OF THE COLUMNS BEINGDESCRIBED IS A DISTINCT TYPE

    Explanation

    Given that at least one of the columns being describedis a distinct type, space should be provided for theextended SQLVAR entries in addition to the baseSQLVAR entries. The value of SQLN, integer1, indicatesthat there are not enough SQLVAR entries for the baseand extended SQLVAR entries.

    The total number of SQLVAR entries that are requireddepends on whether USING BOTH was specified or not(n is the number of columns being described which isinteger3),

    • With USING BOTH, space should be allocated for 3nSQLVAR entries.

    • Otherwise, space should be allocated for 2n SQLVARentries.

    The number of SQLVAR entries that are needed toreturn all of the information about the columns isinteger2.

    Note: in the case of DESCRIBE INPUT, each referenceto column would actually be parameter.

    System action

    Db2 has set the SQLDAID 7th byte flag "on" becausesufficient space was not provided for the extendedSQLVAR entries. The value of the 7th byte flagindicates how many SQLVAR entries are needed foreach column. Db2 has not set any SQLVARentries. :elq.

    Programmer response

    If the distinct type information is needed, the value ofthe SQLN field in the SQLDA should be increased tointeger2 (after making sure the SQLDA is large enoughto support that amount) and the statement should beresubmitted.

    If there is no need for the additional information aboutthe distinct type(s) in the result set, then it is possibleto resubmit the statement only providing enoughSQLVAR entries to accommodate the number ofcolumns being described (i.e. provide the necessarynumber of base SQL entries).

    Chapter 1. Successful execution SQL codes 9

  • SQLSTATE

    01005

    +252 A NON-ATOMIC statementSTATEMENT SUCCESSFULLYPROCESSED ALL REQUESTEDROWS, WITH ONE OR MOREWARNING CONDITIONS

    Explanation

    A non-atomic statement statement successfullyprocessed multiple rows of data. However, one ormore warning conditions occurred. Use GETDIAGNOSTICS to obtain information about the warningconditions that occurred.

    System action

    The statement was processed.

    Programmer response

    Analyze the warning conditions to determine whetherthe statement should be rolled back or not.

    SQLSTATE

    01659

    +304 A VALUE WITH DATA TYPE data-type1 CANNOT BE ASSIGNED TO AHOST VARIABLE BECAUSE THEVALUE IS NOT WITHIN THERANGE OF THE HOST VARIABLEIN POSITION position-numberWITH DATA TYPE data-type2

    Explanation

    A FETCH or SELECT into a host variable list orstructure, position number position-number failedbecause the host variable having data type data-type2was not large enough to hold the retrieved valuehaving data type data-type1.

    System action

    The FETCH or SELECT could not return the data for theindicated SELECT item, the indicator variable is set tonegative two (-2) to indicate a null value returned.Processing continues.

    Programmer response

    Verify that table definitions are current, and that thehost variable has the proper data type. See theexplanation for SQLCODE -405 for ranges of SQL datatypes.

    SQLSTATE

    01515

    +331 THE NULL VALUE HAS BEENASSIGNED TO A HOST VARIABLEOR PARAMETER BECAUSE THESTRING CANNOT BE CONVERTEDFROM source-ccsid TO target-ccsid.REASON reason-code, POSITIONposition-number

    Explanation

    A string had to be converted from source-ccsid totarget-ccsid and an error occurred during theconversion. The position-number, if provided (non-zero), is the ordinality of the host variable orparameter in the SQLDA. See the description ofSQLCODE -331 for further information including themeaning of the reason-code.

    System action

    The host variable is unchanged and its indicatorvariable is set to -2 to indicate that a null value isreturned. Execution of the statement continues as ifthe conversion error had not occurred.

    SQLSTATE

    01520

    +335 DB2 CONVERTED A HOSTVARIABLE, PARAMETER, ORCOLUMN NUMBER var-num var-name-or-num TO COLUMN NAME,HOST VARIABLE, OR EXPRESSIONNUMBER col-name-or-num FROMfrom ccsid TO to-ccsid, ANDRESULTING IN SUBSTITUTIONCHARACTERS.

    Explanation

    A conversion error occurred during the conversion of astring to a different coded character set. One or moresubstitution characters have been placed in the stringduring the conversion process.

    var-num var-name-or-numThe value of the host variable, the parameter, orthe column number prior to the conversionprocess. This value might be the string *N if thecolumn number is not available when thisSQLCODE is issued.

    col-name-or-numThe value of the host variable, the parameter orthe column number after the conversion process.This value might be the string *N if the column

    10 Db2 11 for z/OS: Codes

  • number is not available when this SQLCODE isissued.

    from ccsidThe input CCSID for the host variable, parameter,or column number.

    to-ccsidThe resulting CCSID from the conversion of thehost variable, parameter, or column number.

    System action

    Db2 processes the statement successfully.

    Programmer response

    This warning can occur in two situations:

    • If trace for IFCID 136 or 168 is not active, Db2processes the SQL statement, but used substitutioncharacters instead of one or more characters as aresult of character conversion from from ccsid to to-ccsid. If substitution is acceptable, no action isnecessary. If substitution is not acceptable, issue aROLLBACK. Ensure that data being provided to Db2is convertible from from ccsid to to-ccsid withoutdata loss.

    • If trace for IFCID 136 or 168 is active, and the to-ccsid token is an EBCDIC CCSID, and systemparameter UIFCIDS is OFF, this warning is caused bythe conversion to EBCDIC CCSID for IFCID tracerecord. Use the GET DIAGNOSTICS statement todetermine if the there are other warnings associatedwith the original SQL string. If GET DIAGNOSTICSreturns no other warnings, no action is required.

    SQLSTATE

    01517

    Related referenceGET DIAGNOSTICS (Db2 SQL)

    +347 THE RECURSIVE COMMON TABLEEXPRESSION name MAY CONTAINAN INFINITE LOOP

    Explanation

    The recursive common table expression called namemay not complete. This warning is based on notfinding specific syntax as part of the iterative portion ofthe recursive common table expression. The expectedsyntax includes:

    • incrementing an INTEGER column in the iterativeselect list by 1.

    • a predicate in the where clause of the iterativeportion of the form "counter_col < constant" or"counter_col < :hostvar".

    The absence of this syntax in the recursive commontable expression may result in an infinite loop. Thedata or some other characteristic of the recursivecommon table expression may allow the successfulcompletion of the statement anyway.

    System action

    The statement cannot be executed.

    Programmer response

    To prevent an infinite loop, include the expectedsyntax as described.

    SQLSTATE

    01605

    +354 A ROWSET FETCH STATEMENTMAY HAVE RETURNED ONE ORMORE ROWS OF DATA. HOWEVER,ONE OR MORE WARNINGCONDITIONS WERE ALSOENCOUNTERED. USE THE GETDIAGNOSTICS STATEMENT FORMORE INFORMATION REGARDINGTHE CONDITIONS THAT WEREENCOUNTERED

    Explanation:A rowset FETCH statement encountered one or morewarning conditions. Use the GET DIAGNOSTICSstatement to obtain information about the conditionsthat occurred, and to determine if data was returned.It is possible that one or more rows of data werereturned. If the row information that was returned forthe row that encountered the condition is incomplete,do not use the data for the row that encountered thecondition, such as displaying or printing the data.

    System action:Db2 processed the statement successfully, but with awarning that the fetching of some rows might haveencountered warnings.

    Programmer response

    Analyze the conditions to determine whether follow-up actions are needed. The GET DIAGNOSTICSstatement can be used to determine which additionalactions might be necessary.

    Attention: It is also possible that an end ofdata condition was detected. SQLERRD3 andGET DIAGNOSTICS can be used to determine ifall of the requested rows were fetched or if apartial rowset was returned.

    Chapter 1. Successful execution SQL codes 11

    https://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/sqlref/src/tpc/db2z_sql_getdiagnostics.html

  • SQLSTATE

    01668

    +361 COMMAND WAS SUCCESSFUL BUTRESULTED IN THE FOLLOWING:msg-token

    Explanation

    During the processing of a command such as a BINDPACKAGE or DROP or FREE PACKAGE, a conditionoccurred, as specified by msg-token, and thecommand needs to be examined.

    System action

    The request was successful.

    User response

    Evaluate the information contained in msg-token todetermine if the results were as expected.

    SQLSTATE

    0168B

    +364 DECFLOAT EXCEPTION exception-type HAS OCCURRED DURINGoperation-type OPERATION,POSITION position-number

    Explanation

    The exception error exception-type occurred whileperforming an ADDITION, SUBTRACTION,MULTIPLICATION, DIVISION, NEGATION, or BUILT-IN FUNCTION operation on a field whose data type isDECFLOAT. The error occurred while processing anarithmetic expression. If the error occurred in theSELECT list of an outer SELECT statement, position inthe select list is denoted by position-number. If not,position number is 0. The possible exception types areUNDERFLOW, OVERFLOW, INEXACT, INVALIDOPERATION, DIVISION BY ZERO, or SUBNORMAL. Thedata type displayed in the message may indicate thedata type of the temporary internal copy of the data,which may differ from the actual column or literal datatype due to conversions by Db2.

    Any of the exceptions or overflows can occur duringthe processing of a built-in function. If operation-typeis FUNCTION, then the error occurred whileprocessing either an input, intermediate, or final value.The cause could be that the value of a parameter is outof range.

    Note: Parts of exception-type, operation-type, andposition-number might or might not be returned inSQLCA, depending upon when the error was detected.

    System action

    The resulting data proceeds according to IEEE 754rrules. Execution of the statement continues. If thestatement is cursor controlled, then the cursor willremain open.

    Programmer response

    Examine the expression for which the warningoccurred to see if the likely cause of the problem canbe determined. The problem may be data-dependent,in which case it will be necessary to examine the datathat was being processed at the time that the erroroccurred. See the explanation of SQLCODE -405 forallowed ranges of numeric data types.

    SQLSTATE

    0168C if INEXACT

    0168D if INVALID OPERATION

    0168E if UNDERFLOW,OVERFLOW

    0168F if DIVISION BY ZERO

    0168G if SUBNORMAL

    +385 ASSIGNMENT TO AN SQLSTATEOR SQLCODE VARIABLE IN ANSQL ROUTINE routine-name MAYBE OVERWRITTEN AND DOES NOTACTIVATE ANY HANDLER

    Explanation

    SQL routine routine-name was created, but it containsan assignment statement that specifies the SQLCODEor SQLSTATE variable as the target.

    Assignment to an SQLSTATE or SQLCODE variable inan SQL routine only changes the value in the variable,and does not activate any handler. The SQLSTATE andSQLCODE variables are assigned values by processingof SQL statements in the SQL routine. Therefore, anyvalue assigned might be over-written as a result of SQLstatement processing.

    System action

    The routine definition is processed successfully.

    User response

    No recovery is necessary. If the intent was to signal anerror or warning, specify the SIGNAL or RESIGNALstatement instead of the assignment.

    To prevent the warning, remove any assignments tothe SQLSTATE or SQLCODE special variables.

    12 Db2 11 for z/OS: Codes

  • SQLSTATE

    01643

    +394 ALL USER SPECIFIEDOPTIMIZATION HINTS USEDDURING ACCESS PATHSELECTION

    Explanation

    All user specified optimization hints that were foundfor the statement being optimized are used.

    System action

    Processing continues normally.

    Programmer response

    Ensure that the access path is correct and producesthe correct results.

    Suppressing this SQLCODE:You can set the value of theSUPPRESS_HINT_SQLCODE_DYN to suppressSQLCODEs +394 and +395 for dynamic SQLstatements.

    SQLSTATE

    01629

    Related conceptsValidation of specified access paths (Db2Performance)Related tasksInfluencing access path selection (Db2Performance)Related referencePLAN_TABLE (Db2 Performance)DSN_USERQUERY_TABLE (Db2 Performance)Subsystem parameters that are not oninstallation panels (Db2 Installation andMigration)Related information+395A USER SPECIFIED OPTIMIZATION HINT ISINVALID (REASON CODE = reason-code)

    +395 A USER SPECIFIEDOPTIMIZATION HINT IS INVALID(REASON CODE = reason-code)

    Explanation

    Db2 detected that one or more optimization hintsprovided for this statement are invalid. You can use

    the following reason-code values to identify why a hintis invalid:reason-code

    The reason why a hint was invalid. Only onereason-code is returned even if the hint containsmultiple problems. The following descriptionsrefer to the of the values in PLAN_TABLE columnsfor the set of rows that contain the same value inthe OPTHINT column.2

    The value of the TABNO column is not valid.Negative values and values greater than thetotal number of table references are not valid.

    The value of the TABNO column is validatedonly when the combination of the followingcolumns does not identify a particular tablereference within a query block:

    • CREATOR• TNAME• CORRELATION_NAME• QBLOCKNO

    3A value is not specified for one of the followingcolumns: CREATOR or TNAME

    4The value of the TABNO column was notspecified, and the combination of the followingcolumns does not uniquely identify a tablereference:

    • CREATOR• TNAME• CORRELATION_NAME• QBLOCKNO

    5The value specified for the TABNO columncontains a value in the valid range. However,the value does not correctly correspond to thevalues of the CREATOR, TNAME, andCORRELATION_NAME columns.

    6The table identified by the values specified bythe following columns cannot be found withinthe query block that is identified by theQBLOCKNO column:

    • CREATOR• TNAME• CORRELATION_NAME

    7The PAGE_RANGE column contains an invalidvalue.

    Chapter 1. Successful execution SQL codes 13

    https://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/perf/src/tpc/db2z_howdb2validateshint.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/perf/src/tpc/db2z_howdb2validateshint.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/perf/src/tpc/db2z_influenceaccesspaths.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/perf/src/tpc/db2z_influenceaccesspaths.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/usrtab/src/tpc/db2z_plantable.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/usrtab/src/tpc/db2z_dsnuserquerytable.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/inst/src/tpc/db2z_zparmnotonpanels.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/inst/src/tpc/db2z_zparmnotonpanels.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/inst/src/tpc/db2z_zparmnotonpanels.html

  • 8The PREFETCH column contains an invalidvalue.

    9The METHOD column contains an invalid value.

    10The SORTN_JOIN column contains an invalidvalue.

    11The SORTC_JOIN column contains an invalidvalue.

    12The ACCESSTYPE column contains an invalidvalue.

    13One of the following columns contains aninvalid value: ACCESSCREATOR orACCESSNAME.

    15The hint specifies an index that cannot beused.

    16The hint specified multi-index access thatcannot be used.

    17The hint specifies an invalid combination ofACCESSTYPE values.

    18The join method for the inner table of a joinwas not specified in the METHOD column.

    19The nested-loop join that is specified by thevalue of the METHOD column cannot be used.

    20The merge join that is specified by the value ofthe METHOD column cannot be used.

    21The hybrid join that is specified by the value ofthe METHOD column cannot be used.

    22The mode of parallelism that is specified by thevalue of the PARALLELISM_MODE columnrequested cannot be used.

    23The PARALLELISM_MODE column contains aninvalid value.

    24One of the following columns contains aninvalid value: ACCESS_DEGREE orACCESS_PGROUP_ID

    25One of the following columns contains aninvalid value: JOIN_DEGREE orJOIN_PGROUP_ID

    26A row for a table reference that is required forthe hint is missing. For query blocks thatreference multiple tables, the hint mustcontain a row for each table. Required tablesmight not be mentioned in the statement textbecause Db2 uses materialization ortransformations in the access path.

    27The hint contains a redundant table referencebecause a table that is identified by acombination of the following columns appearsin more than one row for the same query block:

    • CREATOR• TNAME• CORRELATION_NAME• TABNO (when required)

    28The PRIMARY_ACCESSTYPE column containsan invalid value.

    29The SORTN_GROUP_ID column contains aninvalid value.

    30The SORTN_GROUP_ID column contains aninvalid value.

    31No value is specified in thePARALLELISM_MODE column.

    32One of the following columns contains aninvalid value: CREATOR or TNAME

    33The join sequence is incorrect.

    34The column WHEN_OPTIMIZE contains aninvalid or inconsistent value.

    35The value of the ACCESSTYPE column cannotcontain 'V' for the specified table.

    36The number of dimension tables that arejoined before the star join fact table exceedsthe maximum number of dimensions that canbe joined by a fact table index.

    14 Db2 11 for z/OS: Codes

  • 37When the value of the JOIN_TYPE column forthe fact table is 'SJ', a nested-loop join mustbe used.

    38The join sequence for dimension tables in astar join is incorrect because it does not matchthe sequence that is specified by the fact tableindex.

    39The value of ACCESSTYPE column is 'O' but thespecified access path cannot be used.

    40Multiple index access cannot be used with thespecified indexes .

    41Duplicate hint input records found for the sametable.

    42Predicate validation failed for a selectivityoverride, but no matching predicate was foundin the statement. You might be able to fix theproblem by recapturing EXPLAIN informationand reissuing the BIND QUERY command.

    43A selectivity override with multiple instancescannot be applied for the specified SQLstatement. You might need to create aselectivity override that uses only a singleinstance.

    48Access path information for a correlatedsubquery is missing

    50The APREUSE option was specified during abind or rebind operation and the hint wasaccepted. However, during access pathcomparison, Db2 detected that the resultingaccess path does not match the original accesspath.

    99An unexpected error occurred.

    Only one reason-code is returned even if the hintcontains multiple problems.

    System action

    The invalid hint is ignored and Db2 determines theaccess path without that hint. If other hints aresupplied for the statement, Db2 might use those hints,if they are valid.

    Programmer response

    Examine the EXPLAIN output to determine which hintswere used by Db2, and which hints were not used. Ifneeded, correct the problem with the hints that werenot used, or disable their use as hints to the optimizer.

    Suppressing this SQLCODE:You can set the value of theSUPPRESS_HINT_SQLCODE_DYN to suppressSQLCODEs +394 and +395 for dynamic SQLstatements.

    SQLSTATE

    01628

    Related conceptsValidation of specified access paths (Db2Performance)Related tasksInfluencing access path selection (Db2Performance)Related referencePLAN_TABLE (Db2 Performance)DSN_USERQUERY_TABLE (Db2 Performance)Subsystem parameters that are not oninstallation panels (Db2 Installation andMigration)Related information+394ALL USER SPECIFIED OPTIMIZATION HINTSUSED DURING ACCESS PATH SELECTION

    +402 LOCATION location IS UNKNOWN

    Explanation

    A remote object is referenced and either the tableSYSIBM.LOCATIONS is not defined or the referenced'location' matches no entry in theSYSIBM.LOCATIONS.LOCATION column.

    System action

    For the CREATE ALIAS statement, the alias is created.For binding a plan or package with the VALIDATE(RUN)option, the plan or package is created.

    SQLSTATE

    01521

    +403 THE LOCAL OBJECT REFERENCEDBY THE CREATE ALIASSTATEMENT DOES NOT EXIST

    Chapter 1. Successful execution SQL codes 15

    https://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/perf/src/tpc/db2z_howdb2validateshint.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/perf/src/tpc/db2z_howdb2validateshint.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/perf/src/tpc/db2z_influenceaccesspaths.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/perf/src/tpc/db2z_influenceaccesspaths.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/usrtab/src/tpc/db2z_plantable.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/usrtab/src/tpc/db2z_dsnuserquerytable.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/inst/src/tpc/db2z_zparmnotonpanels.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/inst/src/tpc/db2z_zparmnotonpanels.htmlhttps://www.ibm.com/support/knowledgecenter/SSEPEK_11.0.0/inst/src/tpc/db2z_zparmnotonpanels.html

  • Explanation

    The local object referenced by the CREATE ALIASstatement does not exist when creating the alias.

    System action

    The alias is created.

    SQLSTATE

    01522

    +434 clause IS A DEPRECATED CLAUSE

    Explanation

    The use of clause is accepted for now, but continueduse of it is not recommended. However, for native SQLprocedures, clause is not supported. See the SQLReference for a list of options that are supported fornative SQL procedures. SQLCODE -4705 might beissued instead if the situation occurs with a BINDCOPY command that is used to deploy a version of anative SQL procedure that uses a deprecatedoption,and a package already exists by that name atthe server.

    For indexes, use type 2 indexes rather than type 1indexes to avoid any incompatibilities.

    System action

    Processing continues and the clause is ignored.

    User response

    No change is required for the current release.However, you should change your SQL statement andremove this clause to prepare for releases when thisclause is no longer accepted.

    To prevent the warning, remove the deprecated clausefrom the statement.

    SQLSTATE

    01608

    +438 APPLICATION RAISED WARNINGWITH DIAGNOSTIC TEXT: text

    Explanation

    This warning occurred as a result of the SIGNAL orRESIGNAL statement.text

    Diagnostic text provided by the SIGNAL orRESIGNAL statement.

    System action

    The statement was processed, but a warning wasencountered.

    Programmer response

    Use the application-provided diagnostic text, ifprovided, to determine the cause of the warning.

    SQLSTATE

    Defined by the application

    +440 NO routine-type BY THE NAMEroutine-name HAVINGCOMPATIBLE ARGUMENTS WASFOUND

    Explanation

    This warning occurs in a reference to routine (storedprocedure or function) routine-name, when Db2cannot find a function or stored procedure it can use toimplement the reference. Several reasons are presentfor this warning:

    • routine-name was incorrectly specified or does notexist in the database.

    • A qualified reference was made, and the qualifierwas incorrectly spelled.

    • A user's SQL path does not contain the schema towhich the function belongs, and an unqualifiedreference was used.

    • The wrong number of arguments were included.• For functions, the data types of one or more of the

    arguments is incorrect.

    System action

    A valid plan or package will be created if no errors aredetected. The statement is bound dynamically on eachexecution of the statement.

    Programmer response

    Fix the problem and retry. Change the SQL statement,add new routines, or change the user's SQL path.

    SQLSTATE

    0168L

    +445 VALUE value HAS BEENTRUNCATED

    Explanation

    The value value was truncated by a cast function,which was called to transform the value in some way.

    16 Db2 11 for z/OS: Codes

  • This is a warning situation. The cast function is a resultof

    • a CAST specification• a built-in function such as CHAR, VARCHAR, etc.• a CAST FROM specification on the CREATE

    FUNCTION statement that created the function• a user-defined function that is sourced on another

    function and the result needed to be transformed.

    If 'value' has the 'for bit data' subtype, then the 'value'is printed as a hexadecimal string in quotes followedby an X.

    System action

    The value has been truncated.

    Programmer response

    Ensure that the output is as expected and that thetruncation has not caused any unexpectedconsequences.

    SQLSTATE

    01004

    +462 EXTERNAL FUNCTION ORPROCEDURE name (SPECIFICNAME specific-name) HASRETURNED A WARNINGSQLSTATE, WITH DIAGNOSTICTEXT text

    Explanation

    An SQLSTATE of the form 01Hxx was returned to Db2by user-defined function or procedure name, alongwith message text text.

    System action

    Processing continues.

    Programmer response

    See your database administrator, or the author of thefunction or procedure to find out the meaning of thewarning. The significance of the bad SQLSTATE to theinvoking application can be learned from the author ofthe function or procedure.

    SQLSTATE

    01Hxx

    +464 PROCEDURE proc RETURNED numQUERY RESULT SETS, WHICH

    EXCEEDS THE DEFINED LIMITinteger

    Explanation

    The stored procedure named by proc completednormally. However, the stored procedure exceededthe defined limit on the number of query result setsthe procedure can return.

    • num identifies the number of query result setsreturned by the stored procedure.

    • integer identifies the defined limit on the number ofquery result sets for the stored procedure.

    Only the first integer query result sets are returned tothe SQL program that issued the SQL CALL statement.

    The possible causes are as follows:

    • The stored procedure is unable to return num resultsets due to the limit defined for the procedure.

    • The stored procedure is unable to return num resultsets due to the DRDA limitations imposed by theclient. The DRDA client establishes this limit with theMAXRSLCNT DDM code point.

    System action

    The SQL statement is successful. The SQLWARN9 fieldis set to 'Z'.

    SQLSTATE

    0100E

    +466 PROCEDURE proc RETURNED numQUERY RESULTS SETS

    Explanation

    The stored procedure named by proc completednormally. The procedure returned the number of SQLquery result sets specified in num.

    System action

    The SQL statement is successful. The SQLWARN9 fieldis set to 'Z'.

    SQLSTATE

    0100C

    +494 NUMBER OF RESULT SETS ISGREATER THAN NUMBER OFLOCATORS

    Chapter 1. Successful execution SQL codes 17

  • Explanation

    The number of result set locators specified on theASSOCIATE LOCATORS statement is less than thenumber of result sets returned by the storedprocedure. The first "n" result set locator values arereturned, where "n" is the number of result set locatorvariables specified on the SQL statement.

    System action

    The SQL statement is successful. The SQLWARN3 fieldis set to 'Z'.

    Programmer response

    Increase the number of result set locator variablesspecified on the SQL statement.

    SQLSTATE

    01614

    +495 ESTIMATED PROCESSOR COST OFestimate-amount1 PROCESSORSECONDS (estimate-amount2SERVICE UNITS) IN COSTCATEGORY cost-categoryEXCEEDS A RESOURCE LIMITWARNING THRESHOLD OF limit-amount SERVICE UNITS

    Explanation

    The prepare of a dynamic INSERT, UPDATE, MERGE,DELETE, or SELECT SQL statement resulted in a costestimate that exceeded the warning threshold valuespecified in the resource limit specification table(RLST). This warning is also issued if the Db2 costcategory value was "B", and the default actionspecified in the RLF_CATEGORY_B column in the RLSTis to issue a warning.estimate_amount1

    The cost estimate (in processor seconds) if theprepared INSERT, UPDATE, MERGE, DELETE, orSELECT statement were to be executed.

    estimate_amount2The cost estimate (in service units) if the preparedINSERT, UPDATE, MERGE, DELETE, or SELECTstatement were to be executed.

    cost-categoryThe Db2 cost-category for this SQL statement. Thepossible values are A or B.

    limit-amountThe warning threshold (in service units) specifiedin the RLFASUWARN column of the RLST. If youentered any negative number for the

    RLFASUWARN column, the value for limit-amountdefaults to zero.

    System action

    The prepare of the dynamic INSERT, UPDATE, MERGE,DELETE, or SELECT statement was successful. AnSQLCODE -905 might be issued if the execution of theprepared statement exceeds the ASUTIME valuespecified in the RLST.

    User response

    If the warning is caused by an SQL statement that isconsuming too much processor resource, attempt torewrite the statement to perform more efficiently.Another option is to ask the administrator to increasethe warning threshold value in the RLST.

    Programmer response

    Ensure that there is application logic to handle thewarning to either allow the statement to execute or tostop the statement from being executed. If thisSQLCODE was returned because the cost categoryvalue is "B", it might be that the statement is usingparameter markers or that some statistics are notavailable for the referenced tables and columns. Makesure the administrator has run the utility RUNSTATS onthe referenced tables. It might also be that UDFs willbe invoked when the statement is executed, or forINSERT, UPDATE, MERGE, or DELETE statements thattriggers are defined on the changed table. Check theDSN_STATEMNT_TABLE or the IFCID 22 record forthis statement to find the reasons this SQL statementhas been put in cost category "B".

    SQLSTATE

    01616

    +535 THE RESULT OF THE POSITIONEDUPDATE OR DELETE MAY DEPENDON THE ORDER OF THE ROWS

    Explanation

    A positioned update of a primary key or a delete from atable with a self-referencing constraint was requested.

    System action

    Db2 executes the UPDATE or DELETE statement andthe contents of the table are changed.

    SQLSTATE

    01591

    18 Db2 11 for z/OS: Codes

  • +541 THE REFERENTIAL OR UNIQUECONSTRAINT name HAS BEENIGNORED BECAUSE IT IS ADUPLICATE

    Explanation

    A FOREIGN KEY clause uses the same key and parenttable as another FOREIGN KEY clause, or a UNIQUEclause uses the same column list as another UNIQUEor PRIMARY KEY clause. In either case, the duplicateclause is ignored.

    name is either the foreign key name or the uniqueconstraint name.

    System action

    Db2 continues processing.

    Programmer response

    If the duplication is an error, correct the statementand execute it again.

    SQLSTATE

    01543

    +551 auth-id DOES NOT HAVE THEPRIVILEGE TO PERFORMOPERATION operation ON OBJECTobject-name

    Explanation

    Authorization ID auth-id has attempted to perform thespecified operation on object object-name withouthaving been granted the proper authority to do so. Thiserror might also occur if the specified object does notexist, or if the object is a read-only view (for UPDATE,INSERT, or MERGE). Additionally, the error may occurif auth-id is trying to create a table or view with aschema qualifier that is a value other than auth-id. Youmay create a table or view with a schema qualifierother than auth-id other than your own authorizationID if your authorization ID is SYSADM, DBADM, orDBCTRL.

    If you are using a trusted context, the token auth-idmight return a role instead of an authorization ID. Arole is returned if a role was in effect and theauthorization checking is performed against the role,rather than the authorization ID of the session, whenthe condition was encountered. Otherwise anauthorization ID is returned. A role is returned in thefollowing format as a single token:

    • ROLE: role-name

    If this error occurs while Db2 is creating or altering atable involving referential constraints, this codereports that the user does not have the necessaryALTER privilege to perform a FOREIGN KEY, DROPFOREIGN KEY, DROP PRIMARY KEY, or DROP UNIQUEoperation. The object-name identifies the object tableof the CREATE or ALTER TABLE statement, not thetable for which the user lacks the ALTER privilege.

    System action

    A valid plan or package will be created if no errors aredetected. The statement is bound dynamically on eachexecution of the statement.

    Programmer response

    For better performance, rebind the plan or packageafter correcting the statement. To correct thestatement, ensure that auth-id has been granted theauthority to perform the operation, that object-nameexists, and that auth-id is not trying to create a tablewith a schema qualifier other than the authorizationID.

    SQLSTATE

    01548

    +552 auth-id DOES NOT HAVE THEPRIVILEGE TO PERFORMOPERATION operation

    Explanation

    Authorization ID auth-id has attempted to perform thespecified operation without having been granted theauthority to do so.

    If you are using a trusted context, the token auth-idmight return a role instead of an authorization ID. Arole is returned if a role was in effect and theauthorization checking is performed against the role,rather than the authorization ID of the session, whenthe condition was encountered. Otherwise anauthorization ID is returned. A role is returned in thefollowing format as a single token:

    ROLE: role-name

    System action

    A valid plan or package will be created if no errors aredetected. The statement is bound dynamically on eachexecution of the statement.

    Programmer response

    For better performance, rebind the plan or packageafter correcting the statement. To correct the

    Chapter 1. Successful execution SQL codes 19

  • statement, ensure that the authorization ID has beengranted the authority necessary to perform theoperation.

    SQLSTATE

    01542

    +558 THE WITH GRANT OPTION ISIGNORED.

    Explanation

    The WITH GRANT option was used where it is notvalid. It cannot be used in the following cases:

    • PUBLIC was within the list of grantee authorizationIDs.

    • The BINDAGENT privilege was being granted.• The ANY package privilege on collection-id.* was

    being granted.• System DBADM authority was being granted.• ACCESSCTRL authority was being granted.• DATAACCESS authority was being granted.• CREATE_SECURE_OBJECT privilege was being

    granted.

    System action

    The offending privileges in the authorizationspecification are granted without the GRANT option. Ifthe grantee is PUBLIC, all the privileges in theauthorization specification are granted without theGRANT option.

    SQLSTATE

    01516

    +562 A GRANT OF A PRIVILEGE WASIGNORED BECAUSE THE GRANTEEALREADY HAS THE PRIVILEGEFROM THE GRANTOR

    Explanation

    At least one of the privileges in the GRANT statementwas ignored because the privilege was already grantedto the grantee by the grantor.

    System action

    The privileges previously granted are ignored; allothers are granted.

    SQLSTATE

    01560

    +585 THE COLLECTION collection-idAPPEARS MORE THAN ONCEWHEN SETTING THE special-register SPECIAL REGISTER

    Explanation

    The SET statement for special register special-registerincludes collection-id more than once.

    System action

    Duplicates are removed from the list, and the firstoccurrence of collection-id is used. The statement isexecuted.

    Programmer response

    Verify the list that contains the duplicate. If the error isonly in entering a collection-id incorrectly that happensto duplicate another entry, enter the collection-idcorrectly and reissue the statement. If the entry isintended to be a duplicate, no action is required.

    SQLSTATE

    01625

    +599 COMPARISON FUNCTIONS ARENOT CREATED FOR A DISTINCTTYPE BASED ON A LONG STRINGDATA TYPE

    Explanation

    Comparison functions are not created for a distincttype based on a long string data type (BLOB, CLOB,DBCLOB) since the corresponding function are notavailable for these built-in data types.

    System action

    The statement is processed successfully.

    Programmer response

    No action is required.

    SQLSTATE

    01596

    +610 A CREATE/ALTER ON OBJECTobject-name HAS PLACED OBJECTIN utility-name PENDING

    Explanation

    As the result of a CREATE or ALTER action on object-name, the object or a related object has been placed ina pending status.

    20 Db2 11 for z/OS: Codes

  • object-nameThe name of the object.

    utility-nameThe name of the utility.

    The reason for this error depends on the utility-namevalue and the object type.

    REBUILD pending for an index

    • The index is in REBUILD PENDING statusbecause CREATE INDEX with DEFER wasspecified on a populated table.

    • The index is in REBUILD PENDING statusbecause ALTER INDEX was used to add anullable column to an EXCLUDE NULL KEYSindex.

    The index is not generally available until the indexis removed from the REBUILD pending state.

    REORG pending for a table space partitionThe table space is in REORG pending becauseALTER INDEX was used to change the limit keyvalues. The table space partition is not generallyavailable until the REORG pending status isremoved.

    REORG pending for a table spaceThe table space is in REORG pending becauseALTER TABLE was used to add an identity columnto a populated table. The table space is notgenerally available until the REORG pending statusis removed.

    ADVISORY REORG pending for a table spaceThe table space is in ADVISORY REORG pendingbecause an ALTER statement with pendingdefinition changes has been issued. The tablespace is available, but the definition changes havenot yet been applied.

    ADVISORY REORG pending for an indexThe index is in ADVISORY REORG pending becausean ALTER statement with pending definitionchanges has been issued. The index is available,but the definition changes have not yet beenapplied.

    REORG pending for a tableThe table is in REORG pending because an ALTERstatement with the INLINE LENGTH optionreduced the maximum length for a LOB column.

    System action

    The object was placed in the indicated pending status.

    Programmer response

    The response depends on the utility-name value andthe object type:

    REBUILD pending for an indexUse the REBUILD INDEX utility to rebuild the indexand remove the REBUILD pending status.

    REORG pending for a table space partitionPerform the following steps:

    1. Issue a DISPLAY DATABASE command for thetable space to identify which partitions are inREORG pending.

    2. Run the REORG utility on the partitions that arein REORG pending.

    REORG pending for a table spaceRun the REORG utility on the table space.

    ADVISORY REORG pending for a table spaceRun the REORG TABLESPACE utility withSHRLEVEL CHANGE or SHRLEVEL REFERENCE onthe entire table space to materialize the pendingdefinition changes.

    ADVISORY REORG pending for an indexIf pending definition changes do not exist for thetable space, run the REORG INDEX utility withSHRLEVEL CHANGE or SHRLEVEL REFERENCE tomaterialize the pending definition changes for theindex.

    If pending definition changes exist for the tablespace, run the REORG TABLESPACE utility withSHRLEVEL CHANGE or SHRLEVEL REFERENCE tomaterialize the pending definition changes for thetable space and associated indexes.

    SQLSTATE

    01566

    +645 WHERE NOT NULL IS IGNOREDBECAUSE THE INDEX KEYCANNOT CONTAIN NULL VALUESOR THE INDEX IS AN XML INDEX

    Explanation

    The WHERE NOT NULL clause is ignored on theCREATE INDEX statement because the index key isdefined on columns that cannot contain null values, or,the index is an XML index.

    System action

    The option is ignored; processing continues.

    Programmer response

    Remove the WHERE NOT NULL clause to get rid of thewarning.

    Chapter 1. Successful execution SQL codes 21

  • SQLSTATE

    01528

    +650 THE TABLE BEING CREATED ORALTERED CANNOT BECOME ADEPENDENT TABLE

    Explanation

    This table is defined with the maximum number ofcolumns. It cannot be altered to be a dependent tablelater.

    System action

    The table is created. Check to see if the table willbecome a dependent table at a later time. If yes, dropand re-create the table with fewer than 750 columns.

    SQLSTATE

    01538

    +653 TABLE table-name INPARTITIONED TABLESPACEtspace-name IS NOT AVAILABLEBECAUSE ITS PARTITIONEDINDEX HAS NOT BEEN CREATED

    Explanation

    An attempt has been made to insert or manipulatedata in or create a view on a partitioned table (that is, atable residing in a partitioned table space) before thepartitioned index for that table has been created.

    A table residing in a partitioned table space cannot bereferenced in any SQL manipulative statement or aCREATE VIEW statement before the partitioned indexfor that table has been created.

    System action

    A valid plan or package will be created if no errors aredetected. The statement is bound dynamically on eachexecution of the statement.

    Programmer response

    For better performance, rebind the plan or packageafter correcting the statement. To correct thestatement, verify that the correct table wa