Listing of SQL messages

These tables list SQL messages. Use these tables to find message text, cause text, recovery text, and corresponding SQLCODEs and SQLSTATEs.

You can use the following tables with both positive and negative SQLCODEs. Take the absolute value of the SQLCODE, then append it to the letters SQL (for SQLCODEs less than 10 000) or the letters SQ (for SQLCODEs greater than or equal to 10 000) to determine the message identifier. Each SQLCODE corresponds to one or more SQLSTATEs.

SQ16000
Message Text: A component of the static context has not been assigned.
Cause Text: An XPath expression cannot be processed because the &1 component of the static context has not been assigned.

Static analysis of the expression relies on a component of the static context, &1, that has not been assigned a value.

The XPath expression cannot be processed.

Recovery Text: Assign a value to &1.
SQLCODE or SQLCODEs: -16000
SQLSTATE or SQLSTATEs: 10501
SQ16001
Message Text: The focus component of the dynamic context has not been defined for an XPath expression.
Cause Text: An XPath expression starting with token &1 cannot be processed because the focus component of the dynamic context has not been defined.

Evaluation of the expression starting with &1 requires that the focus component of the dynamic context be assigned. The token is being considered as the beginning of a path expression which does not have an associated context item or context sequence. This might be the result of not specifying an XPath context item expression in the passing clause. Other common causes for this error include:

  • The value in token &1 was intended to be a literal string but delimiting quotation characters are missing.
  • The value in token &1 was intended to be a function but the opening and closing parentheses are missing.

The XPath expression cannot be processed.

Recovery Text: Correct the XPath expression to assign a focus component or make other changes so that the token is no longer expecting an assigned focus component.
SQLCODE or SQLCODEs: -16001
SQLSTATE or SQLSTATEs: 10501
SQ16002
Message Text: An XPath expression has an unexpected token &1 following &2. Expected tokens may include: &3.
Cause Text: The &1 that follows &2 is not valid where it occurs in the expression. The &3 includes one or more possible tokens that are valid replacements for the unexpected token. The XPath expression cannot be processed.
Recovery Text: Use the correct syntax for the expression.
SQLCODE or SQLCODEs: -16002
SQLSTATE or SQLSTATEs: 10505
SQ16003
Message Text: An XPath expression has a type that is not valid for the context in which the expression occurs.
Cause Text: An expression of data type &1 cannot be used when the data type &2 is expected for the context. The following situations might cause this error:
  • For a constructor function of an XML schema atomic type, atomization of its argument must not result in more than one atomic value.
  • The cast of a value of &1 to target &2 must be a supported cast.
  • An XPath expression was used in an output column of the XMLTABLE built in table function that could not be cast to the expected type. This typically happens when the expression result contains more than one atomic value and a singleton is expected; or a cast from the result type to the expected data type is not supported.

The XPath expression cannot be processed.

Recovery Text: Specify a value of the correct type.
SQLCODE or SQLCODEs: -16003
SQLSTATE or SQLSTATEs: 10507
SQ16005
Message Text: XPath expression references undefined name &1 within static context.
Cause Text: During the static analysis phase, the static context is used to resolve element names, attribute names, type names, function names, namespace prefixes, and variable names. If an expression uses &1 that is not found in the static context, a static error is raised. The XPath expression cannot be processed.
Recovery Text: Use a name that is defined within the static context. If the QName includes a prefix, verify that the namespace prefix has been bound to a namespace through a namespace declaration. If the error resulted from a variable reference, verify that the variable is in scope for the expression.
SQLCODE or SQLCODEs: -16005
SQLSTATE or SQLSTATEs: 10506
SQ16007
Message Text: The XPath path expression references an axis &1 that is not supported.
Cause Text: The &1 that is specified is not supported because DB2 XPath does not support the Full Axis Feature. The supported axes include: child, attribute, descendant, self, descendant-or-self, and parent. The XPath expression cannot be processed.
Recovery Text: Specify an axis that is supported.
SQLCODE or SQLCODEs: -16007
SQLSTATE or SQLSTATEs: 10505
SQ16009
Message Text: An XPath function named &1 is not defined in the static context.
Cause Text: In a call to function &1 with &2 parameters, the expanded QName and number of parameters does not match the function name and number of parameters of a function signature in the static context.

The XPath expression cannot be processed.

Recovery Text: Try one of the following actions:

- Verify that you are passing the correct number of parameters to the function call.

- If the function call uses a function name with no prefix, verify that the local name of the function matches a function that is defined in the default function namespace, or use the correct prefix.

- If the function call uses a prefix, verify that the local name of the function matches a function that is defined in the namespace indicated by the prefix.

SQLCODE or SQLCODEs: -16009
SQLSTATE or SQLSTATEs: 10506
SQ16011
Message Text: The result of an intermediate step expression in an XPath expression contains an atomic value.
Cause Text: Each intermediate step in an XPath expression must evaluate to a sequence of XPath nodes. Such sequences might be empty, however they must not include any atomic values. The expression cannot be processed.
Recovery Text: Modify the expression to ensure that each intermediate step in an XPath expression returns a sequence of nodes.
SQLCODE or SQLCODEs: -16011
SQLSTATE or SQLSTATEs: 10507
SQ16012
Message Text: Context item in axis step must be node.
Cause Text: In an axis step, the context item, which is the item currently being processed, must be a node of the XPath Data Model. The XPath expression cannot be processed.
Recovery Text: Modify the axis step or the input to ensure that the context item is a node.
SQLCODE or SQLCODEs: -16012
SQLSTATE or SQLSTATEs: 10507
SQ16015
Message Text: Error occurred when processing attribute node &1.
Cause Text: The sequence used for constructing an element's content contains an attribute node named &1 that follows an XPath node that is not an attribute node. Attribute nodes can only occur at the beginning of the content sequence. The XPath expression cannot be processed.
Recovery Text: Modify the content sequence to ensure that attribute nodes follow other attribute nodes.
SQLCODE or SQLCODEs: -16015
SQLSTATE or SQLSTATEs: 10507
SQ16020
Message Text: Context node in path expression does not have document node root.
Cause Text: The root node above the context node in a path expression must be an XPath document node. The XPath expression cannot be processed.
Recovery Text: Change each path expression that begins with an initial "/" or "//" so that the context node has a root node that is an XPath document node.
SQLCODE or SQLCODEs: -16020
SQLSTATE or SQLSTATEs: 10507
SQ16022
Message Text: Operands of type &1 are not valid for operator &2.
Cause Text: One or both operands of the operator have invalid data types. The following situations might cause this error:
  • The types of the operands are not a valid combination for the given operator. For example, the operands of an arithmetic operator are not numeric types.
  • One or both operands of an arithmetic operator are a sequence of more than one item, but the given operator requires single item operands. The notation (item(), item()+) represents the type of a sequence of more than one item.
  • An XML document is being constructed from an attribute node. A sequence item that is used to construct an XML document must not be an attribute node. This error can occur when a sequence that contains an attribute is returned to SQL as an XML value.

The XPath expression cannot be processed.

Recovery Text: Use operands that have the correct types for the operator.
SQLCODE or SQLCODEs: -16022
SQLSTATE or SQLSTATEs: 10507
SQ16023
Message Text: The XPath prolog cannot contain multiple declarations for the same namespace prefix &1.
Cause Text: The prolog contains multiple declarations for the namespace prefix &1. Although a namespace declaration in a prolog can override a prefix that has been predeclared in the static context, the same namespace prefix cannot be declared more than once in the prolog. The XPath expression cannot be processed.
Recovery Text: Remove any extra declarations for the prefix from the prolog, or change the prefix that is assigned to the extra declarations. Verify that the prefixes used in the query reference the correct namespaces.
SQLCODE or SQLCODEs: -16023
SQLSTATE or SQLSTATEs: 10503
SQ16024
Message Text: The namespace prefix &1 cannot be redeclared or cannot be bound to the specified URI.
Cause Text: A namespace declaration cannot redeclare the predefined namespace prefixes "xml" or "xmlns". If the prefix name is not "xml", then it cannot be bound to the namespace URI 'http://www.w3.org/XML/1998/namespace'. No prefix can be bound to the namespace URI 'http://www.w3.org/2000/xmlns/' either. The XPath expression cannot be processed.
Recovery Text: Perform one of the following actions:
  • If the prefix name is "xml" or "xmlns", then change the prefix name to a different namespace prefix or remove the namespace declaration.
  • If the namespace URI is 'http://www.w3.org/XML/1998/namespace' or 'http://www.w3.org/2000/xmlns/', then change the namespace URI specified in the declaration of the namespace prefix.
SQLCODE or SQLCODEs: -16024
SQLSTATE or SQLSTATEs: 10503
SQ16031
Message Text: The XPath expression is not supported.
Cause Text: The XPath expression syntax &1 is not supported.
Recovery Text: Correct the expression or remove the unsupported syntax.
SQLCODE or SQLCODEs: -16031
SQLSTATE or SQLSTATEs: 10509
SQ16036
Message Text: The URI that is specified in a namespace declaration cannot be a zero-length string.
Cause Text: The URI that is specified in a namespace declaration must be a valid URI that conforms to the generic URI syntax specified by the World Wide Web Consortium(W3C). The URI cannot be a zero-length string. The XPath expression cannot be processed.
Recovery Text: Specify a valid URI in the namespace declaration.
SQLCODE or SQLCODEs: -16036
SQLSTATE or SQLSTATEs: 10504
SQ16038
Message Text: The arguments of fn:dateTime have different time zones.
Cause Text: The function fn:dateTime includes arguments that reference different time zones. The time zone of either argument might be an explicit part of the value, or the result of using the implicit time zone for the XPath execution environment for the argument. The XPath expression was not processed.
Recovery Text: Make sure that the same time zone is used for both arguments of the function fn:dateTime.
SQLCODE or SQLCODEs: -16038
SQLSTATE or SQLSTATEs: 10608
SQ16041
Message Text: The effective boolean value of a sequence could not be computed.
Cause Text: An implicit or explicit invocation of the fn:boolean function in the XPath expression could not compute the effective boolean value of the sequence.

The effective boolean value can be computed only if the sequence operand is one of the following sequences:

  • An empty sequence
  • A sequence where the value of the first item is a node
  • A singleton sequence with a value of type xs:string, xs:untypedAtomic or a type derived from one of these types.
  • A singleton sequence with a value of any numeric type or derived from any numeric type.

The expression cannot be processed.

Recovery Text: Determine the possible expressions within the XPath expression where an effective boolean value is calculated either implicitly or explicitly. An implicit invocation of the fn:boolean function can occur when processing the following types of expressions.
  • The logical expressions AND and OR
  • An fn:not function invocation
  • Certain types of predicates, such as a[b]
  • The WHERE clause of an FLWOR expression
  • Conditional expressions, such as IF

Ensure that the sequence operand of each effective boolean value calculation has a valid sequence operand, as described in the explanation.

SQLCODE or SQLCODEs: -16041
SQLSTATE or SQLSTATEs: 10608
SQ16046
Message Text: A numeric XPath expression attempted to divide by zero.
Cause Text: A division or modulus operation attempted to divide an integer or decimal value by zero. The XPath expression cannot be processed.
Recovery Text: Use a value for the divisor that is not equal to zero.
SQLCODE or SQLCODEs: -16046
SQLSTATE or SQLSTATEs: 10601
SQ16047
Message Text: An XPath expression resulted in arithmetic overflow or underflow.
Cause Text: An arithmetic operation resulted in a number that either exceeded the maximum or was below the minimum value allowed. The XPath expression cannot be processed.
Recovery Text: Modify the expression to result in a number that does not result in an arithmetic overflow or underflow.
SQLCODE or SQLCODEs: -16047
SQLSTATE or SQLSTATEs: 10601
SQ16048
Message Text: An XPath prolog cannot contain more than one &1 declaration.
Cause Text: Declaring more than one &1 in a prolog results in an error. The XPath expression cannot be processed.
Recovery Text: Remove the extra &1 from the prolog.
SQLCODE or SQLCODEs: -16048
SQLSTATE or SQLSTATEs: 10502
SQ16049
Message Text: The lexical value &1 is not valid for the &2 data type in the function or cast.
Cause Text: A cast expression or function call includes a &1 that does not have the correct lexical form for the &2 data type. The XPath expression cannot be processed.
Recovery Text: Try one of the following actions:
  • If the error results from a function invocation, verify that the string parameters used for QNames or local names have the correct lexical form.
  • If the error results from a cast expression, verify that the source value is not one of the special float or double values NaN, INF, or -INF.
SQLCODE or SQLCODEs: -16049
SQLSTATE or SQLSTATEs: 10602
SQ16051
Message Text: The value &1 data type &2 is out of range for an implicit or explicit cast to target data type &3.
Cause Text: An XPath expression requires that the &1 with data type of &2 be cast, either implicitly or explicitly, to the target data type &3. The value is outside the defined range of values for that data type. This error could be returned for a variety of error QNames such as FOAR0002, FOCA0001, or FOCA0003. The XPath expression cannot be processed.
Recovery Text: Change the XPath expression to use a target data type with a range that supports the specific value, or change the value to be within the defined range of the target data type.
SQLCODE or SQLCODEs: -16051
SQLSTATE or SQLSTATEs: 10602
SQ16052
Message Text: NaN cannot be used as a float or double value in a dateTime operation.
Cause Text: The value "NaN" was passed as an argument to a date, time, or duration operation, but that value is not valid for this operation. The XPath expression was not processed.
Recovery Text: Pass a valid float or double value into the date, time, or duration operation.
SQLCODE or SQLCODEs: -16052
SQLSTATE or SQLSTATEs: 10602
SQ16055
Message Text: An arithmetic operation involving a date or dateTime value resulted in overflow.
Cause Text: An arithmetic operation involving a date or dateTime value returned a number that exceeded the maximum value allowed. The XPath expression was not processed.
Recovery Text: Modify the XPath expression so that the result does not exceed the maximum allowed value.
SQLCODE or SQLCODEs: -16055
SQLSTATE or SQLSTATEs: 10605
SQ16056
Message Text: An arithmetic operation involving a duration value resulted in overflow.
Cause Text: An arithmetic operation involving a duration value resulted in a number that exceeded the maximum value allowed. The XPath expression cannot be processed.
Recovery Text: Modify the XPath expression to result in a number that does not exceed the maximum value allowed.
SQLCODE or SQLCODEs: -16056
SQLSTATE or SQLSTATEs: 10605
SQ16057
Message Text: A time zone value is not valid.
Cause Text: An XPath expression specifies a time zone value that is less than -PT14H00M or greater than PT14H00M. The XPath expression was not processed.
Recovery Text: Specify a time zone value that is greater than or equal to -PT14H00M and less than or equal to PT14H00M.
SQLCODE or SQLCODEs: -16057
SQLSTATE or SQLSTATEs: 10605
SQ16061
Message Text: The value &1 cannot be constructed as or cast to the data type &2.
Cause Text: An XPath expression attempted to use the value &1 as a &2 value but the value is not valid for the data type. The following situations might cause this error:
  • &1 was explicitly passed to a constructor function or specified in a cast expression with a target data type of &2.
  • An expression that includes &1 implicitly cast the value to the target data type of &2. Many XPath expressions use implicit casting to process the expressions. For example, an implicit cast is used in general comparisons of numeric values that require the values to be of data type xs:double.
  • &1 is not within the range of valid values for the target type &2.

The XPath expression cannot be processed.

Recovery Text: Take one the following actions:
  • If the error occurs in an expression that casts from one primitive type to another, verify that casting from the source type to the target type is supported. If the cast is not supported, either remove the expression or cast the value to a different data type.
  • Check for expressions that would result in implicit casting to values that may not conform to the data type of the implicit cast.
SQLCODE or SQLCODEs: -16061
SQLSTATE or SQLSTATEs: 10608
SQ16066
Message Text: Argument passed to aggregate function &1 is not valid.
Cause Text: The argument that was passed to the aggregate function &1 is not valid because the argument does not meet the conditions that are required for arguments to the function &1.
Recovery Text: Try one of the following actions:
  • If the function is fn:avg, verify that the following conditions are met: If the input sequence contains duration values, the values must be either all xs:yearMonthDuration values or all xs:dayTimeDuration values. If the input sequence contains numeric values, the values must all be promotable to a single common type that is one of the four numeric types, xs:yearMonthDuration or xs:dayTimeDuration or one of its subtypes.
  • If the function is fn:max or fn:min, verify that the following conditions are met: All items in the input sequence must be numeric or derived from a single base type for which the gt operator (for fn:max) or lt operator (for fn:min) is defined. If the input sequence contains numeric values, the values must all be promotable to a single common type and the values in the sequence must have a total order. If the input sequence contains duration values, the values must be either all xs:yearMonthDuration values or all xs:dayTimeDuration values.
  • If the function is fn:sum, verify that the following conditions are met: All items in the input sequence must be numeric or derived from a single base type. The type must support addition. If the input sequence contains numeric values, the values must all be promotable to a single common type. If the input sequence contains duration values, the values must be either all xs:yearMonthDuration values or all xs:dayTimeDuration values.
SQLCODE or SQLCODEs: -16066
SQLSTATE or SQLSTATEs: 10608
SQ16067
Message Text: The flags argument &1 passed to function &2 is not valid.
Cause Text: The function &2 includes a &1 that was passed to the function as a regular expression flag parameter. However, the string that was passed to the function includes characters that are not defined as flags.
Recovery Text: Modify the function call to pass in a string argument that contains only characters that are defined as flags. Valid characters include s, m, i, and x.
SQLCODE or SQLCODEs: -16067
SQLSTATE or SQLSTATEs: 10609
SQ16068
Message Text: The regular expression argument &1 passed to function &2 is not valid.
Cause Text: The &1 that was passed to function &2 is not valid according to the rules for regular expressions in XPath. See SQL XML Programming in the Information Center, http://www.ibm.com/systems/i/infocenter/, for a description of XPath regular expression syntax.
Recovery Text: Specify a valid value for the regular expression.
SQLCODE or SQLCODEs: -16068
SQLSTATE or SQLSTATEs: 10609
SQ16069
Message Text: A regular expression argument &1 passed to function &2 is a zero-length string.
Cause Text: The &1 that was specified for the pattern parameter in a call to function &2 is a zero-length string. A zero-length string is not a valid pattern for this function because the pattern will never match a substring in the input string.
Recovery Text: Pass a valid pattern to the function call or remove the function call from the expression.
SQLCODE or SQLCODEs: -16069
SQLSTATE or SQLSTATEs: 10609
SQ16104
Message Text: Internal error encountered in XML parser.
Cause Text: While parsing an XML document the parser encountered an internal error. The byte offset into the XML value being processed after conversion to UTF-8 is &1. The XML parser error description is: &2.
Recovery Text: Correct the XML value. Try the request again.
SQLCODE or SQLCODEs: -16104
SQLSTATE or SQLSTATEs: 2200M
SQ16168
Message Text: XML declaration in XML document not valid.
Cause Text: The XML declaration in the XML document or XML schema is incorrect. The error type is &1. The error types are:
  • 1 -- Unsupported Byte Order Mark, declaration string order is incorrect, declaration must be in lower case, the 'version=' string is missing, or unsupported attributes were specified.
  • 6 -- Specified version is not supported.
  • 7 -- Specified encoding is not supported, or the internal encoding does not match the external encoding.
  • 8 -- The XML declaration is not terminated.
Recovery Text: Correct the XML document. Try the request again.
SQLCODE or SQLCODEs: -16168
SQLSTATE or SQLSTATEs: 2200M
SQ16246
Message Text: Incomplete annotation mapping at or near &1 in XML schema document &2. The reason code is &3.
Cause Text: The annotation mapping the XML schema item to a database object is missing some information near &1 in &2. The reason code is &3. Reason codes and their meanings are:
  • 1 - A rowset name is not specified or is not fully qualified.
  • 2 - Any mapping must specify either a target column or a condition. Neither a target column nor a condition is specified.
  • 3 - The annotation has an unexpected format.
  • 4 - The annotation is empty.

The XML schema document can be determined by matching &2 to the SCHEMALOCATION column of the XSROBJECTCOMPONENTS catalog table. The XML schema is not enabled for decomposition.

Recovery Text: Modify the annotations in the XML schema. Possible actions based on the reason code include:
  • 1 - Specify a rowset name or fully qualify the rowset name.
  • 2 - Specify either a target column or a condition.
  • 3 - Correct the format of the annotation.
  • 4 - Specify an annotation value.
SQLCODE or SQLCODEs: -16246
SQLSTATE or SQLSTATEs: 225DE
SQ16247
Message Text: Source XML type &1 cannot be mapped to target SQL type &2.
Cause Text: Annotation at or around &3 in XML schema document &4 maps an XML schema type &1 to an incompatible SQL type &2. The XML schema document can be determined by matching &4 to the SCHEMALOCATION column of the XSROBJECTCOMPONENTS catalog table. The XML schema is not enabled for decomposition.
Recovery Text: Consult annotated XML schema documentation on compatibility between XML schema types and SQL types. Correct the annotation appropriately.
SQLCODE or SQLCODEs: -16247
SQLSTATE or SQLSTATEs: 225DE
SQ16248
Message Text: Unknown annotation &1 at or near &2 in XML schema document &3.
Cause Text: The annotated XML schema document &3 contains an error in the annotation at or near &2. The unrecognized name given in the annotation tag is &1. The XML schema document can be determined by matching &3 to the SCHEMALOCATION column of the XSROBJECTCOMPONENTS catalog table. The XML schema is not enabled for decomposition.
Recovery Text: Consult annotated XML schema documentation for a list of legal annotations and their syntax. Correct or remove the unknown annotation.
SQLCODE or SQLCODEs: -16248
SQLSTATE or SQLSTATEs: 225DE
SQ16249
Message Text: The db2-xdb:expression annotation &1 at or near &2 in XML schema document &3 is too long.
Cause Text: The string length of the specified expression exceeds the maximum allowed. The XML schema document can be determined by matching &3 to the SCHEMALOCATION column of the XSROBJECTCOMPONENTS catalog table. The XML schema is not enabled for decomposition.
Recovery Text: Consult annotated XML schema documentation on the limit for strings specified in db2-xdb:expression annotations. Correct the expression appropriately.
SQLCODE or SQLCODEs: -16249
SQLSTATE or SQLSTATEs: 225DE
SQ16250
Message Text: More than one db2-xdb:defaultSQLSchema exists within the XML schema.
Cause Text: The db2-xdb:defaultSQLSchema with value &1 at or near &2 in XML schema document &3 conflicts with another db2-xdb:defaultSQLSchema specified in one of the XML schema documents within the same XML schema. The XML schema is not enabled for decomposition.

There can only be one value for the db2-xdb:defaultSQLSchema annotation across all XML schema documents that comprise an annotated XML schema. The specified SQL schema name &1 at or near &2 in the XML schema document &3 conflicts with another value for db2-xdb:defaultSQLSchema annotation in this or another XML schema document of the XML schema.

Recovery Text: Correct the annotated XML schema such that all specifications of db2-xdb:defaultSQLSchema are consistent.
SQLCODE or SQLCODEs: -16250
SQLSTATE or SQLSTATEs: 225DE
SQ16251
Message Text: Duplicate annotation defined for &1 at or near &2 in XML schema document &3.
Cause Text: There is more than one annotation for &1 in the annotated XML schema. A duplicate annotation has been found for this object at or around &2 in XML schema document &3. The XML schema document can be determined by matching &3 to the SCHEMALOCATION column of the XSROBJECTCOMPONENTS catalog table. The XML schema is not enabled for decomposition.
Recovery Text: Correct the annotated XML schema by removing the duplicate annotation from the XML schema documents of the XML schema.
SQLCODE or SQLCODEs: -16251
SQLSTATE or SQLSTATEs: 225DE
SQ16252
Message Text: The db2-xdb:rowSet &1 near &2 in the XML schema document &3 is associated with another table.
Cause Text: A rowset in an annotated XML schema must correspond to exactly one table. The rowset declaration at or near &2 declares an association between rowset &1 and the table specified in the enclosing db2-xdb:table annotation. The specified rowset has already been associated to a different table in another db2-xdb:table annotation. The XML schema document can be determined by matching &3 to the SCHEMALOCATION column of the XSROBJECTCOMPONENTS catalog table. The XML schema is not enabled for decomposition.
Recovery Text: Correct the annotated XML schema such that each rowset name is uniquely associated with exactly one table across the annotated XML schema documents of the XML schema.
SQLCODE or SQLCODEs: -16252
SQLSTATE or SQLSTATEs: 225DE
SQ16253
Message Text: The db2-xdb:condition annotation &1 at or near line &2 in XML schema document &3 is too long.
Cause Text: The length of the string associated with db2-xdb:condition that starts with &1 exceeds the maximum allowed. The db2-xdb:condition is found at or around line number &2 in XML schema document &3. The XML schema document can be determined by matching &3 to the SCHEMALOCATION column of the XSROBJECTCOMPONENTS catalog table. The XML schema is not enabled for decomposition.
Recovery Text: Reduce the size of the condition string for db2-xdb:condition in the XML schema document.
SQLCODE or SQLCODEs: -16253
SQLSTATE or SQLSTATEs: 225DE
SQ16254
Message Text: A db2-xdb:locationPath &1 near &2 in XML schema document &3 is not valid with reason code &4.
Cause Text: A value specified in the annotated schema for &3 is not valid. The XML schema document can be determined by matching &3 to the SCHEMALOCATION column of the XSROBJECTCOMPONENTS catalog table. Possible values for reason code include:
  • 1 - An element or attribute has a namespace prefix that is not mapped to a URI. All namespace prefixes used in the location path must be associated with a namespace in the XML schema document containing the annotation specifying this location path.
  • 2 - Syntax is not valid for a location path.
  • 3 - The specified path does not match any possible path from a root node to a location where the element or attribute may appear in an instance document.
Recovery Text: Modify the annotations in the XML schema. Possible actions based on the reason code include:
  • 1 - Ensure that namespace prefixes in the db2-xdb:locationPath are correct or add a declaration for the missing namespace.
  • 2 - Ensure that the syntax of the value for db2-xdb:locationPath is valid syntax for a location path.
  • 3 - Ensure that the value for db2-xdb:locationPath corresponds to a possible path from the root node to the element or attribute at the end of the location path.
SQLCODE or SQLCODEs: -16254
SQLSTATE or SQLSTATEs: 225DE
SQ16255
Message Text: A db2-xdb:rowSet value conflicts with a db2-xdb:table annotation with the same name.
Cause Text: A db2-xdb:rowSet value &1 used at or near &2 in XML schema document &3 conflicts with a db2-xdb:table annotation with the same name. The annotated XML schema contains a db2-xdb:table annotation which declares a table named &1, but the annotated XML schema does not have any db2-xdb:rowSet annotation declaration to associate &1 to any table. If a rowset is not declared in any db2-xdb:table annotation, it is implicitly associated to a table with the same name qualified by the value of db2-xdb:defaultSQLSchema. The annotated XML schema cannot use a db2-xdb:rowSet annotation that relies on an implicit association between a rowset and a table with the same name of &1, and at the same time declare a table named &1 using a db2-xdb:table annotation. The XML schema document can be determined by matching &3 to the SCHEMALOCATION column of the XSROBJECTCOMPONENTS catalog table. The schema is not enabled for decomposition.
Recovery Text: Correct the annotated XML schema by adding a db2-xdb:rowSet child element to the db2-xdb:table element with name &1. This will explicitly associate the rowset to the table.
SQLCODE or SQLCODEs: -16255
SQLSTATE or SQLSTATEs: 225DE
SQ16257
Message Text: XML schema feature &1 is not supported for decomposition.
Cause Text: Feature &1 is used in the XML schema. In some cases, the presence of an unsupported feature in the XML schema results in failure to enable for decomposition.
Recovery Text: Remove the feature from the XML schema or remove the decomposition annotations associated with the feature, as appropriate. Consult decomposition documentation on the restrictions on use of the specified XML schema feature.
SQLCODE or SQLCODEs: -16257
SQLSTATE or SQLSTATEs: 225DE
SQ16258
Message Text: The XML schema contains a recursive element which is an unsupported feature for decomposition.
Cause Text: The XML schema contains a recursive element which is an unsupported feature for decomposition. The recursive element is identified as &1 of type &2. The XML schema is not enabled for decomposition.
Recovery Text: Remove the use of recursion from the XML schema.
SQLCODE or SQLCODEs: -16258
SQLSTATE or SQLSTATEs: 225DE
SQ16259
Message Text: Many-to-many mappings relationship between elements that map to the same rowset is not valid.
Cause Text: Many-to-many mappings detected in XML schema document &1 near &2 and in XML schema document &3 near &4 is not valid. If two element declarations have a sequence model group as their lowest common ancestor then only one of the paths from the element declaration up to that model group can have maxOccurs > 1 on one or more elements declarations or model groups in that path. The XML schema documents can be determined by matching &1 and &3 to the SCHEMALOCATION column of the XSROBJECTCOMPONENTS catalog table. The XML schema is not enabled for decomposition.
Recovery Text: Correct the annotations such that there are no many-to-many mappings. Consult annotated XML schema documentation for rules on mapping elements and attributes.
SQLCODE or SQLCODEs: -16259
SQLSTATE or SQLSTATEs: 225DE
SQ16260
Message Text: XML schema annotations include no mappings to any column of any table.
Cause Text: The XML schema contains no annotations that map an XML element or attribute to any column of any table. The XML schema is not enabled for decomposition.
Recovery Text: Add annotations to the XML schema so that at least one XML element or attribute is mapped to a column of a table.
SQLCODE or SQLCODEs: -16260
SQLSTATE or SQLSTATEs: 225DE
SQ16262
Message Text: The annotated XML schema has no columns mapped for the rowset &1.
Cause Text: The set of annotations involving rowset &1 contain no mappings to any column. In order for a rowset to be target for decomposition, at least one column must be mapped to some XML element or attribute.
Recovery Text: Add an annotation that maps a column of the specified rowset to some XML element or attribute. If the rowset is not intended to be a target for decomposition, remove references to the rowset from the annotated XML schema.
SQLCODE or SQLCODEs: -16262
SQLSTATE or SQLSTATEs: 225DE
SQ16263
Message Text: The rowSet name &1 at or near &2 in the XML schema document &3 is not used in any mapping.
Cause Text: The rowSet name &1 at or near &2 in the XML schema document &3 must be specified in at least one mapping in the XML schema.
Recovery Text: Ensure that the rowSet name &1 is specified in mapping at least one element or attribute in the XML schema.
SQLCODE or SQLCODEs: -16263
SQLSTATE or SQLSTATEs: 225DE
SQ16264
Message Text: RowSet name &1 at or near &2 in the XML schema document &3 cannot be used more than once under &4.
Cause Text: A rowSet name can be used only once under &4. It can participate in only one hierarchy of operation orders.
Recovery Text: Verify that using the same rowSet name under multiple instances of the element db2-xdb:order is needed. Combine the affected db2-xdb:order elements, so the resulting order is consistent with the required order of insertion.
SQLCODE or SQLCODEs: -16264
SQLSTATE or SQLSTATEs: 225DE
SQ16265
Message Text: XML schema &1 in &2 is not enabled for decomposition.
Cause Text: The XML schema identified by &1 in &2 is not in the correct state to perform decomposition. The XML schema could be in one of the following states:
  • Not enabled for decomposition (possibly never enabled)
  • Disabled for decomposition

Decomposition can only be performed using XML schemas that are enabled for decomposition. XML decomposition was not started.

Recovery Text: Ensure that the XML schema is enabled for decomposition before attempting to use it for decomposition of an XML document. The decomposition status of an XML schema can be checked by selecting the DECOMPOSITION column of the XSROBJECTS catalog table for the XML schema identified by &1.
SQLCODE or SQLCODEs: -16265
SQLSTATE or SQLSTATEs: 225D1
SQ16266
Message Text: Error occurred during decomposition of XML document &1.
Cause Text: An SQL error occurred during decomposition of document &1 while attempting to insert data. Information returned for the error includes SQLCODE &2 and SQLSTATE &3. The error occurred while attempting an SQL insert operation based on some piece of data from the XML document. The XML document was not decomposed.
Recovery Text: Check the message associated with the SQLCODE &2. Follow the action suggested by that message.
SQLCODE or SQLCODEs: -16266
SQLSTATE or SQLSTATEs: 225D2
SQ16277
Message Text: The global annotation &1 appears more than once in the XML schema.
Cause Text: An annotated XML schema can contain at most one occurrence of the annotation &1. Another occurrence of this annotation appears at or near &2 in XML schema document &3.
Recovery Text: Combine the contents of the multiple &1 annotations into a single annotation, and ensure that the resulting annotation does not contain any duplicate information.
SQLCODE or SQLCODEs: -16277
SQLSTATE or SQLSTATEs: 225DE
SQ16280
Message Text: XSLT processor error.
Cause Text: An error occurred during the XSLT processing for the XSLTRANSFORM function. Text describing the problem is: &1.
Recovery Text: Refer to the XSLT processor documentation for this error. Try the request again.
SQLCODE or SQLCODEs: -16280
SQLSTATE or SQLSTATEs: 225X0
SQ20038
Message Text: Clauses not valid in same definition.
Cause Text: &1 and &2 cannot be specified at the same time.
  • The WITH DATA option cannot be specified with ON REPLACE PRESERVE ROWS.
  • A field procedure cannot be defined for a column that has a generated expression.
Recovery Text: Change or remove a clause so that the definition is valid.
SQLCODE or SQLCODEs: -20038
SQLSTATE or SQLSTATEs: 42613
SQ20054
Message Text: File &1 in &2 has DataLinks in link pending mode.
Cause Text: The accessed file &1 has DataLinks in link pending mode for reason code &3. The reason codes are as follows:
  • 21 The status of the DataLinks cannot be verified. A file cannot be used for INSERT and UPDATE statements while in link pending mode.
Recovery Text: Use the WRKPFDL (Work with Physical File DataLinks) command to determine which files have DataLinks in link pending mode. Resolve the pending links and try the request again.
SQLCODE or SQLCODEs: -20054
SQLSTATE or SQLSTATEs: 55019
SQ20055
Message Text: Result column not compatible with column &1 in materialized query table.
Cause Text: The data type of a result column in the select list is not compatible with column &1 in the materialized query table.
Recovery Text: Ensure that the data types of all SELECT result columns are compatible with the corresponding existing columns of the materialized query table.
SQLCODE or SQLCODEs: -20055
SQLSTATE or SQLSTATEs: 42854
SQ20058
Message Text: Subselect for materialized query table &1 not valid for reason code &3.
Cause Text: &1 in &2 cannot be created or altered because the SELECT statement contains a reference or expression that is not valid. Reason codes and their meanings are:
  • 1 -- Refers to another materialized query table or a protected system file, or to a view that refers to a materialized query table or a protected system file.
  • 2 -- Refers to a declared global temporary table, a created global temporary table, a table in QTEMP, a program-described file, or a non-SQL logical file in the FROM clause.
  • 3 -- Refers to a VIEW that contains an item for a materialized query table that is not valid.
  • 4 -- Contains an expression with a DataLink or a distinct type based on a DataLink where the DataLink is FILE LINK CONTROL.
  • 6 -- Refers to a function that has an external action or that is not deterministic.
  • 8 -- Refers to a special register or global variable.
  • 9 -- Refers to result column that is a not an SQL data type, such as binary with precision, DBCS-ONLY, or DBCS-EITHER.
  • 10 -- Refers to a column that has a field procedure defined and that column is used in an expression in the select-list.
Recovery Text: Based on the reason code, correct the SELECT statement for the materialized query table. Try the request again.
SQLCODE or SQLCODEs: -20058
SQLSTATE or SQLSTATEs: 428EC
SQ20073
Message Text: Attribute not valid for function &1 in &2.
Cause Text: Function &1 in &2 cannot be created or altered as NOT DETERMINISTIC or EXTERNAL ACTION because it is referenced in an MQT, in a view that has the WITH CHECK OPTION attribute, or in a global variable.
Recovery Text: Specify DETERMINISTIC or NO EXTERNAL ACTION for the function. Try the request again.
SQLCODE or SQLCODEs: -20073
SQLSTATE or SQLSTATEs: 42927
SQ20093
Message Text: Attempt to ALTER table &1 in &2 failed. Reason code &3.
Cause Text: The ALTER request involving a materialized query table cannot be completed. Reason codes and their meanings are:
  • 2 -- The ALTER specified DROP MATERIALIZED QUERY or ALTER MATERIALIZED QUERY, but the specified table is not a materialized query table.
  • 4 -- The table has one or more triggers defined.
  • 8 -- The table is referenced in the definition of another materialized query table.
  • 9 -- The table is referenced directly or indirectly (such as through a view) in the SELECT statement.
  • 10 -- The ALTER specified ADD MATERIALIZED QUERY, but the specified table is already a materialized query table.
  • 11 -- The number of columns in the existing table does not match the number of columns for the result of the SELECT statement.
  • 12 -- Column data types in the existing table do not match the column data types for the result of the SELECT statement.
  • 16 -- The ALTER specified ADD MATERIALIZED QUERY, but the specified table has more than one member.
  • 19 -- The table is a system-period temporal table or a history table and cannot be defined as a materialized query table.
  • 20 -- The ALTER specified ALTER MATERIALIZED QUERY or ADD MATERIALIZED QUERY and either the specified table &1 in &2 or the referenced table &4 in &5 is using row or column access control.
Recovery Text: Change the ALTER statement, specify a different table, or change the SELECT statement to specify different result columns. Try the request again.

If the failure is due to reason code 20, you must remove all masks and permissions defined on &1 in &2 or &4 in &5. Additionally, row and column access control must be deactivated for both tables.

SQLCODE or SQLCODEs: -20093
SQLSTATE or SQLSTATEs: 428EW
SQ20102
Message Text: &3 cannot be specified for routine &1.
Cause Text: &3 cannot be specified for routine &1 in &2. ALTER REPLACE is only allowed for an SQL routine. DEBUG MODE can only be specified for SQL and JAVA routines. The language type of an SQL routine cannot be changed. An external name cannot be specified for an SQL routine.
Recovery Text: Remove the clause that is not allowed. Try the request again.
SQLCODE or SQLCODEs: -20102
SQLSTATE or SQLSTATEs: 42849
SQ20110
Message Text: Cannot implicitly connect to a remote site with a savepoint outstanding.
Cause Text: The statement referenced an object at a remote DBMS when an active savepoint exists.
Recovery Text: An implicit connect to a remote server is not allowed because a savepoint is outstanding. Issue a RELEASE TO SAVEPOINT or ROLLBACK TO SAVEPOINT before retrying the statement. Committing or rolling back the transaction will also release existing savepoints.
SQLCODE or SQLCODEs: -20110
SQLSTATE or SQLSTATEs: 51036
SQ20112
Message Text: The maximum number of savepoints has been reached.
Cause Text: A resource limit has been exceeded.
Recovery Text: Issue a RELEASE TO SAVEPOINT or ROLLBACK TO SAVEPOINT before creating additional savepoints. You may issue a COMMIT or ROLLBACK to release existing savepoints.
SQLCODE or SQLCODEs: -20112
SQLSTATE or SQLSTATEs: 3B002
SQ20117
Message Text: Window definition not correct.
Cause Text: The window definition (OVER clause) for an OLAP specification is not correct. Reason code is &1. Reason codes and their definitions are:
  • 1 - RANGE or ROWS is specified but the OVER clause does not contain an ORDER BY clause.
  • 2 - RANGE is specified but the OVER clause has an ORDER BY clause that contains more than one sort key expression.
  • 3 - RANGE is specified but the data type of the range value cannot be subtracted from the sort key expression in the ORDER BY clause in the OVER clause.
  • 4 - UNBOUNDED FOLLOWING is specified as the first value of BETWEEN or UNBOUNDED PRECEDING is specified as the second value of BETWEEEN.
Recovery Text: Change the window definition according to the reason code.
  • 1 - Add an ORDER BY clause in the OVER clause that uses RANGE or ROWS.
  • 2 - Make sure the OVER clause that specifies RANGE has only one sort key expression in its ORDER BY clause.
  • 3 - For the OVER clause that uses RANGE, make sure the range value can be subtracted from the sort key expression in its ORDER BY clause. The sort key expression must be a numeric or datetime data type. If the sort key expression is a datetime data type, the range value must be a decimal literal the represents a duration for that data type.
  • 4 - Specify correct boundary values in the BETWEEN clause.
SQLCODE or SQLCODEs: -20117
SQLSTATE or SQLSTATEs: 428EZ
SQ20120
Message Text: SQL table function must return a table result.
Cause Text: An SQL table function must return a table result as follows:
  • The entire table can be returned with a fullselect on a RETURN statement. In this case, there must be exactly one RETURN statement and no PIPE statements in the function.
  • The table can be returned one row at a time with the PIPE statement. An empty RETURN statement is used to indicate the end of the function. In this case, there must be at least one RETURN statement and may be any number of PIPE statements in the function.
Recovery Text: Specify a valid function table result. Try the request again.
SQLCODE or SQLCODEs: -20120
SQLSTATE or SQLSTATEs: 428F1
SQ20141
Message Text: Truncation of value with length &1 occurred for &2.
Cause Text: On assignment of a value to a host variable or parameter, truncation occurred and the length of the value that was truncated is too large to be returned in the indicator variable. This situation can occur when truncation occurs on assignment of:
  • A value to a parameter of a remote stored procedure and the value being truncated is greater than 127 bytes. In this case, the indicator variable will contain a value of 127.
  • A LOB or XML value to a host variable and the value being truncated is greater than 32767 bytes. In this case, the indicator variable will contain a value of 32767.

In these cases the actual length of the truncated value cannot be returned to the application using the indicator variable. The actual length of the value is returned as message token length.

Recovery Text: Change the length of the host variable or parameter and try the request again.
SQLCODE or SQLCODEs: +20141
SQLSTATE or SQLSTATEs: 01004
SQ20143
Message Text: Encryption or decryption function failed.
Cause Text: An encryption or decryption function failed because the encryption password value was not set.
Recovery Text: Use the SET ENCRYPTION PASSWORD statement to set the password to be used for encryption and decryption functions. The password can also be specified as an argument of the encryption and decryption functions.
SQLCODE or SQLCODEs: -20143
SQLSTATE or SQLSTATEs: 51039
SQ20144
Message Text: Encryption password length not valid.
Cause Text: The length of the encryption password must be from 6 to 127 characters.
Recovery Text: Correct the length of the password value. Submit the request again.
SQLCODE or SQLCODEs: -20144
SQLSTATE or SQLSTATEs: 428FC
SQ20145
Message Text: The decryption function failed.
Cause Text: The password used for decryption does not match the password used to encrypt the data. The data must be decrypted using the same password that was used to encrypt the data.
Recovery Text: Ensure that the same password is used to encrypt and decrypt the data.
SQLCODE or SQLCODEs: -20145
SQLSTATE or SQLSTATEs: 428FD
SQ20146
Message Text: The decryption function failed. The data is not encrypted.
Cause Text: The data must be a result of the ENCRYPT, ENCRYPT_AES, ENCRYPT_RC2, or ENCRYPT_TDES function.
Recovery Text: Ensure that the data is a result of the ENCRYPT, ENCRYPT_AES, ENCRYPT_RC2, or ENCRYPT_TDES function. Data passed to a decryption function must be encrypted data.
SQLCODE or SQLCODEs: -20146
SQLSTATE or SQLSTATEs: 428FE
SQ20147
Message Text: The ENCRYPT function failed. Data is already encrypted.
Cause Text: An attempt was made to encrypt data that is already encrypted.
Recovery Text: Ensure that the data has not already been encrypted.
SQLCODE or SQLCODEs: -20147
SQLSTATE or SQLSTATEs: 55048
SQ20148
Message Text: RETURN statement must be specified in function &1 in &2.
Cause Text: A RETURN statement must be specified in an SQL function.
Recovery Text: Specify a RETURN statement. Try the request again.
SQLCODE or SQLCODEs: -20148
SQLSTATE or SQLSTATEs: 429BD
SQ20165
Message Text: Data change table reference not allowed where specified.
Cause Text: A data change table reference can only be specified in certain FROM clauses. A data change table reference must be the only table reference in a FROM clause used in:
  • The outer fullselect of a SELECT or SELECT INTO statement.
  • The only fullselect of a SET or VALUES INTO statement.
  • The query expression of a RETURN statement.
Recovery Text: Modify the statement so that the data change table reference is used correctly. Make sure it is the only table reference in the FROM clause.
SQLCODE or SQLCODEs: -20165
SQLSTATE or SQLSTATEs: 428FL
SQ20166
Message Text: View or logical file &1 not allowed for data change table reference.
Cause Text: &1 in &2 cannot be specified as the target of a data change table reference.

If &1 is a view, the WHERE clause in the view definition cannot contain a function that is not deterministic, has external action, or modifies SQL data.

If &1 is a logical file, it cannot have select/omit specifications or be a join logical file.

Recovery Text: Specify a different view or logical file in the data change table reference.
SQLCODE or SQLCODEs: -20166
SQLSTATE or SQLSTATEs: 428FM
SQ20178
Message Text: INSTEAD OF trigger not created for view &1.
Cause Text: View &1 in &2 already has an INSTEAD OF trigger defined for the specified operation. A view can have only one INSTEAD OF trigger defined for each of the INSERT, UPDATE, and DELETE operations.
Recovery Text: Drop the existing trigger. Combine the function for the existing trigger and the new trigger into a single trigger. Create the trigger again.
SQLCODE or SQLCODEs: -20178
SQLSTATE or SQLSTATEs: 428FP
SQ20179
Message Text: Trigger cannot be created for view &1 that uses a WITH CHECK OPTION.
Cause Text: View &1 in &2 specifies a WITH CHECK OPTION or is dependent on a view which has a WITH CHECK OPTION. An INSTEAD OF trigger cannot be defined for a view that has a WITH CHECK OPTION.
Recovery Text: Remove the WITH CHECK OPTION from the view.
SQLCODE or SQLCODEs: -20179
SQLSTATE or SQLSTATEs: 428FQ
SQ20180
Message Text: Column &1 cannot be altered.
Cause Text: Column &1 in table &2 in &3 cannot be altered for one of the following reasons:
  • Column &1 is a partitioning key column.
  • Column &1 is a column in a history table.
  • Column &1 is a ROW BEGIN, ROW END, or TRANSACTION START ID and must have a data type that is timestamp with a precision of 12.
  • Column &1 is a ROW BEGIN or ROW END and must not allow null values.
Recovery Text: Change the table to a non-partitioned table before attempting to alter the column, drop versioning so the table is no longer a history table, or remove the ALTER COLUMN clause from the statement. Try the request again.
SQLCODE or SQLCODEs: -20180
SQLSTATE or SQLSTATEs: 428FR
SQ20183
Message Text: ALTER TABLE partitioning clause not valid for &1.
Cause Text: Table &1 in &2 cannot be altered. The reason code is &3.
  • 1 -- ADD PARTITION BY was specified on an ALTER TABLE statement, but the table is already a partitioned table or is a physical file
  • 2 -- ADD PARTITION, ALTER PARTITION, ATTACH PARTITION, DETACH PARTITION, or DROP PARTITION was specified on an ALTER TABLE statement, but the table is not a partitioned table.
  • 3 -- DROP PARTITION of a RANGE partition was specified on the ALTER TABLE statement, but the PRESERVE ROWS clause was used. The PRESERVE ROWS clause is only valid for partitioned tables that have HASH partitioning.
  • 4 -- ALTER PARTITION, ATTACH PARTITION, or DETACH PARTITION of a HASH partition was specified on an ALTER TABLE statement.
  • 5 -- A RANGE partition specified on a CREATE OR REPLACE TABLE statement did not match a partition in the existing table.
  • 6 -- The partition being attached does not have a range defined.
Recovery Text: Change the statement to one that is valid or specify a different table. Try the request again.
SQLCODE or SQLCODEs: -20183
SQLSTATE or SQLSTATEs: 428FT
SQ20200
Message Text: The install or replace of &1 in &2 failed because &3 could not be located.
Cause Text: The URL specified on the install or replace jar procedure did not identify a valid jar file.
Recovery Text: Reissue the install or replace jar procedure with a URL that identifies a valid jar file.
SQLCODE or SQLCODEs: -20200
SQLSTATE or SQLSTATEs: 46001
SQ20201
Message Text: The install, replace, or remove of &1 in &2 failed because the jar name is not valid.
Cause Text: The jar name specified on the install, replace, or remove jar procedure is not valid. For example, the jar id may be of the improper format, may not exist to be replaced or removed, or can not be installed as it already exists.
Recovery Text: Ensure the jar name is of the correct format. If the jar id exists, it may need to be removed before it can be installed. For the remove or replace procedures, ensure the jar id exists.
SQLCODE or SQLCODEs: -20201
SQLSTATE or SQLSTATEs: 46002
SQ20202
Message Text: The replace or remove of &1 in &2 failed because &3 is in use.
Cause Text: The specified class in the jar file is currently in use by a defined procedure, or the replacement jar file does not contain the specified class for which a procedure is defined.
Recovery Text: Ensure all procedures referencing the classes being removed are dropped and resubmit the replace or remove procedure.
SQLCODE or SQLCODEs: -20202
SQLSTATE or SQLSTATEs: 46003
SQ20203
Message Text: Signature not valid for Java method in user defined function or procedure &1 in &2.
Cause Text: The signature of the Java method used to implement the function or procedure is not valid. For example, the method may have parameters that are not compatible with the parameters on the corresponding CREATE statement or the method for a procedure may specify a return value.
Recovery Text: Reissue the corresponding CREATE statement specifying parameters that match the Java method, or correct the parameters or return type of the Java method and rebuild the class.
SQLCODE or SQLCODEs: -20203
SQLSTATE or SQLSTATEs: 46007
SQ20204
Message Text: The user defined function or procedure &1 in &2 was unable to map to a single Java method.
Cause Text: The identified function or procedure either failed to find a matching Java method, or found more than 1 matching Java method.
Recovery Text: Correct either the Java method or corresponding create statement so that the function or procedure call resolves to a single Java method.
SQLCODE or SQLCODEs: -20204
SQLSTATE or SQLSTATEs: 46008
SQ20205
Message Text: User defined function or procedure &1 in &2 has an input argument with a null value.
Cause Text: A function created with CALLED ON NULL INPUT or a procedure has an input parameter with a null value but the Java data type for this argument does not support null values. Examples of Java data types that do not support null values are BOOLEAN, BYTE, SHORT, INT, LONG, or DOUBLE.
Recovery Text: If the method is to be called with null values, ensure the input Java types are capable of accepting a null value. If &1 is a function, RETURNS NULL ON NULL INPUT may be specified on the CREATE FUNCTION statement.
SQLCODE or SQLCODEs: -20205
SQLSTATE or SQLSTATEs: 39004
SQ20206
Message Text: The procedure &1 in &2 returned too many result sets.
Cause Text: The specified procedure returned more results sets than were specified on the procedure definition.
Recovery Text: Modify the procedure to return fewer result sets, or drop and recreate the procedure specifying the correct number of result sets.
SQLCODE or SQLCODEs: +20206
SQLSTATE or SQLSTATEs: 0100E
SQ20207
Message Text: The install or remove jar procedure for &1 in &2 specified the use of a deployment descriptor.
Cause Text: The DEPLOY or UNDEPLOY parameter of the install or replace jar procedure was non-zero; this parameter is not supported and must be zero.
Recovery Text: Reissue the procedure with the DEPLOY or UNDEPLOY parameter set to zero.
SQLCODE or SQLCODEs: -20207
SQLSTATE or SQLSTATEs: 46501
SQ20211
Message Text: Clause not allowed for CREATE VIEW.
Cause Text: ORDER BY, FETCH FIRST n ROWS, and OFFSET are not allowed in the outer fullselect of a view.
Recovery Text: Remove the clause. Try the request again.
SQLCODE or SQLCODEs: -20211
SQLSTATE or SQLSTATEs: 428FJ
SQ20214
Message Text: Table designator &1 is not ordered.
Cause Text: The ORDER OF clause was specified, but table designator &1 is not ordered.
Recovery Text: Correct the ORDER OF clause. Try the request again.
SQLCODE or SQLCODEs: -20214
SQLSTATE or SQLSTATEs: 428FI
SQ20223
Message Text: The encryption or decryption function failed. Encryption facility error.
Cause Text: An attempt to use function ENCRYPT, ENCRYPT_AES, ENCRYPT_RC2, ENCRYPT_TDES, DECRYPT_BIN, DECRYPT_BINARY, DECRYPT_BIT, DECRYPT_CHAR, DECRYPT_DB, or GETHINT failed due to an error with the encryption facility.
Recovery Text: Contact your software service provider.
SQLCODE or SQLCODEs: -20223
SQLSTATE or SQLSTATEs: 560BF
SQ20224
Message Text: Encrypted data that was originally a binary string cannot be decrypted to a character string.
Cause Text: The DECRYPT_CHAR function was invoked with an argument that represents an encrypted string that was originally a binary string. A binary string cannot be cast to a character string using the DECRYPT_CHAR function.
Recovery Text: The encrypted value can only be decrypted using the DECRYPT_BINARY function.
SQLCODE or SQLCODEs: -20224
SQLSTATE or SQLSTATEs: 22528
SQ20226
Message Text: The maximum number of stacked diagnostics areas has been exceeded.
Cause Text: The storage available to hold condition information items or to hold stacked diagnostics has been exceeded.
Recovery Text: Modify the application logic so that fewer SQL warnings occur, or specify additional condition areas using the SET TRANSACTION statement.
SQLCODE or SQLCODEs: -20226
SQLSTATE or SQLSTATEs: 0Z001
SQ20227
Message Text: AS clause required for XML function.
Cause Text: The AS clause must be specified for argument &1 of the XMLATTRIBUTES, XMLFOREST, XMLROW, or XMLGROUP function because the argument is not named. Argument &1 is specified as &2.
Recovery Text: Specify an AS clause to name the argument. Try the request again.
SQLCODE or SQLCODEs: -20227
SQLSTATE or SQLSTATEs: 42633
SQ20228
Message Text: A STACKED diagnostic is not available.
Cause Text: A STACKED diagnostic is only accessible from a handler.
Recovery Text: Modify the application logic so that the STACKED diagnostic is only accessed from within a handler.
SQLCODE or SQLCODEs: -20228
SQLSTATE or SQLSTATEs: 0Z002
SQ20235
Message Text: Alter of materialized query table &1 in &2 not valid.
Cause Text: A column of a materialized query table cannot be added, dropped, or altered.
Recovery Text: Change the statement to one that is valid or specify another table. Try the request again.
SQLCODE or SQLCODEs: -20235
SQLSTATE or SQLSTATEs: 428FY
SQ20236
Message Text: Cursor &1 cannot be returned.
Cause Text: A SET RESULT SETS statement references cursor &1 that was declared with the WITHOUT RETURN attribute. Cursor &1 cannot be specified in a SET RESULT SETS statement.
Recovery Text: Remove the reference to the cursor from the SET RESULT SETS statement. Try the request again.
SQLCODE or SQLCODEs: -20236
SQLSTATE or SQLSTATEs: 428BA
SQ20246
Message Text: &1 in &2 cannot be altered.
Cause Text: Table &1 in &2 cannot be altered due to logical file &3 in &4.
  • Table &1 is a partitioned table and DDS-created logical file &3 is based on the table.
  • Table &1 cannot contain a generated column because multi-format logical file &3 is based on the table.
  • Table &1 cannot contain a generated column because single-format logical file &3 based on multiple physical files is based on the table.
Recovery Text: Remove the logical file. Try the request again.
SQLCODE or SQLCODEs: -20246
SQLSTATE or SQLSTATEs: 428G0
SQ20251
Message Text: Partition &1 cannot be dropped.
Cause Text: An attempt was made to drop or detach partition &1 but it is the last partition in the table. The partition table must contain at least one partition.
Recovery Text: Use the DROP TABLE statement to drop the table.
SQLCODE or SQLCODEs: -20251
SQLSTATE or SQLSTATEs: 428G2
SQ20257
Message Text: INSERT into view &1 in &2 with INSTEAD OF trigger not allowed.
Cause Text: An data change table reference INSERT statement specifies a view defined with an INSTEAD OF trigger. Results of the INSTEAD OF trigger cannot be returned.
Recovery Text: Drop the INSTEAD OF trigger from the view, or specify a different view as the target of the INSERT.
SQLCODE or SQLCODEs: -20257
SQLSTATE or SQLSTATEs: 428G3
SQ20258
Message Text: Use of INPUT SEQUENCE ordering not correct.
Cause Text: The ORDER BY clause specifies INPUT SEQUENCE but the FROM clause of the fullselect does not specify an INSERT statement.
Recovery Text: Specify a valid sort key in the ORDER BY clause or make sure the FROM clause contains an INSERT statement.
SQLCODE or SQLCODEs: -20258
SQLSTATE or SQLSTATEs: 428G4
SQ20259
Message Text: View &2 not allowed in data change table reference.
Cause Text: The definition of view &2 in &3 prevents its use as the target of a data change table reference. The view definition cannot contain a scalar subselect, a scalar fullselect, or a subquery.
Recovery Text: Specify a different view as the data change table reference target, or change the view definition.
SQLCODE or SQLCODEs: -20259
SQLSTATE or SQLSTATEs: 428G6
SQ20267
Message Text: Function &1 in &2 not allowed where specified.
Cause Text: Function &1 in &2 is not allowed where it is specified. The specific name is &3. The reason code is &4:
  • 8 -- A function defined as MODIFIES SQL DATA cannot be specified in the select list of a query that contains an OFFSET clause.
Recovery Text: Remove the function from the query or remove the OFFSET clause.
SQLCODE or SQLCODEs: -20267
SQLSTATE or SQLSTATEs: 429BL
SQ20268
Message Text: Sort sequence cannot be applied. Reason code &4.
Cause Text: Sort sequence table &2 in library &3 cannot be applied for reason code &4. The reason codes and their meanings follow:
  • 1 -- The result of applying the sort sequence table to field &1 is greater than 32,742 bytes.
  • 2 -- The sort sequence table cannot be applied to the following functions: LOCATE, POSITION and POSSTR.
  • 3 -- The sort sequence table cannot be applied to a LIKE predicate or %WLDCRD function.
  • 4 -- A shared weight sort sequence table cannot be applied to the key fields of a create encoded vector index with INCLUDE statement.
  • 5 -- The ICU (International Components for Unicode) table cannot be used for this index.
Recovery Text: Sort sequence table &2 is an International Components of Unicode (ICU) table. Recovery for reason code 1: ICU sort sequence table results are longer than the fields they operate on. If the field can contain SBCS data, the result of applying the sort sequence table can be 6 times the length of the field. Applying this sort sequence table to a DBCS field can be 3 times the length of the field. Either specify a smaller field or a non-ICU type sort sequence table. Recovery for reason code 4: Use a unique-weight sort sequence table. Recovery for the other reason codes: Either omit the function or specify a non-ICU type of sort sequence table.
SQLCODE or SQLCODEs: -20268
SQLSTATE or SQLSTATEs: 429BM
SQ20275
Message Text: XML name &1 not valid.
Cause Text: The XML name &1 is not valid for reason code &2. Reason codes are:
  • 1 -- "xmlns" is used as an XML attribute name or as a prefix for an XML element or attribute name.
  • 2 -- The XML namespace prefix in a qualified XML name is not declared within its scope.
  • 3 -- The name for an XML element or XML attribute is not an XML QName.
  • 4 -- The name for an XML processing instruction is not an XML NCName.
  • 5 -- The name for an XML processing instruction cannot contain "xml".
  • 6 -- The name for an argument of XMLTABLE is not an XML NCName.
Recovery Text: Specify a valid XML name. Try the request again.
SQLCODE or SQLCODEs: -20275
SQLSTATE or SQLSTATEs: 42634
SQ20276
Message Text: XML namespace prefix &1 not valid.
Cause Text: The XML namespace prefix &1 is not valid for reason code &2. Reason codes are:
  • 1 -- The XML namespace prefix is not an XML NCName.
  • 2 -- The name "xml" or "xmlns" cannot be used as an XML namespace prefix.
  • 3 -- The XML namespace prefix is not unique.
Recovery Text: Specify a valid and unique name for the XML namespace prefix. Try the request again.
SQLCODE or SQLCODEs: -20276
SQLSTATE or SQLSTATEs: 42635
SQ20298
Message Text: VALUE specified for GET DESCRIPTOR is greater than current COUNT.
Cause Text: The item number supplied in VALUE for GET DESCRIPTOR is greater than the current COUNT for the descriptor.
Recovery Text: This is a warning only. No information requested for the descriptor item provided in VALUE was returned.
SQLCODE or SQLCODEs: +20298
SQLSTATE or SQLSTATEs: 02505
SQ20299
Message Text: Item &1 already set for descriptor.
Cause Text: Descriptor item &1 was already specified for this SET DESCRIPTOR statement. Each item can be set only one time.
Recovery Text: Remove the duplicate item. Try the request again.
SQLCODE or SQLCODEs: -20299
SQLSTATE or SQLSTATEs: 42747
SQ20307
Message Text: Table &1 cannot be attached or detached from table &3 for reason code &5.
Cause Text: An ATTACH PARTITION or DETACH PARTITION request failed because target table &3 in &4 does not match source table &1 in &2. The failure is described by reason code &5.
  • 1 -- The number of columns in the source and target tables do not match.
  • 5 -- The source table has more than one partition.
  • 6 -- The source table is a view, a materialized query table, a declared global temporary table, a created global temporary table, a system-period temporal table, a history table, or a system table.
  • 7 -- The source table and the target table are the same table.
  • 8 -- NOT LOGGED INITIALLY was specified for either the source table or the target table, but not both.
  • 20 -- The source table has row access control activated but the target table does not have row access control activated.
  • 21 -- The source table has column access control activated but the target table does not have column access control activated.
  • 28 -- Cannot detach a partition from a table that is the parent of an enabled referential integrity constraint.
  • 29 -- The source table and the target table are on differect iASPs.
Recovery Text: Correct the problem. Try the request again.
SQLCODE or SQLCODEs: -20307
SQLSTATE or SQLSTATEs: 428GE
SQ20313
Message Text: DEBUG MODE cannot be changed for routine &1 in &2.
Cause Text: Routine &1 in &2 was created with a DEBUG MODE of DISABLE. The DEBUG MODE cannot be altered.
Recovery Text: Drop the routine and recreate it with DEBUG MODE ALLOW or DEBUG MODE DISALLOW.
SQLCODE or SQLCODEs: -20313
SQLSTATE or SQLSTATEs: 55058
SQ20326
Message Text: XML name &1 too long.
Cause Text: The XML name &1 is too long. The maximum length for an XML element name, an XML attribute name, an XML namespace prefix, and an XML processing instruction name is 128. The maximum length of an XML namespace URI is 1024.
Recovery Text: Ensure the name is not too long. Try the request again.
SQLCODE or SQLCODEs: -20326
SQLSTATE or SQLSTATEs: 54057
SQ20327
Message Text: The depth of an XML document exceeds the maximum number of levels.
Cause Text: An XML value that is being parsed, validated, stored, or is being traversed during the evaluation of an XPath expression is nested deeper than the maximum supported depth. The statement cannot be processed.
Recovery Text: Reduce the number of levels of elements and attributes that are used in the XML value.
SQLCODE or SQLCODEs: -20327
SQLSTATE or SQLSTATEs: 54058
SQ20328
Message Text: An XML schema document with the same target namespace and schema location already exists.
Cause Text: An XML schema document with the same target namespace &1 and schema location &2 already exists for the XML schema &3 in &4. Multiple XML schema documents were added using the XSR_ADDSCHEMADOC stored procedure with the same target namespace and schema location. There cannot be two documents with the same target namespace and schema location within an XML schema.
Recovery Text: Remove the XML schema using XSR_REMOVE stored procedure and then register and add the XML schema documents before the complete. Change the documents so they do not have the same target namespace and schema location.
SQLCODE or SQLCODEs: -20328
SQLSTATE or SQLSTATEs: 42749
SQ20329
Message Text: The completion check for the XML schema failed because one or more XML schema documents are missing.
Cause Text: The XML schema registration completion processing determined that more than one XML schema document is required for a complete XML schema and at least one XML schema document is missing from the XML schema repository. The missing XML schema document is identified by either targetnamespace or schemalocation &1 with value &2.
Recovery Text: Add any missing XML schema documents to the XML schema repository, and then call the XSR_COMPLETE stored procedure in SYSPROC.
SQLCODE or SQLCODEs: -20329
SQLSTATE or SQLSTATEs: 428GI
SQ20330
Message Text: XML schema identified by target namespace &3 and schema location &5 not found in the repository.
Cause Text: The &1 identified by XML &2 &3 and XML &4 &5 is not found in the XML schema respository. If either value was null on the request, the corresponding &3 or &5 is the empty string.
Recovery Text: Add the missing XML schema to the XML schema repository and reissue the statement.
SQLCODE or SQLCODEs: -20330
SQLSTATE or SQLSTATEs: 4274A
SQ20331
Message Text: The XML comment value &1 is not valid.
Cause Text: The string expression in the XML comment cannot contain two adjacent hyphens and cannot end in a hyphen.
Recovery Text: Ensure the value for the XML comment is valid.
SQLCODE or SQLCODEs: -20331
SQLSTATE or SQLSTATEs: 2200S
SQ20332
Message Text: The XML processing instruction &1 is not valid.
Cause Text: The XML processing instruction must not contain the substring '?>'.
Recovery Text: Ensure the value for the XML processing instruction is valid.
SQLCODE or SQLCODEs: -20332
SQLSTATE or SQLSTATEs: 2200T
SQ20335
Message Text: More than one XML schema exists identified by the target namespace and schema location.
Cause Text: There is more than one registered XML schema that matches the target namespace &3 and schema location &5.
Recovery Text: Use the unique XML schema ID to identify the XML schema.
SQLCODE or SQLCODEs: -20335
SQLSTATE or SQLSTATEs: 4274B
SQ20337
Message Text: BY VALUE clause not used correctly.
Cause Text: Use of BY VALUE is not valid for reason code &1. Reason codes are:
  • 1 -- The BY VALUE clause can only be specified when the corresponding data type is XML for an argument of the XMLTABLE function.
  • 2 -- The BY VALUE clause can only be specified for an XMLTABLE result column with data type XML.
Recovery Text: Remove the BY VALUE clause. Try the request again.
SQLCODE or SQLCODEs: -20337
SQLSTATE or SQLSTATEs: 42636
SQ20338
Message Text: The data type of the XMLCAST specification must be XML.
Cause Text: Both operands of the XMLCAST specification must be the XML data type. The XMLCAST specification can be used to cast a NULL XML value, or to cast an XML value to a specified CCSID.
Recovery Text: Change the XMLCAST specification so that both operands are the XML data type. Try the request again.
SQLCODE or SQLCODEs: -20338
SQLSTATE or SQLSTATEs: 42815
SQ20339
Message Text: XML schema &1 in &2 not in correct state for operation &3.
Cause Text: The operation &3 cannot be performed on the XML schema identified by &1 in &2 because it is not in the correct state. For example, the XML schema has already been completed and the operation is attempting to add additional XML schema documents.
Recovery Text: If the schema has not yet been completed, invoke the XSR_COMPLETE stored procedure in SYSPROC and try the operation again. If the schema has already been completed and needs to be updated, you must first remove it or register it using a different name.
SQLCODE or SQLCODEs: -20339
SQLSTATE or SQLSTATEs: 55063
SQ20340
Message Text: XML schema document is not connected to the other XML schema documents.
Cause Text: The XML schema identified by identifier &1 in &2 includes multiple XML schema documents in the namespace &3. At least one of these XML schema documents is not connected to the other XML schema documents registered to this XML schema.
Recovery Text: Correct the XML schema documents, or add a new XML schema document, so that all XML schema documents in an XML schema are connected using import, include, or redefine, beginning from the primary schema document. Use the XSR_REMOVE stored procedure in SYSPROC to remove the schema that is not valid and re-invoke the XSR stored procedures to register it with the corrected and/or new XML schema documents.
SQLCODE or SQLCODEs: -20340
SQLSTATE or SQLSTATEs: 22534
SQ20341
Message Text: Transfer operation ignored since &1 is already the owner of the database object.
Cause Text: The user profile specified already owns the object.
Recovery Text: Specify a different owner on the TRANSFER OWNERSHIP statement.
SQLCODE or SQLCODEs: +20341
SQLSTATE or SQLSTATEs: 01676
SQ20345
Message Text: XML value not a well-formed document.
Cause Text: The XML value is not a well-formed document. An XML value that is being stored in a table must be a well-formed XML document with a single root element.
Recovery Text: Change the XML value to be a well-formed document with a single root element. Try the request again.
SQLCODE or SQLCODEs: -20345
SQLSTATE or SQLSTATEs: 2200L
SQ20346
Message Text: Specified global element not in XML schema.
Cause Text: A validation operation specified that an explicit element local name &2 in namespace &3 should be the root element of the XML document to be validated. The XML schema with SQL identifier &1 does not have &2 declared as a global element in namespace &3. The statement cannot be processed.
Recovery Text: Check that the element local name &2 in namespace URI &3 is correct for the XML schema and for the XML document that is being validated. Change the element local name, namespace, or the XML schema and try the validation again.
SQLCODE or SQLCODEs: -20346
SQLSTATE or SQLSTATEs: 22535
SQ20347
Message Text: Required root element not in XML document.
Cause Text: The root element of the XML document does not match the required element local name &1 in namespace URI &2 specified for the validation operation. The statement cannot be processed.
Recovery Text: Check that the root element matches the specified element local name &1 and namespace URI &2. If the XML value is correct, change the specified element local name or namespace URI.
SQLCODE or SQLCODEs: -20347
SQLSTATE or SQLSTATEs: 22536
SQ20353
Message Text: Data type &2 not allowed in &1.
Cause Text: The &1 clause contains a value of data type &2. Since &1 involves comparisons, this data type is not allowed.
Recovery Text: Use an expression of a different data type in the &1 clause and try the request again.
SQLCODE or SQLCODEs: -20353
SQLSTATE or SQLSTATEs: 42818
SQ20354
Message Text: Row change timestamp column not valid for key.
Cause Text: A ROW CHANGE TIMESTAMP column cannot be specified in a foreign key or a partitioning key for table &1 in &2.
Recovery Text: Remove the column from the key specification. Try the request again.
SQLCODE or SQLCODEs: -20354
SQLSTATE or SQLSTATEs: 429BV
SQ20356
Message Text: Table &1 in &2 cannot be truncated.
Cause Text: A table cannot be truncated for one of the following reasons:
  • The TRUNCATE statement would result in the activation of delete triggers but the statement specified RESTRICT WHEN DELETE TRIGGERS, either implicitly or explicitly. This can occur when enabled delete triggers exist for the table to be truncated, and the result of the TRUNCATE statement would activate the triggers.
  • The TRUNCATE statement is for a table that is the parent table in a referential constraint.
  • The CREATE OR REPLACE TABLE statement with ON REPLACE DELETE ROWS is for a table that is the parent table in a referential constraint.
Recovery Text: If the statement failed because of the existence of delete triggers, specify the IGNORE DELETE TRIGGERS clause on the TRUNCATE statement. If the statement failed because of referential constraints, use the ALTER TABLE statement to drop the FOREIGN KEY constraint from the other table, and then try the request again.
SQLCODE or SQLCODEs: -20356
SQLSTATE or SQLSTATEs: 428GJ
SQ20365
Message Text: Signaling NaN encountered, or exception occurred involving DECFLOAT.
Cause Text: The DECFLOAT special value sNaN was encountered in an expression, arithmetic operation, or function, or an expression, arithmetic operation, or function involving a DECFLOAT column or value resulted in an exception.
Recovery Text: Do not reference sNaN values in an arithmetic operation or function.
SQLCODE or SQLCODEs: +20365, -20365
SQLSTATE or SQLSTATEs: 01565, 22502
SQ20367
Message Text: Clause &1 ignored.
Cause Text: &1 is not supported by DB2 for IBM i or is not supported in the context where it was specified. It has been ignored.
Recovery Text: No action is required.
SQLCODE or SQLCODEs: +20367
SQLSTATE or SQLSTATEs: 01680
SQ20377
Message Text: Character &1 cannot be mapped to a valid XML character.
Cause Text: Character &1 was found in an XML expression or function argument that begins with string &2. This character is not allowed in an XML expression.
Recovery Text: Remove the character or replace it with a character that is allowed.
SQLCODE or SQLCODEs: -20377
SQLSTATE or SQLSTATEs: 0N002
SQ20379
Message Text: &2 cannot transfer ownership or grant authority to itself.
Cause Text: &2 is authorized to the QIBM_DB_SECADM function. An authorization ID authorized to the QIBM_DB_SECADM function cannot transfer the ownership of an object to itself. Likewise, it cannot grant authority to the object to itself.
Recovery Text: Choose a different authorization ID as the new owner of the object or perform this request using a different authorization ID.
SQLCODE or SQLCODEs: -20379
SQLSTATE or SQLSTATEs: 42502
SQ20398
Message Text: XML parsing failed.
Cause Text: The XML parsing failed during SQL processing. The byte offset into the XML value being processed after conversion to UTF-8 is &1. The XML parser error description is: &2.
Recovery Text: Correct the XML value. Try the request again.
SQLCODE or SQLCODEs: -20398
SQLSTATE or SQLSTATEs: 2200M
SQ20399
Message Text: XML parsing or validation failed.
Cause Text: The XML parsing failed during validation. The byte offset into the XML value being processed after conversion to UTF-8 is &1. The XML parser error description is: &2.
Recovery Text: Correct the problem with the XML instance document. Retry the XMLVALIDATE or XDBDECOMPXML.
SQLCODE or SQLCODEs: -20399
SQLSTATE or SQLSTATEs: 2201R
SQ20400
Message Text: XML schema document did not process.
Cause Text: The XML document processing failed. The byte offset into the XML value being processed after conversion to UTF-8 is &1. The XML parser error description is: &2.
Recovery Text: Correct the problem with the XML schema document and CALL the XSR_COMPLETE stored procedure again.
SQLCODE or SQLCODEs: -20400
SQLSTATE or SQLSTATEs: 2200M
SQ20408
Message Text: Partition from table &1 cannot be moved to table &3 because columns &6 and &7 do not match.
Cause Text: An ATTACH PARTITION or DETACH PARTITION request failed because column &7 in target table &3 in &4 does not match column &6 in source table &1 in &2. The failure is described by reason code &5.
  • 1 -- The data types do not match.
  • 2 -- The null attributes do not match.
  • 4 -- The CCSIDs do not match.
  • 7 -- The row change timestamp attributes do not match.
  • 8 -- The allocate lengths do not match.
  • 9 -- A column mask is defined and enabled for column &6 but not for column &7.
  • 10 -- The row begin attributes do not match.
  • 11 -- The row end attributes do not match.
  • 12 -- The transaction start ID attributes do not match.
  • 24 -- The field procedures do not match.
  • 25 -- The generated expression attributes do not match.
  • 27 -- The default values do not match.
Recovery Text: Alter the column in one of the tables to correct the problem. Try the request again.
SQLCODE or SQLCODEs: -20408
SQLSTATE or SQLSTATEs: 428GE
SQ20412
Message Text: Serialization of XML value resulted in conversion error.
Cause Text: Serialization of the XML data may require conversion to a CCSID different from the source CCSID. Substitution characters are not allowed in the result of XML serialization. The statement cannot be processed.
Recovery Text: Choose a target encoding that can represent all characters in the XML value. Unicode encodings are recommended as they can represent all characters. Try the request again.
SQLCODE or SQLCODEs: -20412
SQLSTATE or SQLSTATEs: 2200W
SQ20422
Message Text: Table &1 in &2 must contain a column that is not hidden.
Cause Text: A CREATE or ALTER TABLE of table &1 in schema &2 was attempted but the statement would result in a table with only IMPLICITLY HIDDEN columns. Tables must have at least one column that is not IMPLICITLY HIDDEN.
Recovery Text: Ensure the table has at least one column that is not IMPLICITLY HIDDEN. Try the request again.
SQLCODE or SQLCODEs: -20422
SQLSTATE or SQLSTATEs: 428GU
SQ20423
Message Text: Error occurred during text search processing.
Cause Text: An error occurred during the text search processing of a CONTAINS or SCORE function. The error happened on server &1 using text search index &2 for reason code &3.

Text describing the problem is: &4.

Recovery Text: Refer to the text search documentation for this reason code. Try the request again.
SQLCODE or SQLCODEs: -20423
SQLSTATE or SQLSTATEs: 38H10
SQ20424
Message Text: Text search support is not available for reason &1.
Cause Text: A problem with one of the text search administrative tables was detected. The reason code is &1.
  • 1 - One of the text search administrative tables was not found.
  • 3 - Text search support is not installed.
  • 4 - Text search support is not started.
  • 7 - No text search servers have been defined.
Recovery Text: Make sure text search support is correctly installed and has been started. Try the request again.
SQLCODE or SQLCODEs: -20424
SQLSTATE or SQLSTATEs: 38H11
SQ20425
Message Text: Text search not allowed for column &1.
Cause Text: A CONTAINS or SCORE text search function specified column &1 in table &2 in &3. A text index does not exist for this column so text search processing cannot be performed.
Recovery Text: Define a text index for this column, or use a column that already has a text index defined.
SQLCODE or SQLCODEs: -20425
SQLSTATE or SQLSTATEs: 38H12
SQ20426
Message Text: Conflicting text search administration procedure already running.
Cause Text: A conflicting text search administrative procedure such as update is already running on this index.
Recovery Text: Wait until the other administrative procedure is complete. Try the request again.
SQLCODE or SQLCODEs: -20426
SQLSTATE or SQLSTATEs: 38H13
SQ20427
Message Text: Error occurred during text search administrative procedure.
Cause Text: An error occurred during a text search administrative procedure. The reason code is &2. The text returned is: &1.
Recovery Text: Fix the problem indicated by the reason code and try the administrative procedure again.
SQLCODE or SQLCODEs: -20427
SQLSTATE or SQLSTATEs: 38H14
SQ20430
Message Text: Global variable &1 in &2 may not be used in this context.
Cause Text: Global variable &1 in &2 may not be set or used. A global variable may not be used in a PREPARE, OPEN, EXECUTE IMMEDIATE, or FETCH statement when the current connection is to a remote database.
Recovery Text:

Run the PREPARE, OPEN, EXECUTE IMMEDIATE, or FETCH statement when the current connection is to the local database.

SQLCODE or SQLCODEs: -20430
SQLSTATE or SQLSTATEs: 428GX
SQ20431
Message Text: ROW CHANGE TIMESTAMP expression not valid for table &1 in &2.
Cause Text: A ROW CHANGE TIMESTAMP expression is specified for table &1 in &2 but table does not have a column that is defined as ROW CHANGE TIMESTAMP.
Recovery Text: Remove the ROW CHANGE TIMESTAMP expression or specify a table that contains a ROW CHANGE TIMESTAMP column. Try the request again.
SQLCODE or SQLCODEs: -20431
SQLSTATE or SQLSTATEs: 55068
SQ20434
Message Text: UPDATE statement cannot have all columns set to UNASSIGNED value.
Cause Text: The value UNASSIGNED was used in an UPDATE statement to set the values for all columns in the statement. At least one of the columns must be set to a value other than UNASSIGNED.
Recovery Text: Change the value of at least one of the extended indicator variables to a value other than UNASSIGNED. Try the request again.
SQLCODE or SQLCODEs: -20434
SQLSTATE or SQLSTATEs: 22540
SQ20436
Message Text: Data type not valid for array.
Cause Text: CREATE TYPE for an array was specified using a data type that is not supported for an array.
Recovery Text: Change the data type to one that can be used for an array. Try the request again.
SQLCODE or SQLCODEs: -20436
SQLSTATE or SQLSTATEs: 429C2
SQ20437
Message Text: Operation only allowed for array variables.
Cause Text: An operand that is not an SQL array was specified for an operation that is only allowed for an array. Array subscripts, TRIM_ARRAY, UNNEST, CARDINALITY, and MAX_CARDINALITY can only be specified for an SQL array parameter or variable.
Recovery Text: Change the operand to be an SQL array variable or parameter. Try the request again.
SQLCODE or SQLCODEs: -20437
SQLSTATE or SQLSTATEs: 428H0
SQ20438
Message Text: Array subscript value not correct data type.
Cause Text: The value specified for the subscript of an array must be a built in numeric or string data type.
Recovery Text: Change the array subscript to a valid value. Try the request again.
SQLCODE or SQLCODEs: -20438
SQLSTATE or SQLSTATEs: 428H1
SQ20439
Message Text: Value &1 not valid for array subscript.
Cause Text: Value &1 was specified as the subscript of an array but the value is negative or 0, the value is greater than the maximum cardinality of the array, or the value is being used to reference an array element greater than the current cardinality. If the value is -1, the NULL value may have been supplied for the subscript, or the array is a read-only array.
Recovery Text: Change the subscript to a valid value or use an array that is not a read-only array. Try the request again.
SQLCODE or SQLCODEs: -20439
SQLSTATE or SQLSTATEs: 2200E, 2202E
SQ20440
Message Text: Cardinality &1 of source array greater than maximum &2 of target array.
Cause Text: Cardinality &1 of the source array is greater than the maximum cardinality of the target array. The array cannot be assigned.
Recovery Text: Change the maximum cardinality of the target array so that all elements of the source array will fit in the array. TRIM_ARRAY can be used to reduce the size of the source array. Try the request again.
SQLCODE or SQLCODEs: -20440
SQLSTATE or SQLSTATEs: 2202F
SQ20441
Message Text: Array or boolean type not valid where specified.
Cause Text: An array or boolean type was used but is not allowed in the specified context.

Array types can only be used:

  • As an argument of as SQL scalar function or an SQL or JAVA procedure.
  • For an SQL variable declared in an SQL procedure or SQL scalar function.
  • In a CAST specification in an SQL procedure or SQL scalar function.

The data type of the array type that is used when a routine is invoked must match the data type of the array that was used when the routine was created.

The REGEXP_LIKE function returns a boolean type and can only be used as a predicate.

Recovery Text: Remove the reference to the array type. If the data type of the array changed after the routine was created, recreate the routine so it will use the new definition. For the REGEXP_LIKE function, make sure it is used as a predicate with no comparison operators. Try the request again.
SQLCODE or SQLCODEs: -20441
SQLSTATE or SQLSTATEs: 428H2
SQ20446
Message Text: CCSID was changed.
Cause Text: An associated mixed or graphic CCSID does not exist for the job's default CCSID &1. A CCSID of UTF-8 or UTF-16 will be used.
Recovery Text: Change the job's CCSID to one that has an associated mixed or graphic CCSID.
SQLCODE or SQLCODEs: +20446
SQLSTATE or SQLSTATEs: 0168P
SQ20447
Message Text: Format string not valid for function &1.
Cause Text: The format string specified in argument 2 of function &1 is not valid because the length of the format string is greater than 255, the length of the result of the VARCHAR_FORMAT function is greater than 255, or the format string contains an unsupported element.

The format string may not be valid for one of the following reasons:

  • The format does not contain a format element.
  • The format contains multiple elements that represent the same component of a timestamp.
  • The format contains AM, IYYY.
Recovery Text: Specify a valid format string for the function. Try the request again.
SQLCODE or SQLCODEs: -20447
SQLSTATE or SQLSTATEs: 22007
SQ20448
Message Text: Expression not valid using format string specified for TIMESTAMP_FORMAT.
Cause Text: Argument 1 of the TIMESTAMP_FORMAT function can not be interpreted using the format string specified in argument 2 for one of the following reasons:
  • The string expression is too short or too long.
  • The string expression does not conform to the template specified in the format string.
  • Too many digits were specified in the string expression for the corresponding format element in the format string.
  • A value in the string expression is not valid for the corresponding format element in the format string.
Recovery Text: Specify a valid format string for the function. Try the request again.
SQLCODE or SQLCODEs: -20448
SQLSTATE or SQLSTATEs: 22007
SQ20451
Message Text: Cycle detected in hierarchical query.
Cause Text: The hierarchical query using the CONNECT BY clause found a row that is a direct or indirect parent of itself by using the CONNECT BY search condition.
Recovery Text: Do one of the following:
  • If a cycle is expected, add the NOCYCLE keyword to the CONNECT BY clause.
  • If no cycles are expected, use the CONNECT_BY_ISCYCLE pseudo column along with the NOCYCLE keyword to find a row that is directly or indirectly an ancestor of itself.
SQLCODE or SQLCODEs: -20451
SQLSTATE or SQLSTATEs: 560CO
SQ20452
Message Text: Hierarchical query construct &1 not used correctly.
Cause Text: The &1 construct was found outside of its allowed context for one of the following reasons:
  • The construct was specified in the START WITH clause.
  • In the subselect where it was specified, there is no CONNECT BY clause.
  • PRIOR was specified outside the context of a CONNECT BY clause.
  • An argument of CONNECT_BY_ROOT or SYS_CONNECT_BY_PATH cannot be an aggregate function or OLAP specification.
  • ORDER SIBLINGS BY was specified, but there is a DISTINCT, GROUP BY, or HAVING clause in the query which has changed the partial order provided by the hierarchical query.
Recovery Text: Make one of the following changes and try the request again.
  • If the construct is LEVEL and this is not a hierarchical query, make sure a column or variable with that name exists and can be resolved to for the statement.
  • Verify that there is a CONNECT BY clause in the subselect containing &1.
  • Remove &1 from the statement.
SQLCODE or SQLCODEs: -20452
SQLSTATE or SQLSTATEs: 428H4
SQ20454
Message Text: Specified join operation not valid.
Cause Text: The specified join operation is not valid for reason code &1. Reason codes and their meanings are:
  • 20 -- The USING clause is specified and the select list contains only T.* where T is a table in the join. All the columns in table T are contained in the USING clause so the result table is empty.
Recovery Text: Change the select list to return at least one result column. Try the request again.
SQLCODE or SQLCODEs: -20454
SQLSTATE or SQLSTATEs: 428H5
SQ20455
Message Text: Text search index &1 may be out of date.
Cause Text: The text index &1 used for text search processing of a CONTAINS or SCORE function may be out of date.
Recovery Text: Run the administrative stored procedure to update the text index. Try the request again.
SQLCODE or SQLCODEs: +20455
SQLSTATE or SQLSTATEs: 0168R
SQ20463
Message Text: Result sets not returned because procedure called by function or trigger.
Cause Text: Result sets will not be returned to the client because the procedure was directly or indirectly called by a function or trigger.
Recovery Text: No recovery is necessary.
SQLCODE or SQLCODEs: +20463
SQLSTATE or SQLSTATEs: 0168U
SQ20469
Message Text: Access control on table &1 in &2 is not valid.
Cause Text: Row or column access control for table &1 in &2 either cannot be activated or is not valid. The reason code is &3. Reason codes are:
  • 37 -- A trigger, &4 in &5, is defined for the table and the trigger is not defined as secured or is a read trigger.
  • 38 -- A view is defined on the table. Trigger &4 in &5 is defined for that view and the trigger is not defined as secured.
  • 39 -- A materialized query table definition directly or indirectly references user defined function &4 in &5 which must be defined as secured due to one of the following conditions: 1) The materialized query table is defined on the table and the table has row or column access control. 2) The materialized query table has row or column access control. 3) The function either directly or indirectly references a table with row or column access control.
Recovery Text: Do one of the following based on the reason code:

37, 38 -- Alter trigger &4 in &5 using the SECURE keyword to make it secure.

  • 39 -- Alter user defined function &4 in &5 using the SECURE keyword to make it secure. If the user defined function name is *N, examine the job log to determine which function needs to be altered.
SQLCODE or SQLCODEs: -20469
SQLSTATE or SQLSTATEs: 55019
SQ20470
Message Text: &2 in &3 cannot be used for row and column access control.
Cause Text: &2 in &3 type &1 cannot be created or altered for one of the following reasons because &5 in &6 type &4 depends on it for row or column level access control.
  • A user defined function must be secure if it is referenced in a PERMISSION or MASK or is referenced in a view that is referenced by a PERMISSION or MASK.
  • A trigger must be secure if it is defined on a table with an active PERMISSION or MASK.
  • A trigger must be secure if it is defined on a view that is based on a table with an active PERMISSION or MASK.
  • A read trigger cannot be defined over a table with active row or column level access control.
Recovery Text: If &2 in &3 is a read trigger, row or column access control must be deactivated. Otherwise, use the SECURE keyword to create or alter &2 in &3 type &1 to be secure.
SQLCODE or SQLCODEs: -20470
SQLSTATE or SQLSTATEs: 428H8
SQ20471
Message Text: INSERT or UPDATE does not satisfy row permissions.
Cause Text: Row access control is enforced for &1 in &2. Consequently, all attempts to insert or update rows in that table are checked to ensure that the resulting rows conform to the row permissions defined for the table. The INSERT or UPDATE could not be done because a resulting row did not satisfy one or more row permissions for &1 in &2.
Recovery Text: Change the data being inserted or updated so that it conforms to the rules defined for the row permissions.
SQLCODE or SQLCODEs: -20471
SQLSTATE or SQLSTATEs: 22542
SQ20472
Message Text: &1 cannot be used as the name of a permission or mask.
Cause Text: The name specified for the mask or permission cannot be used for reason code &2.
  • 3 -- &1 begins with the letters QIBM which are not allowed as the first 4 characters of a row permission or column mask name.
Recovery Text: Choose a different mask or permission name.
SQLCODE or SQLCODEs: -20472
SQLSTATE or SQLSTATEs: 428H9
SQ20473
Message Text: Column &3 cannot be used as an argument of function &1.
Cause Text: Function &1 in &2 is not secure and column &3 has an active and enabled column mask. An input argument of a function that is not secure must not reference a column with a mask that is enabled on a table with active column access control.
Recovery Text: Alter function &1 in &2 to be SECURE. Try the request again.
SQLCODE or SQLCODEs: -20473
SQLSTATE or SQLSTATEs: 428HA
SQ20474
Message Text: Permission or mask &7 in &8 is not valid.
Cause Text: The requested operation has failed because permission or mask &7 in &8 directly or indirectly references one of the following, as described by reason code &4.
  • 1 -- The table for which the row permission or the column mask is being defined. The definition references &1 in &2, type *&3, or references view or alias &5 in &6 that is defined over &1 in &2.
  • 3 -- User-defined function &5 in &6, which is not secure.
  • 4 -- Function &5 in &6, which is defined as not deterministic or is defined to have an external action.
  • 5 -- An OLAP specification.
  • 7 -- A ROW CHANGE expression.
  • 8 -- A sequence reference.
  • 9 -- A declared global temporary table, a created global temporary table, a table in QTEMP, a file with a read trigger, or a distributed file.
  • 11 -- A * or name.* in a SELECT clause.
  • 35 -- Mask cannot return NULL for a column that is defined as NOT NULL.
  • 53 -- Table &5 in &6, which is a member alias.

This failure may occur when attempting to do one of the following operations:

  • CREATE MASK or CREATE PERMISSION of &7 in &8.
  • CREATE FUNCTION or ALTER FUNCTION of a function that is used by &7 in &8 type &9.
  • ALTER TABLE of &1 in &2.
  • ALTER MASK or ALTER PERMISSION of &7 in &8.
  • ALTER MASK, ALTER PERMISSION, DROP MASK, or DROP PERMISSION of any mask or permission defined on &1 in &2.
  • CREATE MASK or CREATE PERMISSION of additional masks or permissions defined on &1 in &2.
  • Any operation that uses table &1 in &2.
Recovery Text: Correct the problem. Try the request again.
SQLCODE or SQLCODEs: -20474
SQLSTATE or SQLSTATEs: 428HB
SQ20475
Message Text: A mask is already defined for column &5.
Cause Text: Column mask &1 in &2 is currently defined for column &5. Only one column mask may be defined on a column.
Recovery Text: Define this column mask on a different column or drop column mask &1 in &2 and try the request again.
SQLCODE or SQLCODEs: -20475
SQLSTATE or SQLSTATEs: 428HC
SQ20478
Message Text: Row or column access control is not valid.
Cause Text: Row or column access control specified by row permission or column mask &1 in &2 is not valid for the query for reason code &4. The reason codes and their meanings are:
  • 20 -- The result table is derived from a recursive common table expression and column &3 is specified in the fullselect of the recursive common table expression. A column mask cannot be applied to column &3.
  • 30 -- An insert or update operation is using a masked value returned from column mask &1 in &2 for column &3. The expression specified in the THEN or ELSE clause of the column mask definition that is used to return the masked value is not a direct reference of column &3.
  • 51 -- A distributed table cannot be referenced in a query that also references a table with active permissions or masks.
  • 52 -- A table with read triggers cannot be referenced in a query that also references a table with active permissions or masks.
Recovery Text:

For INSERT and UPDATE, the value returned from the mask must be a direct reference to the column itself.

Remove the incorrect reference and try the request again.

SQLCODE or SQLCODEs: -20478
SQLSTATE or SQLSTATEs: 428HD
SQ20479
Message Text: Object &1 in &2 type *&4 cannot be dropped or altered.
Cause Text: &1 in &2 cannot be dropped or altered as specified because it is involved in row or column access control &5 in &6. See reason code &3 for more information on the failure:
  • 1 -- Dependent object &5 in &6 type &7 references column &8.
  • 2 -- The authorization ID associated with the statement in not authorized to the QIBM_DB_SECADM function.
  • 3 -- &1 in &2 type *&4 is defined with row or column access control. An attempt to regenerate &5 in &6 has failed.
Recovery Text: Do one of the following based on the reason code.
  • 1 -- DROP the dependent object &5 in &6 type &7 and try the request again.
  • 2 -- Perform the operation with a user profile that is authorized to the Database Security Administrator function. This is obtained through Application Administration in System i Navigator, or with the Change Function Usage Information (CHGFCNUSG) command with a function ID of QIBM_DB_SECADM.
  • 3 -- See previously listed messages in the job log for the cause of the failure, correct the problem and retry the request.
SQLCODE or SQLCODEs: -20479
SQLSTATE or SQLSTATEs: 42917
SQ20481
Message Text: Table, view, or function &1 in &2 references itself.
Cause Text: An attempt was made to create or invoke function &1 in &2 or to replace the definition of table or view &1 in &2. The operation failed due to reason &3. Reason codes are:
  • 1 -- The new view definition of &1 in &2 contains a reference to itself. This circular self-reference can either be explicit in the definition, or implicit by a reference to another view that explicitly or implicitly references &1.
  • 2 -- Function &1 in &2 contains a reference to itself in its default expression. This can happen through the invocation of another function that references &1.
  • 3 -- CREATE OR REPLACE TABLE of &1 in &2 contains a reference to itself or to a dependent view, materialized query table, or alias.
Recovery Text: Remove the circular self-reference from the object definition and try the request again.
SQLCODE or SQLCODEs: -20481
SQLSTATE or SQLSTATEs: 429C3
SQ20483
Message Text: Named argument &1 for routine &2 not valid for reason code &4.
Cause Text: The named argument for parameter &1 is not valid for reason code &4.
  • 1 -- The CALL statement or function invocation includes named argument &1 which does not exist for routine &2 in schema &3.
  • 2 -- The CALL statement or function invocation includes named argument &1 which is followed by one or more unnamed arguments. All arguments following a named argument must also be named.
  • 3 -- The CALL statement or function invocation specifies named argument &1 more than once, either explicitly or implicitly.
  • 4 -- The CALL statement specifies named argument &1 and routine &2 in &3 is not found. Named arguments are only supported for procedures defined with the CREATE PROCEDURE statement.
  • 5 -- The function invocation of &2 in &3 specifies named argument &1 and the ordinal position of the corresponding parameter is different for at least two candidate functions.
Recovery Text: Change the invocation of the procedure or function to use named parameters that are valid. Try the request again.
SQLCODE or SQLCODEs: -20483
SQLSTATE or SQLSTATEs: 4274K
SQ20484
Message Text: Parameter &3 required for routine &1 in &2.
Cause Text: A call statement for routine &1 in schema &2 specified with a named parameter is not valid. Parameter &3 must be specified on the call statement because it has no default value.
Recovery Text: Specify a value for parameter &3. Try the request again.
SQLCODE or SQLCODEs: -20484
SQLSTATE or SQLSTATEs: 428HF
SQ20489
Message Text: Index &1 cannot be both an encoded vector index and span all partitions.
Cause Text: An attempt was made to create index &1 as an encoded vector index and have it span all partitions of a partitioned table. An encoded vector index can only be created over a single partition of a partitioned table or over a non-partitioned table.
Recovery Text: Change the CREATE INDEX statement to remove either the NOT PARTITIONED clause or the ENCODED VECTOR clause. Try the request again.
SQLCODE or SQLCODEs: -20489
SQLSTATE or SQLSTATEs: 42929
SQ20490
Message Text: Table &1 in &2 cannot be defined as a system-period temporal table.
Cause Text: Table &1 in &2 cannot be altered to be a system-period temporal table. Reason code is &3.
  • 1 -- The table is already a system-period temporal table or a history table.
  • 2 -- The table does not have a SYSTEM_TIME period defined or does not have a transaction start ID column.
  • 3 -- The table is a materialized query table or a distributed table.
  • 6 -- The table or the associated history table has the NOT LOGGED INITIALLY attribute activated.
  • 10 -- The table has a ROWID or a DataLink with FILE LINK CONTROL column.
Recovery Text: Correct the definition of the table to be used as a system-period temporal table. Try the request again.
SQLCODE or SQLCODEs: -20490
SQLSTATE or SQLSTATEs: 428HM
SQ20491
Message Text: Period &1 not valid.
Cause Text: The period definition for &1 is not valid. The reason code is &2:
  • 1 -- The start column and the end column cannot be the same column.
  • 6 -- The start column must be defined as a row begin column and the end column must be defined as a row end column.
Recovery Text: Correct the columns used in the definition of the period.
SQLCODE or SQLCODEs: -20491
SQLSTATE or SQLSTATEs: 428HN
SQ20523
Message Text: Table &1 in &2 cannot be used as a history table.
Cause Text: Table &1 in &2 cannot be defined as the history table for a system-period temporal table. The reason code is &3.
  • 1 -- The table is a system-period temporal table, a history table, a view, a declared global temporary table, a created global temporary table, a materialized query table, or a distributed table.
  • 4 -- The table has a column defined as a generated column.
  • 5 -- The table has a period defined.
  • 6 -- The table is part of a referential constraint or has a primary or unique constraint.
  • 7 -- The number of columns in the system-period temporal table and the history table are not the same.
  • 10 -- The corresponding columns of the system-period temporal table and the history table must have identical names, data type, length, precision, scale, CCSID, FOR xxx DATA, null attribute, hidden attribute, and field procedure.
  • 12 -- The table has a before insert or before update trigger defined.
Recovery Text: Alter table &1 to make it eligible as a history table or specify a different table.
SQLCODE or SQLCODEs: -20523
SQLSTATE or SQLSTATEs: 428HX
SQ20524
Message Text: Period specification not valid.
Cause Text: A FOR SYSTEM_TIME period specification or the period clause for setting the CURRENT TEMPORAL SYSTEM_TIME special register is not valid for period &2. The reason code is &1.
  • 1 -- A FOR SYSTEM_TIME period was specified both in the definition of a view and explicitly or implicitly in a query that references the view.
  • 2 -- A FOR SYSTEM_TIME period was specified in the FROM clause but the table is not a view or system-period temporal table.
  • 3 -- Expression is not valid. The result of the expression must be compatible with a TIMESTAMP(12). It cannot contain a column reference, a scalar fullselect, or a function that is not deterministic, has an external action, or modifies SQL data.
  • 4 -- The period specification or period clause was specified for a view where the view definition includes an external function other than NO SQL or an SQL function that is not inline capable.
  • 6 -- A FOR SYSTEM_TIME clause was specified but the value of the CURRENT TEMPORAL SYSTEM_TIME special register is not null and the SYSTIME option is set to YES.
Recovery Text: Correct the period specification or period clause. Set the CURRENT TEMPORAL SYSTEM_TIME special register to the null value if a period specification is included in the FROM clause.
SQLCODE or SQLCODEs: -20524
SQLSTATE or SQLSTATEs: 428HY
SQ20525
Message Text: Operation on table &1 in &2 not allowed.
Cause Text: Table &1 in &2 cannot be used for the specified operation. The reason code is &3.
  • 1 -- Cannot add a period to a history table.
  • 2 -- Cannot drop a period from a system-period temporal table.
  • 4 -- Cannot drop versioning for a table that is not a system-period temporal table.
  • 9 -- Cannot truncate a system-period temporal table.
  • 11 -- Cannot define a referential constraint where either the parent or child table is a history table. A primary or unique constraint cannot be defined for a history table.
  • 12 -- Cannot detach a partition from a system-period temporal table.
  • 13 -- Cannot add a column to a history table.
  • 16 -- Cannot add a generated column, ROWID column, or DataLink with FILE LINK CONTROL column to a system-period temporal table.
  • 17 -- Cannot specify ACTIVATE NOT LOGGED INITIALLY.
  • 21 -- CREATE TABLE with the OR REPLACE option cannot reference a system-period temporal table or a history table.
Recovery Text: Drop versioning from the system-period temporal table before performing the alter to the history table or the system-period temporal table.
SQLCODE or SQLCODEs: -20525
SQLSTATE or SQLSTATEs: 428HZ
SQ20527
Message Text: Period &1 not defined.
Cause Text: Period &1 for table &2 in &3 does not exist.
Recovery Text: Specify a period name that has been defined for the table.
SQLCODE or SQLCODEs: -20527
SQLSTATE or SQLSTATEs: 4274M
SQ20528
Message Text: Data change operation on system-period temporal table &1 in &2 cannot be performed.
Cause Text: Table &1 in &2 is a system-period temporal table with a period &3. The requested data change operation cannot be performed because the row begin and row end values in the associated history table would be out of order. This situation can occur when two transactions are performing data change operations on the same row.
Recovery Text: Make sure only one transaction is modifying a row. Try the statement again.

To allow system adjustment of the row begin and row end values, set the SYSTIME_PERIOD_ADJ INI option to have a value of *ADJUST.

SQLCODE or SQLCODEs: +20528, -20528
SQLSTATE or SQLSTATEs: 01695, 57062
SQ20529
Message Text: Argument of WRAP function or CREATE_WRAPPED procedure not valid.
Cause Text: The argument of the WRAP function or the CREATE_WRAPPED procedure is not a valid SQL statement. The valid statements are:
  • CREATE FUNCTION (SQL)
  • CREATE PROCEDURE (SQL)
  • CREATE TRIGGER

If the argument is one of these statements, it is not valid if it has already been wrapped and the token directly following the WRAPPED keyword is not a supported application server value.

Recovery Text: Make sure the argument to the WRAP function or the CREATE_WRAPPED procedure is a valid statement. If the statement is already wrapped by a different application server, it cannot be processed using DB2 for i.
SQLCODE or SQLCODEs: -20529
SQLSTATE or SQLSTATEs: 5UA0O
SQ20530
Message Text: Obfuscated statement is not valid. Reason code is &1.
Cause Text: An error occurred processing an SQL statement that includes the WRAPPED clause. The reason code is &1. Reason codes and their meanings are:
  • 1 -- The statement was wrapped on a platform or version that is not supported.
  • 2 -- The obfuscated portion of the statement is corrupted.
Recovery Text: Make sure that the statement was wrapped on a supported platform and that the obfuscated portion of the statement has not been modified.
SQLCODE or SQLCODEs: -20530
SQLSTATE or SQLSTATEs: 42638
SQ20535
Message Text: &1 for table &2 in &3 not allowed.
Cause Text: Table &2 in &3 cannot be used for &1. The data change operation is not supported because the target of the operation references a temporal table and a period specification was specified. The period specification was either implicitly specified by using special register &4, or explicitly specified in the fullselect specified as the target. The reason code is &5.
  • 1 -- The CURRENT TEMPORAL SYSTEM_TIME special register contains a non-null value and the target of the data change operation is a system-period temporal table (directly or indirectly). The data in a system-period temporal table cannot be changed when a period specification is in effect.
Recovery Text: Set the CURRENT TEMPORAL SYSTEM_TIME special register to the null value and try the data change operation again. If the statement is included in a program that should not be sensitive to the setting of the CURRENT TEMPORAL SYSTEM_TIME special register, set the SYSTIME option to NO on the precompile command.
SQLCODE or SQLCODEs: -20535
SQLSTATE or SQLSTATEs: 51046
SQ20538
Message Text: Row and column access control on &3 in &4 may need to be changed.
Cause Text: Row and column access control has been modified for &1 in &2 which is referenced by &3 in &4. If &1 is a system-period temporal table, &3 is its history table. Otherwise, &3 is a materialized query table that references &1.
Recovery Text: A comparable change may need to be made to the row and column access control definitions for table &3 in &4.
SQLCODE or SQLCODEs: +20538
SQLSTATE or SQLSTATEs: 01698
SQ20539
Message Text: Negative or null value not allowed.
Cause Text: The row count value specified in the OFFSET clause, the FETCH FIRST clause, or the LIMIT clause returned either a negative number or the null value.
Recovery Text: Specify an accepted value and try the request again.
SQLCODE or SQLCODEs: -20539
SQLSTATE or SQLSTATEs: 2201W, 2201X
SQ20547
Message Text: Variable &1 in &2 is read-only.
Cause Text: An attempt to use variable &1 in &2 as a target of an assignment statement has failed because &1 in &2 is a read-only global variable.
Recovery Text: Change the statement to use a different variable. Try the request again.
SQLCODE or SQLCODEs: -20547
SQLSTATE or SQLSTATEs: 428I3
SQ20556
Message Text: Multiple results cannot be returned from the scalar function.
Cause Text: An SQL statement invoked built-in function &1, passing a search path in the second argument. In the third argument, an 'na' directive was also passed, indicating that no array values should be returned. However, at least one document contained an array element at the field identified by the search path.
Recovery Text: Either change the search path to one which does not include arrays or change the third argument to indicate that arrays should be included in the search. Try the request again.
SQLCODE or SQLCODEs: -20556
SQLSTATE or SQLSTATEs: 22547
SQ20558
Message Text: Regular expression string for function &2 not valid.
Cause Text: Regular expression string starting with &4 for function &2 is not valid. Position is &3. Reason code is &1. Reason codes and their descriptions are:
  • 1 -- Syntax error in regular expression pattern.
  • 2 -- Unrecognized backslash escape sequence in pattern.
  • 3 -- Incorrect Unicode property name.
  • 4 -- Use of regular expression feature that is not supported.
  • 5 -- Incorrectly nested parentheses in regular expression pattern.
  • 6 -- Decimal number is too large.
  • 7 -- Error in {min,max} interval.
  • 8 -- Maximum is less than minimum in {min,max} interval.
  • 9 -- Back-reference is made to a non-existent capture group.
  • 10 -- Look-behind pattern matches must have a bounded maximum length.
  • 11 -- Regular expressions cannot have UnicodeSets containing strings.
  • 12 -- Octal character constants must be less than or equal to 0377.
  • 13 -- Missing a closing bracket on a bracket expression.
  • 14 -- In a character range [x-y], x is greater than y.
  • 15 -- Unspecified error.
Recovery Text: Correct the regular expression argument used in function &2. Try the request again.
SQLCODE or SQLCODEs: -20558
SQLSTATE or SQLSTATEs: 2201S
SQ30000
Message Text: Distributed Relational Database Architecture (DRDA) protocol error.
Cause Text: Command or SQL statement failed due to a distributed protocol error that will not affect subsequent commands or SQL statements. The protocol error is &1 with a location code of &2.

The location codes are:

  • '01'X -- The error was detected at the application requester.
  • '02'X -- The error was detected at the application server.

A possible list of protocol errors is:

  • '121C'X -- Not authorized to command.
  • '1245'X -- Conversation protocol error. The error code is &3.
  • '124C'X -- Data stream syntax error. The error code is &3.
  • '1254'X -- Unexpected error condition. The error code is &3.
  • '125F'X -- Application server does not support function requested.
  • '2202'X -- Cursor not open.
  • '2204'X -- Relational database not connected.
  • '2207'X -- Relational database already connected.
  • '220A'X -- Data descriptor not valid. The error code is &3.
  • '220E'X -- Data descriptor did not match data.
  • '220F'X -- Cursor already open.
  • '221D'X -- Command not valid for conversation type.

If the protocol error does not appear in the list, refer to the DDM Architecture Reference for DDM code point &1.

Recovery Text: If the protocol error is '121C'X, then obtain the authorization required to use this command or SQL statement at the application server. If the protocol error is not '121C'X, then report the problem using Analyze Problem (ANZPRB).
SQLCODE or SQLCODEs: -30000
SQLSTATE or SQLSTATEs: 58008
SQ30001
Message Text: Call to distributed SQL program not allowed.
Cause Text: An attempt was made to use Submit Remote Command (SBMRMTCMD) to call a distributed SQL program from a Distributed Data Management (DDM) target job.
Recovery Text: Call the SQL program from a job that is not a DDM target job.
SQLCODE or SQLCODEs: -30001
SQLSTATE or SQLSTATEs: 57042
SQ30020
Message Text: Distributed Relational Database Architecture (DRDA) protocol error.
Cause Text: Command or SQL statement failed due to a distribution protocol error that will affect subsequent SQL statements or commands. The application has been disconnected and the process is in an unconnected state. The protocol error is &1 with a location code of &2.

The location codes are:

  • '01'X -- The error was detected at the application requester.
  • '02'X -- The error was detected at the application server.

A possible list of protocol errors is:

  • '1218'X -- Unsupported function requested. The error code is &3.
  • '1232'X -- Unexpected permanent error.
  • '1245'X -- Conversation protocol error. The error code is &3.
  • '1254'X -- Unexpected error condition. The error code is &3.

If the protocol error does not appear in the list, refer to the DDM Architecture Reference for DDM code point &1.

Recovery Text: Report the problem using Analyze Problem (ANZPRB).
SQLCODE or SQLCODEs: -30020
SQLSTATE or SQLSTATEs: 58009
SQ30021
Message Text: Distributed relational database not supported by the remote system.
Cause Text: An attempt was made to connect to a Distribute Data Management (DDM) server that does not support Distributed Relational Database Architecture (DRDA).

On the remote system, the DDM manager class was &1 with manager level &2.

Recovery Text: Change the program to connect to a relational database which supports DRDA.
SQLCODE or SQLCODEs: -30021
SQLSTATE or SQLSTATEs: 58010
SQ30040
Message Text: DRDA resources at relational database &1 unavailable.
Cause Text: SQL statement or command failed due to an unavailable Distributed Relational Database Architecture (DRDA) resource that will not affect subsequent commands and SQL statements.

DRDA resource &2 is unavailable at relational database &1 with location code &3.

The resource codes are:

  • '1409'X -- Communication buffer.
  • '1410'X -- Local build space.
  • '1411'X -- Diagnostic area.
  • '1412'X -- Local build space.
  • '1413'X -- LOB build space.
  • '1414'X -- Pool space.

The location codes are:

  • '01'X -- Application requester.
  • '02'X -- Application server.
Recovery Text: Free the DRDA resource and try the request again.
SQLCODE or SQLCODEs: -30040
SQLSTATE or SQLSTATEs: 57012
SQ30041
Message Text: DRDA resources at relational database &1 unavailable.
Cause Text: SQL statement or command failed due to an unavailable Distributed Relational Database Architecture (DRDA) resource that will affect subsequent commands and SQL statements. The application has been disconnected and the process is in an unconnected state.

DRDA resource &2 is unavailable at relational database &1 with location code &3.

The resource codes are:

  • '1409'X -- Communication buffer.
  • '1410'X -- Local build space.
  • '1411'X -- Diagnostic area.
  • '1412'X -- Local build space.
  • '1413'X -- LOB build space.
  • '1414'X -- Pool space.

The location codes are:

  • '01'X -- Application requester.
  • '02'X -- Application server.
Recovery Text: Free the DRDA resource and try the request again.
SQLCODE or SQLCODEs: -30041
SQLSTATE or SQLSTATEs: 57013
SQ30050
Message Text: DDM command &1 not valid while bind process in progress.
Cause Text: An attempt was made to run Distributed Data Management (DDM) command &1. This command is not valid while a bind process is in progress.
Recovery Text: Report this problem using the Analyze Problem (ANZPRB) command.
SQLCODE or SQLCODEs: -30050
SQLSTATE or SQLSTATEs: 58011
SQ30051
Message Text: Bind process for specified package name and consistency token not active.
Cause Text: Attempted to run a BNDSQLSTT or ENDBND Distributed Data Management (DDM) command for a bind process that was not active.
Recovery Text: Report this problem using the Analyze Problem (ANZPRB) command.
SQLCODE or SQLCODEs: -30051
SQLSTATE or SQLSTATEs: 58012
SQ30052
Message Text: Program preparation assumptions not correct.
Cause Text: The application requester did not understand the SQL statement and assumed all host variables were input, but this assumption was not correct.
Recovery Text: Refer to the CRTSQLxxx (where xxx=CBL, PKG, PLI, RPG, CI, CPPI, RPGI, or CBLI) listing to find all SQL statements that were not recognized. Remove all unrecognized SQL statements that contain output host variables. Precompile the program again.
SQLCODE or SQLCODEs: -30052
SQLSTATE or SQLSTATEs: 42932
SQ30053
Message Text: Not authorized to create package for owner &1.
Cause Text: Attempt to create the package failed because you are not authorized to owner &1.
Recovery Text: Obtain the required authorization to &1 and try again.
SQLCODE or SQLCODEs: -30053
SQLSTATE or SQLSTATEs: 42506
SQ30060
Message Text: User is not authorized to relational database &1.
Cause Text: If relational database &1 is DB2 for IBM i, a user exit program denied access to the user, or a failure in the user exit program occurred.
Recovery Text: Obtain authorization to relational database &1 and try the request again.
SQLCODE or SQLCODEs: -30060
SQLSTATE or SQLSTATEs: 08004
SQ30061
Message Text: Relational database &1 not found.
Cause Text: Relational database &1 was either not in the relational database directory or defined at the remote location.
Recovery Text: Do one of the following:
  • Use the Add Relational Database Directory Entry (ADDRDBDIRE) command to add the relational database name to the relational database directory.
  • Change the relational database name to match the relational database directory entry.
  • Verify the relational database name is defined on the remote location.
SQLCODE or SQLCODEs: -30061
SQLSTATE or SQLSTATEs: 08004
SQ30070
Message Text: Distributed Data Management (DDM) command &1 not supported.
Cause Text: The remote system does not support the DDM command &1.

If the DDM command is '2012'X, the remote system does not support the SQL DESCRIBE TABLE statement. If the DDM command is not '2012'X, to determine which command is not supported, see the DDM Architecture Reference. For a list of DDM commands, refer to the Architecture Books section of the Bibliography in the Distributed database programming topic collection in the Database category in the IBM i Information Center, http://www.ibm.com/systems/i/infocenter/.

Recovery Text: Remove the SQL statement from the program and precompile the program.
SQLCODE or SQLCODEs: -30070
SQLSTATE or SQLSTATEs: 58014
SQ30071
Message Text: Distributed Data Management (DDM) object &1 not supported.
Cause Text: DDM object &1 was not supported.
Recovery Text: See previous messages for more information. See the DDM Architecture Reference for additional information about code point &1.
SQLCODE or SQLCODEs: -30071
SQLSTATE or SQLSTATEs: 58015
SQ30072
Message Text: Distributed Data Management (DDM) parameter &1 not supported.
Cause Text: DDM parameter &1 is not supported. The location code is &2 with an error code of &3.

The location codes are:

  • '01'X -- The error was detected at the application requester.
  • '02'X -- The error was detected at the application server.
Recovery Text: See previous messages for more information. See the DDM Architecture Reference for additional information about DDM parameter &1.
SQLCODE or SQLCODEs: -30072
SQLSTATE or SQLSTATEs: 58016
SQ30073
Message Text: Distributed Data Management (DDM) parameter value &1 not supported.
Cause Text: DDM parameter value &1 is not supported. The location code is &2 with an error code of &3.

The location code are:

  • '01'X -- The error was detected at the application requester.
  • '02'X -- The error was detected at the application server.

A possible list of DDM parameter values is:

  • '0035'X -- The SBCS CCSID is not supported.
  • '119C'X -- The SBCS CCSID is not supported.
  • '2112'X -- The schema name or package name is longer than the maximum supported by the application server.
  • '2120'X -- The string delimiter is not supported.
  • '2121'X -- The decimal delimiter is not supported.
  • '2128'X -- The schema name is longer than the maximum supported by the application server.
  • '2131'X -- The userid is longer than the maximum supported by the application server.

If &1 is not in the list above, refer to the DDM Architecture Reference for a description of the parameter value that was not supported.

Recovery Text: See previous messages for more information. Change your job or SQL program to send a value that is supported by the application server and try again.
SQLCODE or SQLCODEs: -30073
SQLSTATE or SQLSTATEs: 58017
SQ30074
Message Text: Distributed Data Management (DDM) reply message &1 not supported.
Cause Text: DDM reply message &1 was not supported.
Recovery Text: See previous messages for more information. See the DDM Architecture Reference for additional information about code point &1.
SQLCODE or SQLCODEs: -30074
SQLSTATE or SQLSTATEs: 58018
SQ30080
Message Text: Communication error occurred during distributed database processing.
Cause Text: A communication error occurred. Possible reasons include:
  • The remote system is not available.
  • The communications network is not available.
  • The userid used to start the connection may not exist on the remote system.
  • The remote system may require the password to be encrypted.
  • The password may not be valid for the userid. The characters and case of the password specified must match exactly the password on the remote system.
  • A server authorization entry for the remote system, if used, may be incorrect. Server names must be in upper case. The QRETSVRSEC system value must be set to '1' to retain passwords.

If message CPE3425 (connection refused) precedes this message, the cause may be:

  • The DDM/DRDA TCP/IP server is not started on the remote system.
  • An incorrect port was specified for the remote system.
  • The remote system is restricting DRDA ports.
  • The SOCKS server, if used, is not configured properly.

The APPC major return code is &1 and the minor return code is &2. For TCP/IP, both return codes will be 00. If the return codes are not both 00, their meaning can be found in the APPC Programming topic in the Information Center, http://www.ibm.com/systems/i/infocenter/.

Recovery Text: See previous messages for more information. Check the status of the remote system and the communications network for possible problems. If the application server is DB2 for IBM i, check the QSYSOPR message queue for error messages.
SQLCODE or SQLCODEs: -30080
SQLSTATE or SQLSTATEs: 08001
SQ30081
Message Text: Communication error has been detected during distributed database processing.
Cause Text: A communication error has been detected. Possible reasons include:
  • The local system timed out waiting for the connection to be started.
Recovery Text: See previous messages for more information. Check the status of the remote system and the communications network for possible problems. If the application server is DB2 for IBM i, check QSYSOPR message queue for error messages.
SQLCODE or SQLCODEs: -30081
SQLSTATE or SQLSTATEs: 08001
SQ30082
Message Text: Authorization failure on distributed database connection attempt.
Cause Text: A connection attempt failed with reason code &2. The reason codes and their meanings are as follows:
  • 0 -- Unknown cause.
  • 1 -- Password expired.
  • 2 -- Password not valid.
  • 3 -- Password missing.
  • 4 -- Protocol violation.
  • 5 -- User ID not found.
  • 6 -- User ID not valid. For a DB2 for IBM i server, this could mean a damaged user profile or PASSWORD(*NONE).
  • 7 -- User ID revoked or disabled.
  • 15 -- Security processing at the server failed.
  • 16 -- The new password is not valid.
  • 17 -- The security mechanism requested by the client is not supported or allowed at the server. See recovery information below.
  • 22 -- Security processing at the client failed.
  • 23 -- CCSID conversion of the password failed.
Recovery Text: Correct the problem indicated by the reason code, if possible, and attempt to connect again. A common cause for reason code 17 is that the server requires a password, but because the client does not have a password to send, sends only a user ID. Or, the server requires an encrypted password and the client did not send an encrypted password. A password can be supplied by the user in two ways:
  • 1 -- By using the USER ... USING ... clause on the SQL CONNECT statement, or
  • 2 -- By using the ADDSVRAUTE CL command to add a server authorization entry for the remote server under the user's profile. The server name (DRDA RDB NAME) must be entered in upper case. &N The DRDA server can be configured with the CHGDDMTCPA CL command to not require a password, or to not require an encrypted password.
SQLCODE or SQLCODEs: -30082
SQLSTATE or SQLSTATEs: 08001
SQ30089
Message Text: Communication error occurred during DB2 Multisystem processing.
Cause Text: A communication error occurred. A possible list of reasons may include:
  • The remote system is not available.
  • The communications network is not available.
  • The userid used to start the connection may not exist on the remote system.
Recovery Text: See previous messages for more information. Check the status of the remote system and the communications network for possible problems. Check QSYSOPR message queue for error messages.
SQLCODE or SQLCODEs: -30089
SQLSTATE or SQLSTATEs: 08001
SQ30090
Message Text: Change request not valid for read-only application server.
Cause Text: Application requester requested a read-only application server. The running of a statement which is not valid for a read-only application server was attempted.

This message can occur when initially attempting to connect to a system other than DB2 for IBM i using interactive SQL with the COMMIT option set to *NONE.

Recovery Text: Remove the change request from the program and try again. If the problem is due to the use of COMMIT(*NONE) to a system that is not DB2 for IBM i, change to a different commitment control level and try again.
SQLCODE or SQLCODEs: -30090
SQLSTATE or SQLSTATEs: 25000, 2D528, 2D529
SQ30104
Message Text: Bind or precompile option &1 with value &2 not valid.
Cause Text: Supported values on the DB2 for IBM i application server are:

PATH -- schema-names

AS400NAMING -- SQL (Default) or SYSTEM

OS400NAMING -- SQL (Default) or SYSTEM

SORTSEQ -- HEX (Default) or JOBRUN

MAXSCALE -- between 0 and 31

MINDIVSCALE -- between 0 and 9, MINDIVSCALE must not exceed MAXSCALE

ROUNDING -- HALFEVEN (Default), CEILING, DOWN, FLOOR, HALFDOWN, HALFUP, or UP

EXTENDEDINDICATOR -- NO (Default) or YES

DATEOVERIDE -- ISO (Default), USA, EUR, JIS

CONCURRENTACCESSRESOLUTION -- NO (Default) or YES

SYSTEMTIMESENSITIVE -- NO (Default) or YES

Recovery Text: Correct the generic bind option value and try the request again.
SQLCODE or SQLCODEs: -30104
SQLSTATE or SQLSTATEs: 56095
SQ30106
Message Text: The input data for a multiple row insert is not valid.
Cause Text: A data error has been detected on the client when processing a row for a multi-row input operation. A null indicator value of -2 (X'FE') was received from the client which indicates that the server should return an error SQLCA containing SQLSTATE 22527 over a null row. For an atomic multi-row input operation, such an error terminates processing of the multi-row input request, and any changes that have resulted from this request will be undone. For a non-atomic multi-row operation, such an error terminates processing of the multi-row input request, but any changes for this request are not undone.
Recovery Text: Determine which part of the multi-row input operation is in error and retry the request.
SQLCODE or SQLCODEs: -30106
SQLSTATE or SQLSTATEs: 22527
SQ30107
Message Text: A request to release record read locks on close of cursor was ignored.
Cause Text: DB2 for IBM i does not support this feature. To avoid this warning do the following.
  • For embedded SQL remove the WITH RELEASE clause from the CLOSE.
  • For CLI remove the option to define cursors with release.
Recovery Text:
SQLCODE or SQLCODEs: +30107
SQLSTATE or SQLSTATEs: 01662
SQL0007
Message Text: Character &1 (HEX &2) not valid in SQL statement.
Cause Text: The character &1 specified in the SQL statement is not permitted. The hexadecimal representation for the character is &2. The character is ignored by the precompiler and processing of the statement continues.
Recovery Text: Correct the character. The character may need to be enclosed either in quotation marks or apostrophes. Precompile the program again.
SQLCODE or SQLCODEs: -007
SQLSTATE or SQLSTATEs: 42601
SQL0010
Message Text: String constant beginning &1 not delimited.
Cause Text: The string delimiter is missing in the constant beginning with &1. The string is treated as if it were delimited by the end of the source file.
Recovery Text: Delimit the string constant. Check for any missing or extra quotation marks and apostrophes. These errors are likely to cause other errors. Some statements may not have been processed as the result of either missing or extra string delimiters. Precompile the program again.
SQLCODE or SQLCODEs: -010
SQLSTATE or SQLSTATEs: 42603
SQL0011
Message Text: Comment not closed.
Cause Text: A comment is not closed correctly with a comment delimiter. The comment is treated as if it were closed by the end of source file.
Recovery Text: Make certain that the comment delimiter is specified properly and that it is between the specified margins. This error is likely to cause other errors. Some statements may not have been processed as a result of a missing comment delimiter. Precompile the program again.
SQLCODE or SQLCODEs: -011
SQLSTATE or SQLSTATEs: 42601
SQL0012
Message Text: Correlation without qualification occurred for column &1 to table &2.
Cause Text: Column &1 which occurs in a subselect, is not explicitly qualified, and occurs in table &2 in library &3 specified in the FROM clause of an outer subselect or as the target of an update or delete operation. Consequently, the reference to the column in the subselect is an outer reference, and correlation will occur.
Recovery Text: Ensure you intended to use the correlation. If you did not intend to use the correlation, the column does not exist in any of the tables or views identified in the FROM clause of the same level of the subselect that column &1 was referenced. Since it is a good practice to explicitly qualify any intended correlated references, it is recommended that the statement be changed so that the column &1 is qualified with a table designator.
SQLCODE or SQLCODEs: +012
SQLSTATE or SQLSTATEs: 01545
SQL0029
Message Text: INTO clause missing from embedded statement.
Cause Text: SELECT and VALUES INTO statements embedded in a program must have an INTO clause to specify where the results of the statement are to be placed.
Recovery Text: Add the INTO clause to the statement and try the request again.
SQLCODE or SQLCODEs: -029
SQLSTATE or SQLSTATEs: 42601
SQL0030
Message Text: Number of host variables less than result values.
Cause Text: The number of host variables specified in the INTO clause is less than the number of result values. If the program is run, only the variables specified will have values assigned to them.
Recovery Text: If all values should be received, specify the proper number of host variables. Precompile the program again.
SQLCODE or SQLCODEs: +030
SQLSTATE or SQLSTATEs: 01503
SQL0051
Message Text: Cursor or procedure &1 previously declared.
Cause Text: One of the following has occurred:
  • Cursor &1 has already been specified in a previous DECLARE CURSOR statement. A cursor name must be unique within the program.
  • Procedure &1 specified on a CALL statement is ambiguous.
Recovery Text: Make certain that the cursor names on all DECLARE CURSOR statements and the procedure names on all DECLARE PROCEDURE statements are unique in the program. Precompile the program again.
SQLCODE or SQLCODEs: -051
SQLSTATE or SQLSTATEs: 3C000
SQL0057
Message Text: RETURN statement in an SQL function must return a value.
Cause Text: A RETURN statement is specified in an SQL function without a return value. The return value must be specified.
Recovery Text: Add a value to return. Try the request again.
SQLCODE or SQLCODEs: -057
SQLSTATE or SQLSTATEs: 42631
SQL0058
Message Text: Value specified on RETURN statement must be an integer.
Cause Text: A RETURN statement is specified in an SQL procedure but the value specified is not integer. The return value for an SQL procedure must be integer.
Recovery Text: Specify an integer value on the RETURN statement. Try the request again.
SQLCODE or SQLCODEs: -058
SQLSTATE or SQLSTATEs: 428F2
SQL0060
Message Text: Value &3 for argument &1 of &2 function not valid.
Cause Text: The length or scale specified as &3 for argument &1 of the &2 function is not valid. The length specified for numeric values must be an unsigned integer from 1 through 63. The scale specified for numeric values must be an unsigned integer between 0 and the specified length.
Recovery Text: Correct the length or scale specified for the function. Try the request again.
SQLCODE or SQLCODEs: -060
SQLSTATE or SQLSTATEs: 42815
SQL0074
Message Text: Descriptor COUNT &1 is not valid.
Cause Text: The value of COUNT for a descriptor is not between 0 and the maximum number of items assigned when the descriptor was allocated. Error types and their meanings are:
  • 1 -- Top level count is incorrect
  • 2 -- SQDS_ITEMS is incorrect
  • 3 -- Level of array-related descriptor items is incorrect
Recovery Text: Specify a different COUNT value using the SET DESCRIPTOR statement.
SQLCODE or SQLCODEs: -074
SQLSTATE or SQLSTATEs: 07008
SQL0075
Message Text: Descriptor item number &1 is not correct.
Cause Text: Descriptor item number &1 is not correct for one of the following reasons.
  • The value given for the maximum number of items on an ALLOCATE DESCRIPTOR statement is not between 1 and 8000.
  • The item number given on a GET DESCRIPTOR or SET DESCRIPTOR statement is not between 1 and the maximum number of items assigned when the descriptor was allocated.
Recovery Text: For the ALLOCATE DESCRIPTOR statement, ensure the maximum items specified is between 1 and 8000. For GET DESCRIPTOR and SET DESCRIPTOR statements, ensure the item number specified in VALUE is between 1 and the maximum number of items for the specified descriptor. Try the request again.
SQLCODE or SQLCODEs: -075
SQLSTATE or SQLSTATEs: 07009
SQL0076
Message Text: DATA or INDICATOR item not correct.
Cause Text: The DATA or INDICATOR item is not correct for one of the following reasons:
  • The GET DESCRIPTOR statement requested the DATA or INDICATOR item, but the DATA or INDICATOR item has no value.
  • The GET DESCRIPTOR or SET DESCRIPTOR statements specified a host variable for the DATA item that is not valid. The host variable must match the DATA item in type, length, precision, scale, and CCSID.
Recovery Text: If DATA or INDICATOR does not have a known value, perform an operation such as FETCH or use SET DESCRIPTOR to establish a DATA or INDICATOR value prior to the GET DESCRIPTOR. If the host variable on the GET DESCRIPTOR or SET DESCRIPTOR statement does not match the attributes of the DATA item, change the attributes of the host variable. Try the request again.
SQLCODE or SQLCODEs: -076
SQLSTATE or SQLSTATEs: 22005
SQL0077
Message Text: Descriptor name &1 not correct.
Cause Text: Descriptor name &1 is not correct for one of the following reasons.
  • The descriptor name is longer than 128 characters.
  • The descriptor name has not been allocated with an ALLOCATE DESCRIPTOR statement.
  • A descriptor with this name already exists for the connection and scope.
Recovery Text: Make sure the name is not too long. Use the ALLOCATE DESCRIPTOR statement to define the descriptor before referring to it in another statement. If there is already a descriptor with the same name for the connection and scope, change the name in the ALLOCATE DESCRIPTOR statement. Try the request again.
SQLCODE or SQLCODEs: -077
SQLSTATE or SQLSTATEs: 33000
SQL0078
Message Text: Parameter name required for routine &1 in &2.
Cause Text: Parameter name must be specified when creating SQL routines.
Recovery Text: Specify a parameter name. Try the request again.
SQLCODE or SQLCODEs: -078
SQLSTATE or SQLSTATEs: 42629
SQL0079
Message Text: Schema &2 for object &1 not valid.
Cause Text: Object &1 cannot be qualified with schema &2. A table in the DECLARE GLOBAL TEMPORARY TABLE statement must be qualified with SESSION. A reference to a temporary table must be qualified with SESSION or QTEMP. Indexes and views over a temporary table must be created in the schema SESSION or QTEMP.
Recovery Text: Specify SESSION as the schema name. Try the request again.
SQLCODE or SQLCODEs: -079
SQLSTATE or SQLSTATEs: 428EK
SQL0080
Message Text: Indicator variable &1 not SMALLINT type.
Cause Text: The definition of indicator variable &1 must be a 2-byte binary with a zero scale.
Recovery Text: Specify an indicator variable that is defined as a 2-byte binary with a zero scale. Try the request again.
SQLCODE or SQLCODEs: -080
SQLSTATE or SQLSTATEs: 42978
SQL0084
Message Text: SQL statement not allowed.
Cause Text: The SQL statement is not allowed for one of the following reasons:
  • DECLARE CURSOR, DECLARE STATEMENT, FETCH, OPEN, CLOSE, WHENEVER, PREPARE, EXECUTE, EXECUTE IMMEDIATE, INCLUDE, SELECT INTO, VALUES INTO, DECLARE VARIABLE, DECLARE PROCEDURE, DESCRIBE, GET DIAGNOSTICS, SIGNAL, RESIGNAL, ALLOCATE CURSOR, ASSOCIATE LOCATOR, ALLOCATE DESCRIPTOR, DEALLOCATE DESCRIPTOR, GET DESCRIPTOR, and SET DESCRIPTOR are not allowed in interactive SQL, dynamic SQL, or when using the RUNSQLSTM or RUNSQL commands.
  • BEGIN DECLARE SECTION and END DECLARE SECTION are not allowed in interactive SQL, in dynamic SQL, in RPG, or in REXX.
  • A blocked INSERT statement is not allowed in interactive SQL or dynamic SQL.
  • The CONNECT, SET CONNECTION, RELEASE, and DISCONNECT statements are not allowed in dynamic SQL or REXX. CONNECT with constants specified for user ID and password is not allowed in a precompiled program.
  • SET ENCRYPTION PASSWORD with constants specified for user ID or hint is not allowed in a precompiled program.
  • SELECT and VALUES cannot be issued from an EXECUTE IMMEDIATE statement or the RUNSQLSTM or RUNSQL commands.
  • The SET OPTION statement is only allowed in REXX, in a precompiled program, or in SQL routines. In a precompiled program, it must be the first SQL statement in the program.
  • ALLOCATE CURSOR, ASSOCIATE LOCATORS, DECLARE STATEMENT, DECLARE VARIABLE, DECLARE PROCEDURE, GET DIAGNOSTICS, INCLUDE, SELECT INTO, SET CURRENT DEGREE, SET RESULT SETS, SIGNAL, WHENEVER, blocked INSERT, blocked FETCH, locator statements, and SQL descriptor statements are not allowed in REXX.
  • The SET TRANSACTION statement is not allowed when the current connection is to a remote database.
  • The SET SESSION AUTHORIZATION statement can only be run in the default activation group. It is not allowed in REXX, or when using the RUNSQLSTM or RUNSQL commands.
  • The WRAPPED keyword for functions, procedures, and triggers is not allowed in a precompiled program.
  • The SQL statement specified is not a valid statement on the current release of DB2 for IBM i. The statement may be valid on a future release of DB2 for IBM i or on some other system's implementation of SQL.
Recovery Text: The statement cannot be run in this mode. For a CONNECT or SET ENCRYPTION PASSWORD statement in a precompiled program, specify host variables instead of constants. If in interactive SQL, you may syntax check a statement by setting the statement processing value to *SYN.
SQLCODE or SQLCODEs: +084, -084
SQLSTATE or SQLSTATEs: 01505, 42612
SQL0087
Message Text: Variable cannot be NULL.
Cause Text: A global variable, SQL variable, or parameter was specified in an SQL statement where NULL is not allowed.
Recovery Text: Assign a value to the global variable, SQL variable, or parameter. Try the request again.
SQLCODE or SQLCODEs: -087
SQLSTATE or SQLSTATEs: 22004
SQL0088
Message Text: &1 applies to entire table.
Cause Text: The UPDATE or DELETE statement does not have a WHERE clause and will delete or update all the rows in the specified table.
Recovery Text: Do one of the following:
  • Verify that all the rows in the specified table need to be deleted or updated and try the statement again.
  • If the rows in the specified table do not need to be deleted or updated, add a WHERE clause and precompile the program again.
SQLCODE or SQLCODEs: +088
SQLSTATE or SQLSTATEs: 01504
SQL0090
Message Text: Host variable not permitted here.
Cause Text: Host variable &1 is not allowed as used in this statement. Host variables are not allowed:
  • In a CREATE VIEW, CREATE TABLE, CREATE INDEX, CREATE MASK, CREATE PERMISSION, or ALTER TABLE statement.
  • In a default value clause for a parameter in a CREATE PROCEDURE or CREATE FUNCTION statement.
  • In any interactive SQL statement when the statement processing value is *RUN or *VLD.
  • In an SQL statement processed by the RUNSQLSTM or RUNSQL commands.
  • In an INSERT, UPDATE, DELETE, CALL, or DECLARE CURSOR statement in REXX.
Recovery Text: Do one of the following and try the request again.
  • Specify either a constant or a column name to replace the host variable. The colon indicates that the name that follows is a host variable. Remove the colon to specify a column name.
  • If in interactive SQL, set the statement processing value to *SYN to syntax check a statement that contains a host variable.
  • If in REXX, change the host variables to parameter markers and prepare the INSERT, UPDATE, DELETE, CALL, or DECLARE CURSOR statement.
SQLCODE or SQLCODEs: -090
SQLSTATE or SQLSTATEs: 42618
SQL0097
Message Text: Use of data type not valid.
Cause Text: A data type specified in the statement is not allowed where it is used.
  • LONG VARCHAR, LONG VARGRAPHIC, and LONG VARBINARY can only be specified for column definitions in the CREATE TABLE statement.
  • In the XMLTABLE function, BINARY, VARBINARY, BLOB, ROWID, DATALINK, and user defined types are not allowed as input arguments or as result column types.
Recovery Text: Change the data type to one that is allowed in this context. Try the request again.
SQLCODE or SQLCODEs: -097
SQLSTATE or SQLSTATEs: 42601
SQL0100
Message Text: Row not found for &1.
Cause Text: One of the following conditions has occurred:
  • If this is a FETCH statement, no more rows satisfy the selection values (end of file). The name of the cursor is &1 and the result set identifier is &2. If the result set identifier is non-zero, the result table for this cursor was being accessed as a stored procedure result set.
  • If this is a FETCH statement for a scrollable cursor, a record was not found. If NEXT was specified, end of file was reached. If PRIOR was specified, the beginning of the file was reached. If RELATIVE was specified, either the beginning of file or the end of file was reached, depending on the value specified. If FIRST or LAST was specified, then no records satisfy the selection criteria. The name of the cursor is &1.
  • If this is an embedded SELECT statement, no rows satisfy the selection values.
  • If this is an UPDATE, INSERT, DELETE, or MERGE statement, no rows satisfy the subselect, WHERE clause, or MERGE criteria. No rows were updated, inserted, or deleted.
  • If SKIP LOCKED DATA is specified, no available rows qualified for return.
Recovery Text: No recovery is necessary.
SQLCODE or SQLCODEs: +100
SQLSTATE or SQLSTATEs: 02000
SQL0101
Message Text: SQL statement too long or complex.
Cause Text: The SQL statement is longer than the limit allowed for length or complexity. The reason code is &1. One of the following reason codes indicates the error:
  • 1 - The total number of subselects combined using UNION, EXCEPT, and INTERSECT is greater than 256.
  • 2 - The total number of columns, constants, and operators is greater than the SQL limits.
  • 3 - The sum of the lengths of the non-LOB and XML columns in a select list, table, view definition, or user defined table function is greater than 32766 or the definition contains LOB or XML columns and the sum of the lengths specified on the ALLOCATE clause for varying-length fields and the non-varying field lengths is greater than 32740. The maximum length is reduced if any of the columns are varying-length or allow null values.
  • 4 - The total number of subselects referenced in an outer subselect is greater than 256.
  • 5 - The total length of the statement text is greater than 2097152, or the total length of the prepare attribute string text is greater than 65535.
  • 6 - The relative position value specified on the FETCH statement is outside the range of valid values.
  • 7 - A system name could not be generated.
Recovery Text: Simplify the statement or divide the statement up into more than one statement and try the request again. For reason code 7, specify a different name for the table, view, index, or alias.
SQLCODE or SQLCODEs: -101
SQLSTATE or SQLSTATEs: 54001, 54010, 54011
SQL0102
Message Text: String constant beginning with &1 too long.
Cause Text: The string constant beginning with &1 is larger than 32740 bytes. If this is a graphic string constant, the string cannot be longer than 16370 DBCS characters.
Recovery Text: Reduce the length of the string. Try the request again.
SQLCODE or SQLCODEs: -102
SQLSTATE or SQLSTATEs: 54002
SQL0103
Message Text: Numeric constant &1 not valid.
Cause Text: The token &1 begins with a digit, but the token is not a valid integer, decimal, or floating point constant. Identifiers cannot begin with a digit except in a COBOL program.
Recovery Text: Do one of the following:
  • Verify that token &1 is valid. Use apostrophes or quotation marks if a character constant is required.
  • Remove the character or characters that are not valid if a number is required.
SQLCODE or SQLCODEs: -103
SQLSTATE or SQLSTATEs: 42604
SQL0104
Message Text: Token &1 was not valid. Valid tokens: &2.
Cause Text: A syntax error was detected at token &1. Token &1 is not a valid token. A partial list of valid tokens is &2. This list assumes that the statement is correct up to the token. The error may be earlier in the statement, but the syntax of the statement appears to be valid up to this point.
Recovery Text: Do one or more of the following and try the request again:
  • Verify the SQL statement in the area of the token &1. Correct the statement. The error could be a missing comma or quotation mark, it could be a misspelled word, or it could be related to the order of clauses.
  • If the error token is <END-OF-STATEMENT>, correct the SQL statement because it does not end with a valid clause.
SQLCODE or SQLCODEs: -104
SQLSTATE or SQLSTATEs: 42601
SQL0105
Message Text: Mixed, graphic, or UTF-8 string constant not valid.
Cause Text: Mixed, graphic, UTF-8 constants that are not valid were found in the value beginning &1. One of the following occurred:
  • An odd number of bytes were found between the shift-out and shift-in characters.
  • Multiple shift-out characters were found before a shift-in character was found.
  • A shift-out and shift-in were not found in the first and last byte, respectively, or were found in a position other than the first and last byte of a graphic string constant.
  • The PL/I form of the graphic string was used but the program is not PL/I.
  • A shift-out was found indicating a PL/I graphic string. The shift-out was not followed by a DBCS apostrophe, an even number of DBCS characters, another DBCS apostrophe, a DBCS G, and a shift-in.

If this is a LABEL ON statement for a column, and the string is longer than 20 bytes, then one of the 20-byte segments has a DBCS constant that is not valid.

Recovery Text: Specify the correct format for the constant. If this is a LABEL ON statement for a column, ensure each 20-byte segment is in the correct format. Check for a quotation mark, an apostrophe, shift-out or shift-in character, or an odd number of characters between the shift-out and shift-in characters. Ensure graphic string constants are specified in the correct form for the language. Try the request again.
SQLCODE or SQLCODEs: -105
SQLSTATE or SQLSTATEs: 42604
SQL0106
Message Text: Precision specified for FLOAT or DECFLOAT not valid.
Cause Text: The precision specified for FLOAT or DECFLOAT is not valid.
  • DECFLOAT precision must be either 16 or 34.
  • FLOAT precision must be in the range 1-53. If 1-23 is specified, the data type is single-precision floating point. If 24-53 is specified, the data type is double-precision floating point.
Recovery Text: Change the precision specified. Try the request again.
SQLCODE or SQLCODEs: -106
SQLSTATE or SQLSTATEs: 42611
SQL0107
Message Text: &1 too long. Maximum &2 characters.
Cause Text: The name or string beginning with &1 is too long. The maximum length allowed is &2. The maximum length for names depends on the type of the name:
  • System names cannot exceed 10 characters.
  • SQL names cannot exceed 128 characters.
  • Relational database names cannot exceed 18 characters.
  • Procedure or function names cannot exceed 128 characters. If the external program name is not specified, the name cannot exceed 10 characters because it is used for the program name.
  • Host variable names in C and C++ cannot exceed 128 characters. Host variable names in all other languages cannot exceed 64 characters.

The maximum length of the string for a password is 128.

The maximum length of the string for a COMMENT ON statement is 2000. The string for COMMENT ON SEQUENCE cannot exceed 500 characters.

The maximum length of the string for a LABEL ON statement is 50. If the label is specified as a column heading, the maximum is 60.

The maximum length of the string for a package version is 64.

Recovery Text: Change the name or string to a length of &2 or less. Try the request again.
SQLCODE or SQLCODEs: -107
SQLSTATE or SQLSTATEs: 42622
SQL0109
Message Text: &1 clause not allowed.
Cause Text: One of the following conditions was not allowed:
  • SELECT INTO and VALUES INTO statements cannot include the FOR UPDATE clause, the FOR READ ONLY clause, the OPTIMIZE clause, or the UNION, EXCEPT or INTERSECT operator.
  • A SELECT or VALUES statement used in cursor declarations or subselects cannot have an INTO clause.
  • CREATE VIEW statements may not have an INTO, ORDER BY, FOR UPDATE, FOR READ ONLY, or OPTIMIZE clause.
  • INSERT statements may not have an INTO clause in a subselect, a FOR UPDATE, FOR READ ONLY, or an OPTIMIZE clause.
  • WHERE CURRENT OF cursor clause is not allowed in statements processed in interactive SQL or statements processed by the RUNSQLSTM command.
  • The NOT NULL clause is not allowed in the definition of a column being added to a table unless a default value is specified.
  • OVERRIDING USER VALUE and OVERRIDING SYSTEM VALUE are only valid if the statement is changing a column that is defined with GENERATED ALWAYS.
  • The INSERTING, UPDATING, and DELETING trigger event predicates are only allowed in a trigger.
  • ON REPLACE cannot be specified unless OR REPLACE is specified.
  • The RAISE_ERROR function cannot be specified alone in the select list or in a CASE expression.
Recovery Text: Remove the clause. Try the request again.
SQLCODE or SQLCODEs: -109
SQLSTATE or SQLSTATEs: 42601
SQL0110
Message Text: Hexadecimal constant beginning with &1 not valid.
Cause Text: Either the hexadecimal constant &1 contains one or more characters that are not valid or the number of characters between the string delimiters is not valid. All embedded blank (X'40') characters are removed from the string before verification is done. Hexadecimal constants must contain an even number of characters. The length of a hexadecimal graphic string must be a multiple of 4 to ensure that it contains a valid number of DBCS characters. Hexadecimal constants representing MIXED data must have an even number of bytes between the shift-out (X'0E') and shift-in (X'0F') characters and must have paired shift characters. Hexadecimal graphic constants cannot contain a shift-out or a shift-in.
Recovery Text: Correct the constant. Ensure that the constant contains an even number of digits and that the length for a hexadecimal graphic constant is a multiple of 4. The valid characters for hexadecimal digits are characters 0 through 9 and uppercase or lowercase A through F. Ensure MIXED data is in the correct format. Remove shift-out or shift-in characters from a hexadecimal graphic constant. Try the request again.
SQLCODE or SQLCODEs: -110
SQLSTATE or SQLSTATEs: 42606
SQL0112
Message Text: Argument of function &1 contains another function.
Cause Text: The argument of aggregate function or OLAP specification &1 contains an aggregate function or OLAP specification. Only expressions without aggregate functions or OLAP specifications are allowed as arguments of these functions.
Recovery Text: Correct the function invocation. Try the request again.
SQLCODE or SQLCODEs: -112
SQLSTATE or SQLSTATEs: 42607
SQL0113
Message Text: Name &1 not allowed.
Cause Text: &1 contains a character that is not allowed or does not contain any characters.

An ordinary identifier must begin with (A-Z, $, #, or @) and be followed by zero or more (A-Z, 0-9, $, #, @, or _).

A delimited identifier is a string of characters within SQL escape characters. The characters allowed in delimited names depends on the type of name.

  • The characters between the escape characters for system table names, schema names, package names and other system object names can be any characters except Hex 00-3F, Hex 40 (space), Hex 5C (*), Hex 6F (?), Hex 7D ('), Hex 7F ("), and Hex FF.
  • The characters between the escape characters for SQL names can be any characters except Hex 00-3F and Hex FF.
  • Delimited system column names must begin with (A-Z, $, #, or @) and be followed by zero or more (A-Z, 0-9, $, #, @, or an _).

A relational database name must begin with A-Z and be followed by 0 or more letters, numbers 0-9, or an _.

Ordinary identifiers that are contained within host variables must not include lowercase letters because they are not converted to uppercase.

Recovery Text: Correct the name. Try the request again.
SQLCODE or SQLCODEs: -113
SQLSTATE or SQLSTATEs: 28000, 2E000, 42602
SQL0114
Message Text: Relational database &1 not the same as current relational database &2.
Cause Text: Relational database &1 was specified in a 3 part name in the statement. However, the name is not the same as the current relational database.
Recovery Text: Change the statement so the relational database name specified is the same as the current relational database name.
SQLCODE or SQLCODEs: +114, -114
SQLSTATE or SQLSTATEs: 01536, 42961
SQL0115
Message Text: Comparison operator &1 not valid.
Cause Text: Simple comparison operators other than equal and not equal cannot be used with a list of items. ANY, ALL, and SOME comparison operators must be followed by a fullselect, rather than an expression or a list of items. Subqueries cannot be specified in a JOIN condition or in a CASE expression.
Recovery Text: Change either the comparison or the operand. Try the request again.
SQLCODE or SQLCODEs: -115
SQLSTATE or SQLSTATEs: 42601
SQL0117
Message Text: Statement contains wrong number of values.
Cause Text: One of the following conditions may exist:
  • For an INSERT or UPDATE statement, the number of values is not the same as the number of columns.
  • For an UPDATE statement, the number of entries in the select list of a row fullselect does not match the number of columns listed in the SET clause.
  • For an INSERT with subselect, the number of entries in the select list is not the same as the number of columns for the INSERT.
  • For an INSERT statement, one or more of the columns omitted from the column list was created as NOT NULL.
  • For an INSERT statement, one or more of the columns specified for the INSERT was created as NOT NULL, and the statement specified DEFAULT as the value to be inserted.
  • For SET or VALUES INTO, the number of values is not the same as the number of target host variables.
Recovery Text: Correct the statement to specify one value for each column. Ensure that the character designated as the decimal point is used correctly in any numeric literals. If any columns not specified in the INSERT column list were created as NOT NULL, specify values for those columns. If a data change INSERT statement contains an INCLUDE clause, ensure values are specified for all INCLUDE columns. Try the request again.
SQLCODE or SQLCODEs: -117
SQLSTATE or SQLSTATEs: 42802
SQL0118
Message Text: Table &1 in &2 also specified in a FROM clause.
Cause Text: Table &1 in &2 was specified as the object table of this INSERT, UPDATE, or DELETE statement and in a FROM clause of the subselect or the FROM clause of a subquery. The table that is the object of the operation cannot also be specified in a subselect. This also applies to any base tables or views referred to in the statement. Overrides which specify a TOFILE parameter of the same name as the object of the operation may have caused this error.
Recovery Text: Remove the override or change the statement so the table that is the object of the operation is not also specified in a subselect, then try the request again.
SQLCODE or SQLCODEs: -118
SQLSTATE or SQLSTATEs: 42902
SQL0119
Message Text: Column &1 or expression in HAVING clause not valid.
Cause Text: One of the following has occurred:
  • Column &1 specified in a HAVING clause is not within an aggregate function and is not in the GROUP BY clause.
  • An expression specified in a HAVING clause is not within an aggregate function and is not in the GROUP BY clause.
Recovery Text: Remove the column or expression from the HAVING clause or add the column or expression to the GROUP BY clause. Try the request again.
SQLCODE or SQLCODEs: -119
SQLSTATE or SQLSTATEs: 42803
SQL0120
Message Text: Use of function &1 not valid.
Cause Text: Function &1 cannot be used where it was specified:
  • An aggregate function or user-defined function sourced on an aggregate function cannot be specified in a SET clause, in a GROUP BY clause, in a START WITH clause, in a CONNECT BY clause, in a JOIN condition, as the return expression for a RETURN statement, as an argument of a table function, or as an expression in a SET statement, a VALUES INTO statement, or a MERGE statement. An aggregate function or user-defined function sourced on an aggregate function is allowed in a WHERE clause only if the WHERE clause appears within a subquery of a HAVING clause.
  • The ARRAY_AGG function can only be specified in the select list of a SELECT INTO statement or in a scalar subquery on the right side of a SET statement. DISTINCT cannot be specified with ARRAY_AGG.
  • An OLAP specification cannot be used in a WHERE clause, in a VALUES clause, in a GROUP BY clause, in a HAVING clause, in a START WITH clause, in a CONNECT BY clause, or in a JOIN condition. An OLAP specification cannot be used as an expression in a SET statement, VALUES INTO statement, CALL statement, or MERGE statement, in the SET clause of an UPDATE statement, in a key definition of a CREATE INDEX statement, in an XMLTABLE function, or as the return expression for a RETURN statement.
Recovery Text: Remove the function. Try the request again.
SQLCODE or SQLCODEs: -120
SQLSTATE or SQLSTATEs: 42903
SQL0121
Message Text: Duplicate name &1 not allowed.
Cause Text: Name &1 is specified more than once in the column list of an INSERT statement, in the SET clause of an UPDATE statement, in an INSERT or UPDATE within a MERGE statement, or in the list of target host variables in the SET or VALUES INTO statement. For a data change INSERT statement, each column name in the INCLUDE clause must be unique and must not duplicate any column name in the INSERT table. If the specified names are not the same, then one of the following has occurred:
  • If the object is a view, two columns in the view may identify the same column in the base table.
  • The names may correspond to the same system column name.
Recovery Text: Do one of the following and try the request again:
  • Remove the duplicate column.
  • Specify a column list on the statement to remove the duplicate column.
SQLCODE or SQLCODEs: -121
SQLSTATE or SQLSTATEs: 42701
SQL0122
Message Text: Column &1 or expression in SELECT list not valid.
Cause Text: One of the following has occurred:
  • The statement contains column name &1 and an aggregate function in the SELECT clause and no GROUP BY clause is specified.
  • Column name &1 is specified in the SELECT clause but not in the GROUP BY clause.
  • An expression is specified in the SELECT clause but not in the GROUP BY clause.
  • A column or expression that is specified in the ORDER BY clause, but not in the SELECT clause, does not conform to the grouping rules listed above.
Recovery Text: Do one of the following and try the request again:
  • If a GROUP BY clause is required, make certain that all columns or expressions in the SELECT list and ORDER BY clause are also in the GROUP BY clause.
  • If a GROUP BY clause is not needed, the SELECT list and ORDER BY clause should not contain aggregate functions with column names.
SQLCODE or SQLCODEs: -122
SQLSTATE or SQLSTATEs: 42803
SQL0123
Message Text: Parameter value for function &2 not correct.
Cause Text: The parameter in position &1 of function &2 is not allowed. The expression cannot contain a column reference or a scalar fullselect. It cannot reference a user-defined function.
Recovery Text: Change the argument of the function to a supported expression. Try the request again.
SQLCODE or SQLCODEs: -123
SQLSTATE or SQLSTATEs: 42601
SQL0125
Message Text: ORDER BY column number &1 not valid.
Cause Text: The ORDER BY clause in the statement contains a column number that is either greater than the maximum number of values that can be selected (8000), or is greater than the number of columns in the result table select list.
Recovery Text: Correct the column number in the ORDER BY clause to specify a column in the result table. Try the request again.
SQLCODE or SQLCODEs: -125
SQLSTATE or SQLSTATEs: 42805
SQL0128
Message Text: Use of NULL is not valid.
Cause Text: The keyword NULL is not valid with the operator specified. NULL is only allowed in a predicate following IS or IS NOT. NULL is a reserved keyword and can only be used as the name of a column if the name is delimited when used in an SQL statement.
Recovery Text: Either change the operator to IS or IS NOT or, if the word NULL was meant to be a column name, specify the name within delimiters.
SQLCODE or SQLCODEs: -128
SQLSTATE or SQLSTATEs: 42601
SQL0129
Message Text: Too many tables in SQL statement.
Cause Text: The SQL statement contains too many tables or views. A single SQL statement can refer to a maximum of 1000 tables or views. A CREATE TABLE AS or a CREATE VIEW statement can only refer to 256 tables. This number includes the base tables of a view.
Recovery Text: Do one of the following and try the request again:
  • Split the SQL statement into two or more simpler statements with a maximum of 1000 tables in each.
  • If this is a CREATE VIEW or CREATE TABLE AS statement, reduce the number of tables to a maximum of 256.
SQLCODE or SQLCODEs: -129
SQLSTATE or SQLSTATEs: 54004
SQL0130
Message Text: ESCAPE character &1 or LIKE pattern is not valid.
Cause Text: Either ESCAPE character &1 is not valid or the use of the ESCAPE character in the LIKE pattern is not valid.

The ESCAPE character is not valid if:

  • The length is not 1 SBCS character or 1 graphic character.
  • The shift-in (X'0E') and the shift-out (X'0F') characters are specified.

The LIKE pattern is not valid if:

  • The character string expression forming the pattern contains an ESCAPE character that is not followed by a percent sign, an underscore, or another ESCAPE character.
  • The graphic string expression forming the pattern contains an ESCAPE character that is not followed by a DBCS percent sign, a DBCS underscore, or another ESCAPE character.
Recovery Text: Specify a valid LIKE pattern and ESCAPE character. Try the request again.
SQLCODE or SQLCODEs: -130
SQLSTATE or SQLSTATEs: 22019, 22025
SQL0131
Message Text: Operands of LIKE not compatible or not valid.
Cause Text: The arguments of the LIKE predicate must be character, binary, graphic, or numeric. One of the following errors has occurred:
  • The operand to the right of the LIKE operator is not character, binary, graphic, or numeric.
  • The operands of the LIKE predicate are not compatible.
  • The ESCAPE character is not character, binary, or graphic.
Recovery Text: Ensure the operands for the LIKE predicate are character, binary, graphic, or numeric. The ESCAPE character must be character, binary, or graphic. Try the request again.
SQLCODE or SQLCODEs: -131
SQLSTATE or SQLSTATEs: 42818
SQL0132
Message Text: LIKE predicate not valid.
Cause Text: Either the second operand or the ESCAPE character specified in a LIKE predicate is not valid. The second operand must be a string or numeric expression. The ESCAPE character must be a string expression but cannot be a special register.
Recovery Text: Change the incorrect operand or the operator. Try the request again.
SQLCODE or SQLCODEs: -132
SQLSTATE or SQLSTATEs: 42824
SQL0133
Message Text: Operator on correlated column in SQL function not valid.
Cause Text: An aggregate function appearing in a subquery of a HAVING clause is not valid if the argument of the function is an expression that contains an operator (+, -, *, /, **, ||) or a scalar function that is applied to a correlated reference. An operation cannot be performed on a correlated reference since the computed value of the group cannot be determined in the outer (correlated) subselect without a possible value from the inner subselect.
Recovery Text: If the operator is a scalar function, make the aggregate function the argument of the scalar function. Otherwise, remove the operator on the correlated reference or move the operator so it is not in the argument of the aggregate function. For example, specifying the expression in the form:

AVG( outertable.column1 + innertable.column2 )

is not valid, while the expression

AVG( outertable.column1 ) + innertable.column2

is valid.

SQLCODE or SQLCODEs: -133
SQLSTATE or SQLSTATEs: 42906
SQL0134
Message Text: String, argument, or path too long.
Cause Text: One of the following errors has occurred:
  • The argument of a COUNT function is too long. The argument of a COUNT function cannot be longer than 2000 bytes if DISTINCT is specified. If the argument is graphic, then the argument cannot be longer than 1000 DBCS characters.
  • More than 268 libraries were specified on the SET PATH statement or on the SET OPTION SQLPATH statement.
Recovery Text: Change the argument of the function or the number of libraries in the path so that the length does not exceed the maximum. Try the request again.
SQLCODE or SQLCODEs: -134
SQLSTATE or SQLSTATEs: 42907
SQL0136
Message Text: ORDER BY, GROUP BY, or join expressions too long.
Cause Text: The total length of all expressions cannot exceed 3.5 gigabytes for the following operations:
  • ORDER BY
  • GROUP BY
  • OUTER JOIN and EXCEPTION JOIN
  • OLAP ordering
  • ARRAY_AGG function
  • XMLAGG function

If the allow copy data option is ALWCPYDTA(*NO), the total length of all expressions cannot exceed 32766 bytes.

CUBE grouping can have a maximum of 10 expressions.

Recovery Text: Change the statement so that the length of the order, group, or join values does not exceed the limit. One or more expressions must be removed from the clause. Try the request again.
SQLCODE or SQLCODEs: -136
SQLSTATE or SQLSTATEs: 54005
SQL0137
Message Text: Result too long.
Cause Text: A concatenation operator or a HEX scalar function was specified, but the resulting length of the operation exceeds the maximum allowed. The maximum length is:
  • 32766 bytes if the result is fixed-length character or fixed-length binary.
  • 32740 bytes if the result is varying-length character or varying-length binary.
  • 16383 DBCS characters if the result is fixed-length graphic.
  • 16370 DBCS characters if the result is varying-length graphic.
  • 2147483647 bytes if the result is a binary or character LOB.
  • 1073741823 DBCS characters if the result is a double-byte character LOB.
Recovery Text: Change the expression to decrease the resulting length to less than or equal to the maximum allowed. If converting from graphic to character data, the result length specified on the scalar function must be less than 8191. The SUBSTR scalar function can be used to decrease the length of an operand. Try the request again.
SQLCODE or SQLCODEs: -137
SQLSTATE or SQLSTATEs: 54006
SQL0138
Message Text: Argument &1 of substringing function not valid.
Cause Text: Argument 2 or 3 of the SUBSTRING function or argument 2 of the LEFT function is either out of range or is an expression that does not evaluate to an integer.
  • For the SUBSTRING function, argument 2 specifies the position of the first character of the result and argument 3 specifies the length of the result. Argument 2 must be a valid position of the first argument. Argument 3 must not exceed the length of argument 1 between argument 2 and the end of the string.
  • For the LEFT function, argument 2 specifies the length of the result. Argument 2 must not exceed the length of argument 1.
  • If argument 1 is a character string or a binary string, a character is a byte, and if argument 1 is graphic string, a character is a DBCS character.
  • If the argument is *N, then one of the arguments is not valid but the argument number is not known.
Recovery Text: If the argument is *N, display the previously listed messages in the job log (DSPJOBLOG command) or press F10 (Display messages in job log) from this display to determine which argument is in error. Change one or more of the arguments specified in the SUBSTR function. The INTEGER scalar function may be used to convert the argument into an integer result. Try the request again.
SQLCODE or SQLCODEs: +138, -138
SQLSTATE or SQLSTATEs: 01544, 22011
SQL0142
Message Text: SET SESSION AUTHORIZATION statement is not allowed.
Cause Text: Use of the SET SESSION AUTHORIZATION statement is restricted through this interface.
Recovery Text: Use the SET SESSION AUTHORIZATION statement through a different interface.
SQLCODE or SQLCODEs: -142
SQLSTATE or SQLSTATEs: 42612
SQL0143
Message Text: Statement &1 ignored.
Cause Text: Statement &1 is not supported by DB2 for IBM i. It has been ignored.
Recovery Text: No action is required.
SQLCODE or SQLCODEs: +143
SQLSTATE or SQLSTATEs: 01505
SQL0144
Message Text: Section number &1 not valid. Current high section number is &3. Reason &2.
Cause Text: Reason code is &2.

Reason code 1, section number &1 has already been assigned.

Reason code 2, section number &1 is smaller than next possible number.

Reason code 3, section number on ENDBND is smaller than highest one assigned.

Reason code 4, section number is not in the SQL package.

Reason code 5, section number of zero is not valid.

Recovery Text: Contact your IBM representative to report the problem.
SQLCODE or SQLCODEs: -144
SQLSTATE or SQLSTATEs: 58003
SQL0145
Message Text: Recursion not supported for application server other than DB2 for IBM i.
Cause Text: Program &1 in &2 was called recursively when connected to an application server that is not DB2 for IBM i. The program was connected to application server &3 with product identification of &4. If the application server is an IBM product, the identification is in the form pppvvrrm, where:

ppp identifies the product as follows:

DSN for DB2 for z/OS

ARI for VM and VSE

QSQ for DB2 for IBM i

SQL for all other DB2 products

vv is a two-digit version identifier such as '07'

rr is a two-digit release identifier such as '01'

m is a one-digit modification level such as '0' .

For example, if the application server is Version 7 Release 1 of DB2 for z/OS, the value of the product identification is 'DSN07010'.

Recovery Text: Change your application so that it is not recursively called when connected to a server that is not DB2 for IBM i.
SQLCODE or SQLCODEs: -145
SQLSTATE or SQLSTATEs: 55005
SQL0150
Message Text: View, index, or table &1 in &2 read-only.
Cause Text: Update, delete, insert, merge, or truncate is not allowed. &1 in &2 can be used only for read operations.

A view or logical file can be used only for read operations if one or more of the following conditions are true:

-- The view contains a DISTINCT keyword, GROUP BY clause, HAVING clause, CONNECT BY clause, FOR SYSTEM_TIME clause, or an aggregate function in the outer fullselect.

-- The view or logical file references more than one table in the outer fullselect.

-- The view contains a subquery that refers to the same table as the table of the outer fullselect. A view of this type may be used for inserting rows.

-- The view contains UNION, EXCEPT, or INTERSECT in the outer fullselect.

-- All the columns of the view are expressions, constants, or special registers.

-- All the columns of the logical file are input only.

-- The select list of the view omits a column of the based on table that does not allow null values or default values. Inserting into the view is not allowed.

-- A history table cannot be modified directly.

Recovery Text: Change the statement to insert, delete, update, merge, or truncate data using the base table of &1. All columns of the table that do not allow null values or default values must be assigned a value when inserting a row into a table or view unless an INSTEAD OF trigger is defined for the view. To modify data in a history table, drop versioning first. Try the request again.
SQLCODE or SQLCODEs: -150
SQLSTATE or SQLSTATEs: 42807
SQL0151
Message Text: Column &1 in table &2 in &3 is not updatable.
Cause Text: &1 is a column of an implicit or explicit column list for an INSERT statement or a SET clause on an UPDATE statement. &1 is read only because it is:
  • Derived from an expression, a constant, or a special register.
  • Defined on a column of an underlying view that cannot be updated.
  • A column of a logical file that is defined as input only.

Either extended indicator support is not enabled or extended indicator support is enabled but the indicator value is not UNASSIGNED.

Recovery Text: Remove column &1 from the column list or the SET clause. If this is an INSERT and a column list was not specified, then specify a column list to remove column &1. If extended indicator support is enabled, specify an indicator variable that contains the UNASSIGNED value. Try the request again.
SQLCODE or SQLCODEs: -151
SQLSTATE or SQLSTATEs: 42808
SQL0152
Message Text: Constraint type not valid for constraint &1 in &2.
Cause Text: An attempt was made to drop constraint &1 in &2 using an ALTER TABLE statement. The constraint was specified as CHECK, UNIQUE, PRIMARY, or FOREIGN KEY and is not the same as the constraint found.
Recovery Text: Verify the name and type of the constraint you want to drop. Try the request again.
SQLCODE or SQLCODEs: -152
SQLSTATE or SQLSTATEs: 42809
SQL0153
Message Text: Column list required.
Cause Text: A column list must be specified because the result columns are unnamed. Result columns are unnamed for one of the following reasons:
  • An element of the SELECT list is not a column and the AS clause is not specified.
  • Corresponding columns of the subselects in a UNION, EXCEPT, or INTERSECT do not have the same name.
  • Two result columns have the same column name. Every column name and system-column name must be unique in a table or view definition. If two column names are the same, the column name is &1.
Recovery Text: Do one of the following and try the request again:
  • Provide a list of names for the columns in the table, view, or derived table.
  • Specify an AS clause to assign a unique name to the unnamed elements or to rename the duplicate columns in the SELECT list.
SQLCODE or SQLCODEs: -153
SQLSTATE or SQLSTATEs: 42908
SQL0155
Message Text: Transition table &1 read-only.
Cause Text: Statement is not allowed. Transition table &1 in an SQL trigger can be used only for read operations.
Recovery Text: Change the statement to specify a table other than the transition table or remove the statement. Transition tables can be specified on SELECT statements. Qualify table names in an SQL trigger that may have the same name as transition tables. Try the request again.
SQLCODE or SQLCODEs: -155
SQLSTATE or SQLSTATEs: 42807
SQL0156
Message Text: &1 in &2 not correct type.
Cause Text: A DROP TABLE, CREATE INDEX, LOCK TABLE, ALTER TABLE, CREATE MASK, CREATE PERMISSION, CREATE TRIGGER, or ALTER PROCEDURE statement was specified but &1 in &2 is the wrong type. DROP TABLE, CREATE INDEX, LOCK TABLE, ALTER TABLE, CREATE OR REPLACE TABLE, CREATE MASK, and CREATE PERMISSION must specify a table. DROP TABLE cannot be used to drop a history table. CREATE TRIGGER for a BEFORE or AFTER trigger must specify a table. CREATE TRIGGER for an INSTEAD OF trigger must specify a view. CREATE TRIGGER for a BEFORE INSERT trigger cannot specify a history table.
Recovery Text: Change the statement to use the correct object type. Try the request again.
SQLCODE or SQLCODEs: -156
SQLSTATE or SQLSTATEs: 42809
SQL0157
Message Text: &1 in &2 not valid in FOREIGN KEY clause.
Cause Text: View or logical file &1 in &2 was specified in the REFERENCES clause in the definition of a FOREIGN KEY referential constraint on a CREATE TABLE or an ALTER TABLE statement. Views and logical files cannot be specified in a FOREIGN KEY clause.
Recovery Text: Specify the base table that contains the parent key in the FOREIGN KEY clause. Try the request again.
SQLCODE or SQLCODEs: -157
SQLSTATE or SQLSTATEs: 42810
SQL0158
Message Text: Number of columns specified not consistent.
Cause Text: One of the following has occurred:
  • The number of column names specified for a view in a CREATE VIEW statement is not the same as the number of elements specified in the following fullselect.
  • The number of column names specified for a table in a CREATE TABLE statement is not the same as the number of elements specified in the following fullselect.
  • The number of column names specified in a correlation clause is not the same as the number of elements in the table, derived table, table function, data change table reference, or UNNEST.
  • The number of column names specified in a column list of a common table expression is not the same as the number of elements specified in the fullselect.
  • The number of columns specified in the RETURNS TABLE clause of a user defined table function is not the same as the number of elements specified in the fullselect in the RETURN statement.
  • The number of columns specified in the RETURNS TABLE clause of a user defined table function is not the same as the number of elements specified on the PIPE statement.
Recovery Text: Specify a column name for each column in the result. Try the request again.
SQLCODE or SQLCODEs: -158
SQLSTATE or SQLSTATEs: 42811
SQL0159
Message Text: &1 in &2 not correct type.
Cause Text: A DROP INDEX, DROP VIEW, DROP ALIAS, COMMENT ON INDEX, COMMENT ON ALIAS, RENAME INDEX, or REFRESH TABLE statement was specified but &1 in &2 is not the correct type. DROP INDEX can only be used to drop an index. DROP VIEW can only be used to drop a view. DROP ALIAS can only be used to drop an alias. COMMENT ON INDEX can only be used to comment on an index. COMMENT ON ALIAS can only be used to comment on an alias. RENAME INDEX can only be used to rename an index. REFRESH TABLE can only be used to refresh a materialized query table.

CREATE TRIGGER must specify a table if it is a BEFORE or AFTER trigger. CREATE TRIGGER must specify a view if it is an INSTEAD OF trigger.

A GRANT or REVOKE with the USER keyword must specify a user profile. A GRANT or REVOKE with the GROUP keyword must specify a group profile.

Recovery Text: Do one of the following to correct the problem and try the request again:

If this is a DROP statement:

  • If &1 is an index, use a DROP INDEX statement.
  • If &1 is a view, use a DROP VIEW statement.
  • If &1 is a table, use a DROP TABLE statement.
  • If &1 is an alias, use a DROP ALIAS statement.

If this is a COMMENT ON INDEX or COMMENT ON ALIAS statement and &1 is a table or view, use a COMMENT ON TABLE statement.

If this is a RENAME INDEX statement and &1 is a table or view, use a RENAME TABLE statement.

If this is a REFRESH TABLE statement, specify a materialized query table.

If this is a CREATE TRIGGER, specify a table for a BEFORE or AFTER trigger, or a view for an INSTEAD OF trigger.

If this is a GRANT or REVOKE statement, specify the correct type of profile or remove the USER or GROUP keyword.

SQLCODE or SQLCODEs: -159
SQLSTATE or SQLSTATEs: 42809
SQL0160
Message Text: WITH CHECK OPTION not allowed for view &1 in &2.
Cause Text: The WITH CHECK OPTION clause is not allowed in the CREATE VIEW statement for view &1 in &2 because the fullselect contains one of the following:
  • The first FROM clause identifies more than one table or view.
  • The first SELECT clause contains the DISTINCT keyword.
  • A UNION, EXCEPT, or INTERSECT was specified.
  • The outer subselect contains a GROUP BY clause.
  • The outer subselect contains a HAVING clause.
  • The outer subselect contains an aggregate function.
  • The outer subselect contains a UNION, EXCEPT, or INTERSECT.
  • All the select items in the outer subselect are expressions.
  • The WHERE clause contains a global variable.
  • The SELECT statement contains a scalar subselect.
  • The WITH CASCADED CHECK OPTION clause was specified and a view in the FROM clause contains a scalar subselect.
  • A special register or a function that is not deterministic, MODIFIES SQL DATA, or EXTERNAL ACTION is somewhere other than the outer select list.
  • A view in the FROM clause has an INSTEAD OF trigger defined on it.
  • The WHERE clause contains the VERIFY_GROUP_FOR_USER scalar function.
Recovery Text: Remove the WITH CHECK OPTION clause.
SQLCODE or SQLCODEs: -160
SQLSTATE or SQLSTATEs: 42813
SQL0161
Message Text: INSERT or UPDATE not allowed because a resulting row does not satisfy view definition &1 in &2.
Cause Text: The INSERT or UPDATE could not be done because a resulting row did not satisfy the view definition for &1 in &2. Either the view or an underlying view contains a WITH CHECK OPTION clause. For an INSERT data change table reference, a view is treated as if it contains a WITH CASCADED CHECK OPTION clause.
Recovery Text: Change the data being inserted or updated so that it conforms to the view definition.
SQLCODE or SQLCODEs: -161
SQLSTATE or SQLSTATEs: 44000
SQL0170
Message Text: Number of arguments for function &1 not valid.
Cause Text: A function has been specified with an incorrect number of arguments. If this function is meant to be a user-defined function reference, a function with this signature was not found using the current path.
Recovery Text: Correct the number of arguments specified for the function. Refer to the DB2 for IBM i SQL Reference topic collection in the Database category in the IBM i Information Center for information on functions. If this is a user-defined function, correct the path or the function signature. Try the request again.
SQLCODE or SQLCODEs: -170
SQLSTATE or SQLSTATEs: 42605
SQL0171
Message Text: Argument &1 of function &2 not valid.
Cause Text: The data type, length, or value of argument &1 of function &2 specified is not valid.
Recovery Text: Refer to the DB2 for IBM i SQL Reference topic collection in the Database category in the IBM i Information Center for more information on scalar functions. Correct the arguments specified for the function. Try the request again.
SQLCODE or SQLCODEs: -171
SQLSTATE or SQLSTATEs: 22014, 22016, 2201T, 2201V, 2201W, 2201X, 22546, 42815
SQL0172
Message Text: Function &1 not allowed in INCLUDE.
Cause Text: Function &1 cannot be specified in the INCLUDE clause. Only the aggregate functions AVG, COUNT, COUNT_BIG, SUM, STDDEV, STDDEV_SAMP, VARIANCE, and VARIANCE_SAMP and functions sourced on these functions are allowed in the INCLUDE clause.
Recovery Text: Change the function to be a supported aggregate function. Try the request again.
SQLCODE or SQLCODEs: -172
SQLSTATE or SQLSTATEs: 42601
SQL0175
Message Text: COMMIT, ROLLBACK, or SAVEPOINT failed.
Cause Text: A commit, rollback, savepoint failed due to reason code &2. The logical unit of work identifier is &1. Reason codes and their meanings are:
  • 1 -- A transaction program error occurred.
  • 2 -- A commit resulted in a rollback.
  • 3 -- The requested transaction operation failed.
  • 4 -- The savepoint operation failed.
Recovery Text: Display the previous messages in the joblog and take the appropriate action.
SQLCODE or SQLCODEs: -175
SQLSTATE or SQLSTATEs: 3B504, 58028
SQL0177
Message Text: CHECK condition text too long.
Cause Text: The CHECK condition text for a CHECK constraint is longer than 2000 bytes and does not fit in the SYSCHKCST catalog view. The CHECK condition text cannot be stored in the system catalog views. The CHECK_CLAUSE column of the SYSCHKCST catalog view will contain the null values for this constraint.
Recovery Text: No recovery is necessary. If the complete text is required in the system catalog views, consider using multiple CHECK constraints instead of one large CHECK constraint.
SQLCODE or SQLCODEs: +177
SQLSTATE or SQLSTATEs: 01009
SQL0178
Message Text: Query expression text for view &1 in &2 too long.
Cause Text: The query expression text for view &1 in &2 is longer than 10000 bytes and does not fit in the SYSVIEWS catalog view. The statement text cannot be stored in the system catalog views. The VIEW_DEFINITION column of the SYSVIEWS catalog view will contain the null value for this view.
Recovery Text: No recovery is necessary. If the complete text is required in the system catalog views, recreate the view with the length of the query expression less than or equal to 10000 bytes.
SQLCODE or SQLCODEs: +178
SQLSTATE or SQLSTATEs: 0100A
SQL0180
Message Text: Syntax of date, time, or timestamp value not valid.
Cause Text: The string representation of a date, time, or timestamp value does not conform to the syntax for the specified or implied data type and format. &2 is either the character string constant that is not valid or the column or host variable that contained the string. If the name is *N, then the value is an expression specified in the statement. If the string was found in a host variable, the host variable number is &1.
Recovery Text: Ensure that the date, time, or timestamp value conforms to the syntax for the data type it represents. Try the request again.
SQLCODE or SQLCODEs: +180, -180
SQLSTATE or SQLSTATEs: 01534, 22007
SQL0181
Message Text: Value in date, time, or timestamp string not valid.
Cause Text: The string representation of a date, time or timestamp value is not in the acceptable range. &2 is either the character string constant that is not valid or the column or host variable that contained the string. If the name is *N, then the value was found in an expression specified in the statement. If the value was found in a host variable, then the host variable number is &1. The proper ranges for date, time, or timestamp values are as follows:
  • The range for years is from 0001 to 9999. For date formats *MDY, *YMD, *DMY, and *JUL, the year must be in the range 1940 to 2039.
  • The range for months is from 1 to 12.
  • The range for days is from 1 - 30 for April, June, September, and November, from 1 - 28 for February and from 1 to 31 for all other months. In a leap year, the range for February can be from 1 to 29.
  • The range for days in a Julian date is from 001 to 366 for a leap year or 001 to 365 days for all other years.
  • The range for hours is from 0 to 24. If the hour is 24, then the other parts of the time values must be zeros. If the time format is USA, then the hour cannot be greater than 12.
  • The range for minutes is from 0 to 59.
  • The range for seconds is from 0 to 59.
  • The range for fractional seconds is from 0 to 999999999999.
Recovery Text: Ensure that the date, time, or timestamp value conforms to the ranges for the data type it represents. Try the request again.
SQLCODE or SQLCODEs: +181, -181
SQLSTATE or SQLSTATEs: 01534, 22007
SQL0182
Message Text: A date, time, or timestamp expression not valid.
Cause Text: One of the following has occurred:
  • An operand of addition is a date and the other is not a date duration.
  • An operand of addition is a time and the other is not a time duration.
  • An operand of addition is a timestamp and the other is not a duration.
  • An operand of subtraction is a date and the other is not a date, character, or date duration.
  • An operand of subtraction is a time and the other is not a time, character, or time duration.
  • An operand of subtraction is a timestamp and the other is not a timestamp, character, or duration.
Recovery Text: Correct the arithmetic expression so that it contains a valid date, time, or timestamp expression. Try the request again.
SQLCODE or SQLCODEs: -182
SQLSTATE or SQLSTATEs: 42816
SQL0183
Message Text: Result of date or timestamp expression not valid.
Cause Text: The result of an arithmetic operation is a date or timestamp that is not within the valid range of dates which are between 0001-01-01 and 9999-12-31. If the result is a date in the format YMD, MDY, DMY, or JUL then the year must be between 1940 and 2039. If this is a FETCH, embedded SELECT, SET or VALUES INTO, then the relative position of the host variable in the INTO clause is &1 and the host variable name is &2.
Recovery Text: Correct the arithmetic expression or the data that was being processed at the time the error occurred. If the date format is YMD, MDY, DMY or JUL and the result is not between 1940 and 2039, then specify USA, ISO, EUR, or JIS for the date format. The date format can be specified on the STRSQL or CRTSQLxxx commands or can be changed for the job by using the CHGJOB command. Try the request again.
SQLCODE or SQLCODEs: +183, -183
SQLSTATE or SQLSTATEs: 01535, 22008
SQL0184
Message Text: Parameter marker not valid in expression.
Cause Text: A parameter marker cannot be used as an operand in a date/time arithmetic expression.
Recovery Text: Correct the arithmetic expression. Try the request again.
SQLCODE or SQLCODEs: -184
SQLSTATE or SQLSTATEs: 42610
SQL0187
Message Text: Use of labeled duration not valid.
Cause Text: One of the following has occurred:
  • A labeled duration is specified but is not the operand of the operators plus or minus.
  • A labeled duration of years, months, or days is specified as the operand of addition or subtraction and the other operand is not date or timestamp.
  • A labeled duration of hours, minutes, or seconds is specified as the operand of addition or subtraction and the other operand is not time or timestamp.
  • A labeled duration of microseconds is specified as the operand of addition or subtraction and the other operand is not timestamp.
  • A labeled duration is specified as the left operand of subtraction.
  • The value specified for the labeled duration is not a numeric type.
Recovery Text: Correct the use of the labeled duration. Try the request again.
SQLCODE or SQLCODEs: -187
SQLSTATE or SQLSTATEs: 42816
SQL0188
Message Text: &1 not a valid string representation of a name.
Cause Text: The host variable contains a string representation of a name that is not valid for one of the following reasons:
  • The host variable is empty.
  • The first character is a period, a slash, or a blank.
  • The number of identifiers is greater than the maximum allowed for the name of the object. For example, the host variable identifies a table name but the host variable contains 4 or more identifiers. A table name can contain a maximum of 3 identifiers. A relational database name can contain a maximum of 1 identifier.
  • An identifier is too long.
  • A period not contained in a delimited identifier is followed by a period or a blank.
  • A slash not contained in a delimited identifier is followed by a slash or a blank.
  • A blank is followed by characters other than blanks.
  • A delimited identifier contains no characters.
  • A delimited identifier is followed by a character other than a period, a slash or a blank.
  • The ending delimiter is missing from a delimited identifier.
Recovery Text: Change the name. Try the request again.
SQLCODE or SQLCODEs: -188
SQLSTATE or SQLSTATEs: 22503, 28000, 2E000
SQL0189
Message Text: Coded Character Set Identifier &1 not valid.
Cause Text: Coded Character Set Identifier (CCSID) &1 is not valid for one of the following reasons:
  • The CCSID is not EBCDIC.
  • The CCSID is not supported by the system.
  • The CCSID is not valid for the data type.
  • If the CCSID is specified for graphic data, then the CCSID must be a DBCS CCSID.
  • If the CCSID is specified for UCS-2 or UTF-16 data, then the CCSID must be a UCS-2 or UTF-16 CCSID.
  • If the CCSID is specified for XML data, then the CCSID must be SBCS or Unicode. It must not be DBCS or 65535.
  • If the CCSID is specified for CLOB, DBCLOB, or DATALINK data, then the CCSID must not be 65535.
  • If the CCSID is specified for a result column of the XMLTABLE function, the CCSID must not be 65535.
  • If there are multiple DataLink columns with FILE LINK CONTROL, they must all have the same CCSID.
  • The NORMALIZED clause can only be specified for a UTF-8 or UTF-16 CCSID.
Recovery Text: Ensure that all CCSID values in the statement are supported by the system and are valid for the data type. For a list of valid CCSID values, refer to the DB2 for i SQL Reference topic collection in the Database category in the IBM i Information Center, http://www.ibm.com/systems/i/infocenter/.
SQLCODE or SQLCODEs: -189
SQLSTATE or SQLSTATEs: 22522
SQL0190
Message Text: Attributes of column &3 in &1 in &2 not compatible.
Cause Text: The attributes specified for column &3 in &1 in &2 are not compatible with the attributes of the existing column. Either the data type, the length, or the clause is not valid. A column in a system-period temporal table cannot be altered in any way that could cause loss of data.
  • A numeric column cannot be changed to a type that is not numeric.
  • A character column cannot be changed to a DATE, TIME, TIMESTAMP, or a numeric column.
  • A DATE, TIME, or TIMESTAMP column can only be changed to a column of the same type.
  • A character column cannot be changed to DBCS-only column.
  • A character, graphic, DataLink, or Unicode column cannot be changed to a column with an incompatible CCSID.
  • A binary column cannot be changed to a column that is not binary.
  • A column that is not binary cannot be changed to a binary column.
  • A DataLink column cannot be changed to a column with a shorter length.
  • A column can be changed to a user-defined type if the type is promotable to the new type. A column that is a user-defined type cannot be changed to a different type.
  • Columns cannot be changed to or from a DataLink, a ROWID, or an XML data type.
  • The length of a column that allows null values cannot be greater than 32765 for fixed-length character or fixed-length binary, 32739 for varying-length character or varying-length binary, 16382 for fixed-length graphic, and 16369 for varying-length graphic. The length of a DataLink column cannot be greater than 32717. The length of a binary LOB, character LOB, or XML column cannot be greater than 2147483647. The length of a double-byte LOB column cannot be greater than 1073741823. The length of a DBCS-open column cannot be less than 4.
  • Identity attributes can only be specified for a column defined as an identity column. DROP NOT NULL cannot be specified for an identity column.
  • DROP DEFAULT can only be specified if a default value is defined for the existing column and the default is not NULL.
  • SET GENERATED BY DEFAULT cannot be specified for a column that is defined as a ROW BEGIN, ROW END, or TRANSACTION START ID.
  • DROP GENERATED cannot be specified for a column that is defined as a ROW BEGIN, ROW END, or TRANSACTION START ID in a system-period temporal table.
  • DROP FIELDPROC can only be specified if a field procedure is defined for the existing column.
  • ADD FIELDPROC can only be specified if a field procedure is not defined for the existing column.
  • Only the CCSID can be altered for an XML column.
Recovery Text: Specify attributes that are compatible with column &3. Try the request again.
SQLCODE or SQLCODEs: -190
SQLSTATE or SQLSTATEs: 42837
SQL0191
Message Text: Mixed data or UTF-8 data not properly formed.
Cause Text: A mixed data string or UTF-8 data string does not have the proper format. For mixed data, every shift-out character ('0E'X) must have a corresponding shift-in character ('0F'X). If these characters are not paired, the data is not valid. For upper-case CCSID's, lower-case characters are not valid. The conversion was from column or host variable &2 to column or host variable &4.
Recovery Text: Ensure that all mixed character data has paired shift characters and that all UTF-8 data is valid. For more information about UTF-8, refer to the Programming support topic in the Information Center, http://www.ibm.com/systems/i/infocenter/.
SQLCODE or SQLCODEs: +191, -191
SQLSTATE or SQLSTATEs: 01547, 22504
SQL0192
Message Text: Argument of translation function not valid.
Cause Text: The argument of the TRANSLATE, UCASE, UPPER, LCASE, or LOWER scalar function is a DBCS-only string. The argument must be SBCS, DBCS-open, or DBCS-either.
Recovery Text: Change the argument of the function to one that is valid. Try the request again.
SQLCODE or SQLCODEs: -192
SQLSTATE or SQLSTATEs: 42937
SQL0194
Message Text: KEEP LOCKS not allowed.
Cause Text: KEEP LOCKS was specified for cursor &1 but is not allowed because the cursor is not opened for read only. The cursor must be opened for read only to allow locks to be kept. For an explanation of read only cursors, see the DB2 for i SQL programming topic collection in the Database category in the IBM i Information Center
Recovery Text: Do not specify KEEP LOCKS, or specify a cursor that is read only.
SQLCODE or SQLCODEs: -194
SQLSTATE or SQLSTATEs: 42848
SQL0195
Message Text: Last column of &1 in &2 cannot be dropped.
Cause Text: An attempt was made to drop one or more columns using an ALTER TABLE statement or a CREATE OR REPLACE TABLE statement. The columns cannot be dropped from table &1 in &2 because at least one of the existing columns must be preserved when altering a table.
Recovery Text: Ensure table &1 in &2 will have at least one column once the statement is complete.
  • For ALTER TABLE, either remove the DROP of one of the columns or, if all of the columns should be removed, drop the table and create it again.
  • For CREATE OR REPLACE TABLE at least one column must maintain its column name from the previous version of the table. Specify ON REPLACE DELETE ROWS to change all the columns.
SQLCODE or SQLCODEs: -195
SQLSTATE or SQLSTATEs: 42814
SQL0196
Message Text: Column &3 in &1 in &2 cannot be dropped.
Cause Text: An attempt was made to drop column &3. The column cannot be dropped for reason code &4. Reason codes are:
  • 1 - The column is part of a partition key.
  • 4 - The column is referenced in the definition of a period.
  • 5 - The column is in a system-period temporal table.
  • 6 - The column is in a history table.
  • 7 - The column is a transaction start ID column in a system-period temporal table.
  • 16 - A view, a constraint, a trigger, or an index is dependent on the column and this is either a CREATE OR REPLACE TABLE or an ALTER TABLE where RESTRICT was specified.
  • 17 - The column is referenced by a text search index.
Recovery Text: Specify CASCADE on the ALTER TABLE statement to drop the column and the views, constraints, triggers, and indexes that are dependent on it. For CREATE OR REPLACE TABLE, the dependent object must be dropped before the column can be removed from the table. If the column is part of the partition key, specify DROP PARTITIONING on the ALTER TABLE statement to remove the partitioning for the table. Columns in a history table or system-period temporal table cannot be dropped unless versioning is dropped. If the column is part of a text search index, the text search index should be dropped using the SYSPROC.SYSTS_DROP stored procedure.
SQLCODE or SQLCODEs: -196
SQLSTATE or SQLSTATEs: 42817
SQL0197
Message Text: Column &1 cannot be qualified.
Cause Text: Column names in an ORDER BY clause of a SELECT statement cannot be qualified if a UNION, EXCEPT, or INTERSECT operator is specified.
Recovery Text: Remove the qualifier from the column name. Ensure the name specified in the ORDER BY clause is a named column of the result table. Try the request again.
SQLCODE or SQLCODEs: -197
SQLSTATE or SQLSTATEs: 42877
SQL0198
Message Text: SQL statement empty or blank.
Cause Text: The SQL statement is empty or blank. One of the following has occurred:
  • During precompiling, the SQL statement referred to has no text between the EXEC SQL and the ending delimiter. The statement is ignored.
  • While running a program containing SQL statements, the operand of a PREPARE or EXECUTE IMMEDIATE statement is blank or empty. The operand, host variable, global variable, or literal string that was the object of either the PREPARE or EXECUTE IMMEDIATE statement contained all blanks or was an empty string.
Recovery Text: If precompiling, correct the statement or remove it and precompile the program again. If running a program containing SQL statements, correct the logic of the program to make certain that a valid SQL statement is provided before issuing a PREPARE or EXECUTE IMMEDIATE statement.
SQLCODE or SQLCODEs: -198
SQLSTATE or SQLSTATEs: 42617
SQL0199
Message Text: Keyword &1 not expected. Valid tokens: &2.
Cause Text: The keyword &1 was not expected here. A syntax error was detected at keyword &1. The partial list of valid tokens is &2. This list assumes that the statement is correct up to the unexpected keyword. The error may be earlier in the statement but the syntax of the statement seems to be valid up to this point.
Recovery Text: Examine the SQL statement in the area of the specified keyword. A colon or SQL delimiter may be missing. SQL requires reserved words to be delimited when they are used as a name. Correct the SQL statement and try the request again.
SQLCODE or SQLCODEs: -199
SQLSTATE or SQLSTATEs: 42601
SQL0203
Message Text: Name &1 is ambiguous.
Cause Text: The name &1 is ambiguous for one of the following reasons:
  • Two or more of the tables specified in a FROM clause contain columns with the name &1. The name specified can refer to a column name or a system column name in the table.
  • The name is specified in an ORDER BY clause and is the same as more than 1 result column name.
  • OLD_ROW and NEW_ROW are specified for an SQL trigger and a transition variable specified in the routine body is not qualified.
Recovery Text: Qualify the column name with a table name or correlation name or use the AS clause to provide a unique result column name that can be specified in the ORDER BY clause. Qualify the transition variable in the trigger with the name specified for OLD_ROW or NEW_ROW. Try the request again.
SQLCODE or SQLCODEs: -203
SQLSTATE or SQLSTATEs: 42702
SQL0204
Message Text: &1 in &2 type *&3 not found.
Cause Text: &1 in &2 type *&3 was not found. If the member name is *ALL, the table is not partitioned. If this is an ALTER TABLE statement and the type is *N, a constraint or partition was not found. If this is not an ALTER TABLE statement and the type is *N, a function, procedure, trigger or sequence object was not found.

If a function was not found, &1 is the service program that contains the function. The function will not be found unless the external name and usage name match exactly. Examine the job log for a message that gives more details on which function name is being searched for and the name that did not match.

Recovery Text: Change the name and try the request again. If the object is a node group, ensure that the DB2 Multisystem product is installed on your system and create a nodegroup with the CRTNODGRP CL command. If an external function was not found, be sure that the case of the EXTERNAL NAME on the CREATE FUNCTION statement exactly matches the case of the name exported by the service program.
SQLCODE or SQLCODEs: +204, -204
SQLSTATE or SQLSTATEs: 01532, 42704
SQL0205
Message Text: Column &1 not in table &2 in &3.
Cause Text: A column with the name &1 does not exist in table or view &2 in schema &3.
Recovery Text: Do one of the following and try the request again:
  • Make certain that the column names, table names, and any qualifiers are specified correctly. A column specified in a join USING clause cannot be qualified in the statement.
  • If the column is not qualified, the column &1 is no longer in table &2. It was originally found in table &2, but it no longer exists. If the column is now available in a different table and is referenced by this statement, a precompile may be necessary.
  • If more than one table is referenced in a SQL statement, the column name should be qualified.
  • If this is a CREATE TABLE statement and column &1 is specified in a partitioning key or constraint for the table being created, add a column definition for column &1 or remove it from the constraint or partitioning key.
  • For a recursive common table expression, the SET sequence column name and the USING column name cannot be referenced in the fullselect that defines the common table expression.
SQLCODE or SQLCODEs: -205
SQLSTATE or SQLSTATEs: 42703
SQL0206
Message Text: Column or global variable &1 not found.
Cause Text: &1 was not found as a column of table &2 in &3 and was not found as a global variable in &2. If the table is *N, &1 is not a column of any table or view that can be referenced, or &1 is a special register that cannot be set in an atomic compound statement.
Recovery Text: Do one of the following and try the request again:
  • Ensure that the column and table names are specified correctly in the statement.
  • If this is a SELECT statement, ensure that all the required tables were named in the FROM clause.
  • If the column was intended to be a correlated reference, qualify the column with the correct table designator.
  • If the column was intended to be a global variable, qualify the name with the schema where the global variable exists or ensure the schema is in the path.
  • If this is a SET statement for a special register within an atomic compound dynamic statement, remove the statement or remove the ATOMIC keyword.
SQLCODE or SQLCODEs: -206
SQLSTATE or SQLSTATEs: 42703
SQL0208
Message Text: ORDER BY column &1 or expression not in result table.
Cause Text: Column &1 is specified in the ORDER BY clause and is not valid because it does not refer to a named column of the result table when a UNION, EXCEPT, or INTERSECT operator is specified. The result column is named if the corresponding columns in each SELECT list have the same name.
Recovery Text: Do one of the following and try the request again:
  • Ensure &1 is a named result column if UNION, EXCEPT, or INTERSECT is specified.
  • Specify a numeric column identifier in place of &1 in the ORDER BY clause.
SQLCODE or SQLCODEs: -208
SQLSTATE or SQLSTATEs: 42707
SQL0212
Message Text: Duplicate table designator &1 not valid.
Cause Text: One of the following has occurred:
  • More than one table in a FROM clause of a subselect has a table designator with the name &1. If a correlation name is specified, the correlation name is the table designator. If one is not specified, the table name or view name is the table designator. If SQL naming is specified, the table name consists of the implicit or explicit schema name followed by the actual table name. If system naming is specified, the table name itself is used without a qualifier as the table designator. The table designator must be unique on each level of a subselect.
  • Names specified in the REFERENCING clause of a CREATE TRIGGER statement are not unique. The names specified for the NEW and OLD correlation name and the NEW_TABLE and OLD_TABLE names must be unique and must not be the same as the table on which the trigger is being defined.
Recovery Text: Make certain there is a unique table designator for every table in a FROM clause for the same level of a subselect. Since schema-name/table-name cannot be used to qualify a column, the table name must be unique or a correlation name must be specified. Specify unique names in the REFERENCING clause of the CREATE TRIGGER statement. Correct any errors and try the request again.
SQLCODE or SQLCODEs: -212
SQLSTATE or SQLSTATEs: 42712
SQL0213
Message Text: Parameter &1 not in routine &2 in &3.
Cause Text: A parameter with a name &1 does not exist in routine &2 in schema &3.
Recovery Text: Make certain that the parameter name, routine name, and any qualifiers are specified correctly. Try the request again.
SQLCODE or SQLCODEs: -213
SQLSTATE or SQLSTATEs: 42703
SQL0214
Message Text: ORDER BY expression is not valid.
Cause Text: The expression in the ORDER BY clause in position &1 is not valid for reason code &3.
  • 1 - The SELECT statement contains a UNION, EXCEPT, or INTERSECT.
  • 2 - DISTINCT is specified in the SELECT clause and the expression or column cannot be matched exactly with an expression or column in the select list.
  • 3 - The select list uses an aggregate function or there is a GROUP BY clause and the expression is not an aggregate function or does not match exactly with an expression in the select list.
  • 4 - An aggregate function in the ORDER BY clause requires grouping.
  • 5 - A nested table expression is not supported in an ORDER BY clause.
Recovery Text: Make the change listed for reason &3 and try the request again:
  • 1 - Remove the expression from the ORDER BY clause.
  • 2 - Remove DISTINCT from the select clause or change the ORDER BY expression or column to refer to a select list item by using a numeric column identifier or a column name.
  • 3 - Change the expression in the ORDER BY clause to an aggregate function or change to use a numeric column identifier or a column name.
  • 4 - Add a GROUP BY clause or remove the aggregate function from the ORDER BY clause.
  • 5 - Remove the nested table expression from the subselect in the ORDER BY clause. Consider using a common table expression instead.
SQLCODE or SQLCODEs: -214
SQLSTATE or SQLSTATEs: 42822
SQL0216
Message Text: Number of values in predicate lists do not match.
Cause Text: The number of values on the left side of the predicate does not match the number of values on the right side of the predicate.

If one side of the predicate is a fullselect that returns more than one result column, the other side of the predicate must be a list of expressions containing the same number of values. The fullselect must explicitly list the result columns.

If both sides of the predicate are expression lists, the lists must contain the same number of values.

An expression list used in an IN or NOT IN predicate cannot contain an untyped parameter marker.

The subquery contains a correlated reference that is not supported. This may occur when there is a UNION, EXCEPT, or INTERSECT in the subquery.

Recovery Text: Change the number of values in the predicate list or in the select list of a row fullselect so both sides contain the same number of values. Change a SELECT * in the fullselect to list the actual columns. Use a casting function for untyped parameter markers in an IN expression list.
SQLCODE or SQLCODEs: -216
SQLSTATE or SQLSTATEs: 428C4
SQL0221
Message Text: Number of rows &2 not valid.
Cause Text: A blocked FETCH, a blocked INSERT, or a SET RESULT SETS statement is not valid. The number of rows specified is not between 0 and 32767 or is greater than the dimension of the host structure array. The number of rows specified is &2 and the dimension of the array is &3. If this is a FETCH statement, the cursor name is &1.
Recovery Text: Either ensure the number of rows is from 0 through 32767 and less than or equal to the dimension of the array, or increase the size of the array.
SQLCODE or SQLCODEs: -221
SQLSTATE or SQLSTATEs: 42873
SQL0225
Message Text: FETCH not valid; cursor &1 not scrollable.
Cause Text: A FETCH statement was specified with PRIOR, FIRST, LAST, BEFORE, AFTER, CURRENT, or RELATIVE for cursor &1, but cursor &1 is not scrollable. Only NEXT may be used for cursors that are not scrollable.
Recovery Text: In order to specify PRIOR, FIRST, LAST, BEFORE, AFTER, CURRENT or RELATIVE on the FETCH statement, the cursor must be scrollable. To create a scrollable cursor, add the SCROLL keyword to the DECLARE CURSOR statement for cursor &1. SCROLL can also be specified in the attributes string for the prepared statement associated with the cursor.
SQLCODE or SQLCODEs: -225
SQLSTATE or SQLSTATEs: 42872
SQL0226
Message Text: Current row deleted or moved for cursor &1.
Cause Text: A FETCH CURRENT was specified for scrollable cursor &1. The current row was either deleted or updated. If the row was updated, one of the following could have occurred:
  • A value of an ORDER BY column of the current row has changed.
  • A value of a column in the index has changed.
  • A column has been changed so it no longer meets the record selection criteria.
Recovery Text: Specify NEXT, PRIOR, FIRST, LAST, BEFORE, AFTER, or RELATIVE on the FETCH statement to position the cursor and fetch another row.
SQLCODE or SQLCODEs: -226
SQLSTATE or SQLSTATEs: 24507
SQL0227
Message Text: FETCH not valid, cursor &1 in unknown position.
Cause Text: A previous blocked FETCH for cursor &1 resulted in an error (SQLCODE &2, SQLSTATE &3) in the middle of processing a block of rows retrieved from the database manager. One or more rows left in the block could not be returned to the program following the error, leaving the position of the cursor unknown. If the SQLSTATE is *N, the error is unknown.
Recovery Text: Close and reopen the cursor to set the position. For scrollable cursors, FIRST, LAST, BEFORE, or AFTER may also be used to position the cursor.
SQLCODE or SQLCODEs: -227
SQLSTATE or SQLSTATEs: 24513
SQL0228
Message Text: FOR UPDATE clause not valid with SCROLL for cursor &1.
Cause Text: The FOR UPDATE clause and SCROLL keyword are specified for cursor &1. The FOR UPDATE clause is not valid with the SCROLL keyword unless the DYNAMIC keyword is also specified. If SCROLL is specified and DYNAMIC is not specified, the cursor is read-only. If DYNAMIC SCROLL is specified, the cursor can be updated.
Recovery Text: To declare a scrollable cursor that is read-only, specify the SCROLL keyword but do not specify the FOR UPDATE clause. To declare a scrollable cursor that can be updated, specify DYNAMIC SCROLL. Precompile the program again.
SQLCODE or SQLCODEs: -228
SQLSTATE or SQLSTATEs: 42620
SQL0231
Message Text: Position of cursor &1 not valid for FETCH of current row.
Cause Text: A FETCH CURRENT or a FETCH RELATIVE 0 was specified for scrollable cursor &1. The operation is not valid because the cursor is not positioned on a record. A FETCH of the current row is not allowed following a FETCH BEFORE, a FETCH AFTER, or a FETCH that resulted in an SQLCODE of +100.
Recovery Text: Ensure the cursor is positioned on a record before attempting to fetch the current row.
SQLCODE or SQLCODEs: -231
SQLSTATE or SQLSTATEs: 22006
SQL0237
Message Text: Not enough SQLVAR entries were provided in the SQLDA.
Cause Text: The SQLDA only provided &2 SQLVAR entries. Since at least one of the columns being described is a distinct type or a LOB, &3 SQLVAR entries should have been specified. None of the secondary SQLVAR entries have been set. Since at least one of the columns is a distinct type or a LOB, space should be provided for twice as many SQLVAR entries as the number of columns. Only the base SQLVAR entries have been set.
Recovery Text: If there is no need for the additional information about the distinct type(s) or LOB(s), then no action is required. If this information is needed, the value of the SQLN field in the SQLDA should be increased to the value indicated in the message, and the statement should be resubmitted.
SQLCODE or SQLCODEs: +237
SQLSTATE or SQLSTATEs: 01594
SQL0239
Message Text: Not enough entries were provided in the SQLDA or descriptor area.
Cause Text: The SQLDA or descriptor area only provided &1 entries. This is the number of SQLVAR entries for the SQLDA or the value of DB2_MAX_ITEMS for a descriptor area. At least &2 entries should have been specified. None of the entries have been set. For the SQLDA, if any of the columns is a distinct type or a LOB, then space should be provided for twice as many SQLVAR entries as the number of columns.
Recovery Text: For a descriptor, allocate more entries. For a SQLDA, if the distinct type or LOB information is needed, the value of the SQLN field should be increased to the value indicated in the message, and the statement should be resubmitted. If there is no need for the additional information about the distinct type(s) or LOB(s), then it is possible to resubmit the statement only providing enough SQLVAR entries to accommodate the number of columns.
SQLCODE or SQLCODEs: +239
SQLSTATE or SQLSTATEs: 01005
SQL0242
Message Text: Duplicate attribute name or partition name &1.
Cause Text: Attribute name &1 or partition name or partition number &1 was already specified. The value must be unique.
Recovery Text: Specify a unique name. Try the request again.
SQLCODE or SQLCODEs: -242
SQLSTATE or SQLSTATEs: 42713
SQL0243
Message Text: SENSITIVE cursor &1 cannot be defined for the specified SELECT statement.
Cause Text: The cursor &1 is defined as SENSITIVE but the query requires the creation of a temporary result table. If the SELECT statement has a data change table reference, it requires a temporary result table. A SENSITIVE cursor cannot be implemented.
Recovery Text: Redefine the cursor as ASENSITIVE or INSENSITIVE or change the query so that it no longer requires the creation of a temporary result table.
SQLCODE or SQLCODEs: -243
SQLSTATE or SQLSTATEs: 36001
SQL0245
Message Text: Invocation of function &1 is ambiguous.
Cause Text: The invocation of function &1 is ambiguous. Multiple candidate functions exist, but the parameters corresponding to argument &2 do not belong to the same data type precedence list.
Recovery Text: Change the arguments in the function invocation to avoid matching more than one function.
SQLCODE or SQLCODEs: -245
SQLSTATE or SQLSTATEs: 428F5
SQL0250
Message Text: Local relational database not defined in the directory.
Cause Text: One of the following has occurred:
  • Three part names were used and the relational database name is not defined in the relational database directory.
  • A connect was attempted and the relational database name is not defined in the relational database directory.
  • The SQL statement uses the CURRENT SERVER special register and the local relational database name is not defined in the relational database directory.
  • The SQL statement refers to a view which uses the CURRENT SERVER special register and the local relational database name is not defined in the relational database directory.
Recovery Text: Define the local relational database name using the Add Relational Database Directory Entry (ADDRDBDIRE) command.
SQLCODE or SQLCODEs: -250
SQLSTATE or SQLSTATEs: 42718
SQL0251
Message Text: Character in relational database name &1 not valid.
Cause Text: &1 contains either a #, @, ., or a $, which are not valid character for a relational database name. Valid characters include A-Z, 0-9, and underscore.
Recovery Text: Correct the name. Try the request again.
SQLCODE or SQLCODEs: -251
SQLSTATE or SQLSTATEs: 2E000, 42602
SQL0255
Message Text: Function not supported for query.
Cause Text: The reason code is &1:
  • 1 -- Scalar subselects and lateral correlation from a nested table expression are not allowed with distributed files.
  • 2 -- Error occurred while using a temporary distributed file.
  • 3 -- EXCEPT or INTERSECT not supported for this query.
  • 4 -- A sequence reference is not supported with distributed files.
  • 5 -- A recursive common table expression is not supported for this query.
  • 6 -- An OLAP function is not supported for this query.
  • 7 -- ORDER OF is not supported for this query.
  • 8 -- Scalar fullselect is not supported for this query.
  • 9 -- A distributed file is being processed in a multi-thread capable job or this is not the initial thread.
  • 10 -- Grouping sets are not supported for this query.
  • 11 -- Full outer join is not supported for this query.
  • 12 -- VALUES fullselect is not supported for this query.
  • 13 -- UTF-8 with non-ICU NLSS table is not supported for this query.
  • 14 -- OmniFind function is not supported for this query.
  • 15 -- Subselect ordering is not supported for this query.
  • 16 -- XML function is not supported for this query.
  • 17 -- Array variables are not supported for this query.
  • 18 -- Global variables are not supported for this query.
  • 19 -- Hierarchical query function is not supported for this query.
  • 20 -- VERIFY_GROUP_FOR_USER scalar function is not supported for this query.
  • 21 -- User-defined function default values are not supported for this query.
  • 22 -- FOR SYSTEM_TIME is not supported for this query.
  • 23 -- OFFSET or FETCH FIRST N ROWS is not supported for this query.
Recovery Text: Remove the unsupported function from the query.
SQLCODE or SQLCODEs: -255
SQLSTATE or SQLSTATEs: 42999
SQL0256
Message Text: Constraint &1 in &2 not allowed on distributed file.
Cause Text: Constraint &1 in &2 not allowed for one of the following reasons:

- The columns that make up the partitioning key must be a subset of the columns that make up the foreign key. The columns may appear in any order.

- The node group of the dependent table in a foreign key constraint must match the node group of the parent table.

Recovery Text: Ensure that every column that is in the partitioning key is also in the foreign key for the table. Also ensure that the dependent table and the parent table are built over the same nodegroup.
SQLCODE or SQLCODEs: -256
SQLSTATE or SQLSTATEs: 42998
SQL0270
Message Text: Function not allowed for table &1 in &2.
Cause Text: Table &1 in &2 is a distributed table or a partitioned table. The function is not allowed for one of the following reasons:

- The unique index or unique constraint is not allowed because all unique indexes or unique constraints of a distributed table or a partitioned table must contain all columns that make up the partitioning key. If this is a CREATE TABLE statement and the PARTITIONING KEY clause was not specified, then the default partitioning key is the first column of the primary key, or the first valid column of the table.

- Data in one of the partitioning key columns was changed by an UPDATE statement which would have forced the row to a different node.

- The table contains a LOB or XML column. LOB and XML columns are not allowed in a distributed table.

- The table contains a column with a generated expression.

- The node group of the materialized query table is different than the node group of one or more tables referenced by the materialized query table.

Recovery Text: Ensure that all unique indexes or unique constraints contain all the columns of the partitioning key. Ensure that data in the partitioning key columns is not changed, or is changed to a value that would reside on the same node. Ensure the table does not contain any LOB or XML columns or columns with generated expressions. Ensure that the materialized query table references tables within the same node group.
SQLCODE or SQLCODEs: -270
SQLSTATE or SQLSTATEs: 42997
SQL0301
Message Text: Input variable &2 or argument &1 not valid.
Cause Text: The value in relative position &1 in the statement is a type that is not compatible with the requested operation. The value is variable &2, entry &1 in a descriptor area, or argument &2 in a CALL statement. A name *N indicates that a user's descriptor area was used or that a constant or special register was specified on the CALL statement.
Recovery Text: Do one of the following and try the request again:
  • Use a variable that is the correct type.
  • Specify an argument in the CALL that is the correct type.
  • Change the type specified for parameter &1 in the DECLARE PROCEDURE statement.
SQLCODE or SQLCODEs: -301
SQLSTATE or SQLSTATEs: 07006, 42895
SQL0302
Message Text: Conversion error on variable or parameter &2.
Cause Text: Variable or parameter &2 or entry &1 in a descriptor area contains a value that cannot be converted to the attributes required by the statement. Error type &3 occurred. Error types and their meanings are:
  • 1 -- Overflow.
  • 2 -- Floating point overflow.
  • 3 -- Floating point underflow.
  • 4 -- Floating point conversion error.
  • 5 -- Not an exact result.
  • 6 -- Numeric data that is not valid.
  • 7 -- Double-byte character set (DBCS) or UTF-8 data that is not valid.
  • 8 -- C NUL-terminator is missing for character variables or double NUL-terminator is missing for graphic variables and the program was compiled with the *CNULRQD option.
  • 9 -- Truncation when mapping a variable or constant to a character or binary parameter on a CALL statement, or when using a character or graphic variable in a GET DESCRIPTOR or SET DESCRIPTOR statement.
  • 10 -- Incompatible conversion from the input SQLDATA value to the specified SQLTYPE in a REXX application.
  • 11 -- Overflow on translation of UTF-8 character data.

If the variable name is *N and the statement is FETCH, a descriptor area was specified. If the parameter name is *N and the statement is CALL, a descriptor area, a constant, or a special register was specified.

Recovery Text: Change the value of the variable or parameter or entry in the descriptor area so that it can be converted and is valid. Try the request again.
SQLCODE or SQLCODEs: -302
SQLSTATE or SQLSTATEs: 22001, 22003, 22023, 22024
SQL0303
Message Text: Variable &2 not compatible or value too long.
Cause Text: A value cannot be assigned to variable &2 because the data types are not compatible or the value is too long.
  • A FETCH, SELECT, CALL, SET, VALUES INTO, GET DIAGNOSTICS, GET DESCRIPTOR, SET DESCRIPTOR or function invocation cannot be performed because the data type of variable &2 is not compatible with the data type of the corresponding value.
  • For SQL routines, the SQL variable may not be long enough for the corresponding list item, or the SQL parameter or RETURNS data type may not be long enough for the output or RETURN value.
  • When selecting a date value, a character variable must be at least 6 bytes for a Julian date, at least 8 bytes for a date in the MDY, YMD, DMY formats, or at least 10 bytes for all other formats.
  • When selecting a time value, a character variable must be at least 8 bytes for a time in the USA format and at least 5 bytes for all other formats.
  • When selecting a timestamp value, a character variable must be at least 19 bytes.
  • If the variable is C NUL-terminated and the program was compiled with *CNULRQD option, then an additional byte is required for the NUL-terminator for date/time values.
  • For GET DIAGNOSTICS ALL, the variable must be varying length character or varying length graphic.

The relative position of the variable in the INTO clause, the SQLDA, or the CALL statement is &1. If the variable name is *N, a descriptor area was specified on a FETCH statement.

Recovery Text: Ensure that the data types are compatible for each of the corresponding list items. Ensure the variables are defined correctly for date, time, and timestamp values.
SQLCODE or SQLCODEs: -303
SQLSTATE or SQLSTATEs: 22001, 42806
SQL0304
Message Text: Conversion error in assignment to variable &2.
Cause Text: During an attempt to return a value to variable &2 on a FETCH, an embedded SELECT statement, a CALL statement, a SET statement, a SET DESCRIPTOR statement, or a VALUES INTO statement, error type &3 occurred. A list of the error types follows:
  • Error type 1 is overflow.
  • Error type 2 is floating point overflow.
  • Error type 3 is floating point underflow.
  • Error type 4 is a floating point conversion error.
  • Error type 5 is not an exact result.
  • Error type 6 is numeric data that is not valid.
  • Error type 7 is double-byte character set (DBCS) data that is not valid.

The relative position of the variable is &1. If the variable name is *N, a descriptor area was specified on the FETCH or CALL statement.

Recovery Text: Change the size and, if necessary, the type of the variable or entry in the descriptor area so that it can contain the result value or correct the data that is not valid. Try the request again.
SQLCODE or SQLCODEs: +304, -304
SQLSTATE or SQLSTATEs: 01515, 01547, 01565, 22003, 22023, 22504
SQL0305
Message Text: Indicator variable required.
Cause Text: A FETCH, embedded SELECT, CALL, GET DESCRIPTOR, or a SET or VALUES INTO statement has resulted in a null value, but an indicator variable was not specified for host variable &2. The relative position of the host variable in the INTO clause or parameter list is &1. If the host variable name is *N, a descriptor area was specified.

If this error occurs on a GET DESCRIPTOR statement, the null value is being returned but the INDICATOR item was not specified on the GET DESCRIPTOR statement.

Recovery Text: Specify an indicator variable, and precompile the program again.

If this is a GET DESCRIPTOR statement, specify both the DATA item and the INDICATOR item. Precompile the program again.

SQLCODE or SQLCODEs: -305
SQLSTATE or SQLSTATEs: 22002, 22004
SQL0306
Message Text: REXX input host variable &1 not defined.
Cause Text: The REXX input host variable &1 appears in an SQL statement, but it is not defined because a value has not been assigned to the variable.
Recovery Text: Verify that &1 is spelled correctly in the SQL statement and that a value is assigned to the host variable before the SQL statement is run.
SQLCODE or SQLCODEs: -306
SQLSTATE or SQLSTATEs: 42863
SQL0311
Message Text: Length in varying-length, LOB, or XML host variable not valid.
Cause Text: Host variable &2 was specified. The value in the length portion of the variable length, LOB, or XML host variable is either negative or greater than the declared length. If the host variable is graphic the length should be the number of DBCS characters. The host variable number is &1. The specified length is &4. The variable is declared to have length &3.
Recovery Text: Change the length portion of the varying-length, LOB, or XML host variable to a valid positive number or zero. Try the request again.
SQLCODE or SQLCODEs: -311
SQLSTATE or SQLSTATEs: 22501
SQL0312
Message Text: Variable &1 not defined or not usable.
Cause Text: The variable &1 appears in the SQL statement, but one of the following conditions exists:
  • No declaration for the variable exists or the declaration is not within the current scope.
  • The attributes are not correct for the use specified.
  • The host variable was specified in dynamic SQL. Host variables are not valid in dynamic SQL.
  • In REXX, host variable names cannot contain embedded blanks.
  • The variable name is used in the routine body of an SQL procedure or function, but the variable is not declared as an SQL variable or parameter. The scope of an SQL variable is the compound statement that contains the declaration.
  • The variable used in the SQL routine body is declared with CONSTANT and cannot be modified.
  • The variable is used in the routine body of an SQL trigger, but the variable is not declared as an SQL variable or the variable is an OLD transition variable and cannot be modified.
  • The variable is a transition variable in an AFTER trigger and is used in statement where the variable could be modified. Modifying transition variables in AFTER triggers is not allowed.
Recovery Text: Do one of the following and try the request again.
  • Verify that &1 is spelled correctly in the SQL statement.
  • Verify that the program contains a declaration for that variable. In RPG, the variable must be declared globally or in the scope where it is used.
  • Verify that the attributes of the variable are compatible with its use in the statement.
  • Use parameter markers in dynamic SQL instead of host variables.
  • Remove embedded blanks from REXX host variable names.
  • Declare the variable as an SQL variable or parameter in the SQL procedure or function.
  • Declare the variable as an SQL variable or specify a NEW transition variable when the variable is modified in an SQL trigger.
  • Remove the transition variable from the statement. Copying the transition variable to a local variable and then using the local variable in the statement is also acceptable.
SQLCODE or SQLCODEs: -312
SQLSTATE or SQLSTATEs: 42618
SQL0313
Message Text: Number of host variables not valid.
Cause Text: The number of host variables or entries in an SQLDA or descriptor area specified in either an EXECUTE or OPEN statement is not the same as the number of parameter markers specified in the prepared SQL statement &1. If the statement name is *N, the number of host variables or entries in a SQLDA or descriptor area was specified in an OPEN statement and is not the same as the number of host variables specified in the DECLARE CURSOR statement for cursor &2.
Recovery Text: Change the number of host variables specified in the USING clause or the number of entries in the SQLDA or descriptor area to equal the number of parameter markers in the prepared SQL statement or the number of host variables in the DECLARE CURSOR statement. Precompile the program again.
SQLCODE or SQLCODEs: -313
SQLSTATE or SQLSTATEs: 07001, 07004
SQL0326
Message Text: Too many variables specified.
Cause Text: &1 variables were specified on the FETCH, embedded SELECT, SET, or VALUES INTO statement, but only &2 columns were returned from the query. Extra global variables will not be changed. Extra host variables will be filled with the appropriate value for the specified type:
  • Character host variables will be filled with blanks.
  • Binary host variables will be filled with hex zeros.
  • Date host variables will be filled with the current date.
  • Time host variables will be filled with the current time.
  • Timestamp host variables will be filled with the current timestamp.
  • Graphic host variables will be filled with double-byte, UCS-2, or UTF-16 blanks.
  • Varying-length character, varying-length graphic, varying-length binary, CLOB, DBCLOB, BLOB, and XML host variables will be set to a length of 0.
  • C NUL-terminated character host variables will have a NUL-terminator set into the first character position.
  • C NUL-terminated graphic host variables will have a double NUL-terminator set into the first DBCS character position.
  • Numeric host variables will be set to a value of 0.
  • REXX host variables will be defaulted to variable length character with the length set to 0.
Recovery Text: No recovery is necessary.
SQLCODE or SQLCODEs: +326
SQLSTATE or SQLSTATEs: 01557
SQL0327
Message Text: Partitioning key does not correspond to a defined partition.
Cause Text: An INSERT, UPDATE, CREATE TABLE, or ALTER TABLE statement was attempted for a partitioned table but the values supplied for the partitioning key did not qualify the row for any partition.
Recovery Text: If the error occurred on an INSERT or UPDATE statement, change the values supplied for the row being inserted or updated so that they correspond to a partition of the table or alter the partition definition to allow this key value. If the error occurred on a CREATE TABLE or ALTER TABLE statement, alter the partition definitions so that all existing rows will fit in the table or delete the rows which do not fit. Try the request again.
SQLCODE or SQLCODEs: -327
SQLSTATE or SQLSTATEs: 22525
SQL0328
Message Text: Column &1 not allowed in partitioning key.
Cause Text: Column &1 is not allowed to be part of the partitioning key. If the column name is *N, then there are no valid columns for use as the default partitioning key for DB2 Multisystem partitioning. For RANGE partitioning, columns of type LOB, XML, ROWID, and DATALINK are not allowed in the partitioning key. For HASH partitioning, columns of type DATE, TIME, TIMESTAMP, FLOAT, LOB, XML, ROWID, and DATALINK are not allowed in the partitioning key. The column cannot be a user defined type based on any of these types. It cannot be defined as an identity column or a row change timestamp column, and cannot have a field procedure.
Recovery Text: Remove the column from the list of partitioning key columns, or change the data type of the column.
SQLCODE or SQLCODEs: -328
SQLSTATE or SQLSTATEs: 42996
SQL0329
Message Text: The SET PATH name list is not valid.
Cause Text: String constant or variable &1 contains a SET PATH name list that is not valid. A variable name *N indicates that an incorrect string constant was specified on the SET PATH statement or for the SQLPATH on the SET OPTION statement. The name list must have the following attributes:
  • The length must be greater than 0.
  • The length cannot be greater than 8843.
  • It must contain a list of valid schema names, separated by commas.
  • The list can contain a maximum of 268 schema names.
  • Each schema name must be capitalized unless it is a delimited name.
  • The list cannot contain the special values *LIBL, CURRENT PATH, SYSTEM PATH, or CURRENT USER.
  • The string for SQLPATH on the SET OPTION statement must contain only system schema names.
Recovery Text: Use a string constant or variable with the correct value.
SQLCODE or SQLCODEs: -329
SQLSTATE or SQLSTATEs: 0E000
SQL0330
Message Text: Character conversion cannot be performed.
Cause Text: An attempt was made to convert column or host variable &2 to column or host variable &3. The conversion cannot be performed. If the source data is character and has a mixed Coded Character Set Identifier (CCSID), then double-byte characters were found. These mixed data conversions are only allowed if the source data does not contain any double-byte data. If the data is graphic, the CCSID values are not compatible or the string contains single-byte characters. The source CCSID is &4, and the target CCSID is &5.
Recovery Text: Ensure that all character or graphic comparison, concatenation, or assignment is between columns or host variables with compatible CCSID values. If character data and the source CCSID is mixed, the source data should not contain any double-byte characters. If graphic data, the string cannot contain single-byte characters. Use a casting function like VARCHAR to convert between character, DBCS graphic, and Unicode graphic data.
SQLCODE or SQLCODEs: -330
SQLSTATE or SQLSTATEs: 22021
SQL0331
Message Text: Character conversion cannot be performed.
Cause Text: An attempt was made to convert column or host variable &2 to column or host variable &3. The conversion cannot be performed. If the source data is character and has a mixed Coded Character Set Identifier (CCSID), then double-byte characters were found. Mixed CCSID character conversions are only allowed if the source data does not contain any double-byte data. If the data is graphic, the CCSID values are not compatible. The source CCSID is &4, and the target CCSID is &5.
Recovery Text: Ensure that all character or graphic assignments are between columns or host variables with compatible CCSID values. If character and the source CCSID is mixed, the source data should not contain any double-byte characters. Use a casting function like VARCHAR to convert between character, DBCS graphic, and UCS-2 and UTF-16 graphic data.
SQLCODE or SQLCODEs: +331, -331
SQLSTATE or SQLSTATEs: 01520, 22021
SQL0332
Message Text: Character conversion between CCSID &1 and CCSID &2 not valid.
Cause Text: Character or graphic conversion has been attempted for data that is not compatible. There is no conversion defined between CCSID &1 and CCSID &2.

If one CCSID is 65535, the other CCSID is a graphic CCSID. Conversion is not defined between 65535 and a graphic CCSID.

If this is a CONNECT statement, conversion is not defined between the default application requester SBCS CCSID and the application server SBCS CCSID. If the second CCSID is 0, the application server did not return its default SBCS CCSID. An application server other than DB2 for IBM i may not support a CCSID of 65535.

Recovery Text: Ensure that all character or graphic comparisons, concatenation, or assignments are between columns or host variables with compatible CCSID values.

If this is a CONNECT statement, change either the SBCS CCSID of the application requester or the application server, so conversion between the CCSID values is defined.

SQLCODE or SQLCODEs: -332
SQLSTATE or SQLSTATEs: 57017
SQL0334
Message Text: Character conversion resulted in truncation.
Cause Text: Character conversion of column or host variable &2 has resulted in truncation. An attempt was made to convert mixed ASCII data to mixed EBCDIC data or to convert UCS-2 or UTF-16 graphic data to mixed EBCDIC data. The length of the data has increased due to the insertion of shift characters. The resulting string did not fit in the target, and truncation occurred.
Recovery Text: When converting from mixed ASCII to mixed EBCDIC or from UCS-2 or UTF-16 graphic to mixed EBCDIC, ensure that there is enough space in the target.
SQLCODE or SQLCODEs: -334
SQLSTATE or SQLSTATEs: 22524
SQL0335
Message Text: Character conversion resulted in substitution characters.
Cause Text: Character column or host variable &2 has been converted to character column or host variable &3. The conversion defines that several different character values in the source data will translate to the same value in the target data. It will no longer be possible to separate these values. The CCSID of the source data is &4 and the CCSID of the target is &5. Host variable values of *N or CCSID values of 0 indicate the values are unknown.
Recovery Text: Change the definition of the columns or host variables so that CCSID values that are used will allow all character values in the source to be converted to character values in the target.
SQLCODE or SQLCODEs: +335
SQLSTATE or SQLSTATEs: 01517
SQL0336
Message Text: Identity or sequence attribute is not valid.
Cause Text:

For an identity column or a sequence, the values specified for the START WITH, INCREMENT BY, MINVALUE, MAXVALUE, and RESTART WITH options must have a scale of zero.

Recovery Text: Change the value to one that is valid. Try the request again.
SQLCODE or SQLCODEs: -336
SQLSTATE or SQLSTATEs: 428FA
SQL0338
Message Text: JOIN predicate or MERGE ON clause not valid.
Cause Text: The JOIN predicate, or ON clause of a MERGE statement, is not valid because a column is specified that exists in a table that is outside the scope of the join predicate or ON clause. The scope is generally determined from left to right but is also based on the position of the join-condition. If parentheses are used, columns inside the parentheses cannot come from a table outside the parentheses. If an implicit join (using a comma) is specified prior to a joined table with an ON clause, columns in the ON clause cannot come from a table before the comma.
Recovery Text: Do one of the following and try the request again:
  • Make certain that the column names, table names, and any qualifiers are specified correctly.
  • Specify parentheses around joined tables to specify a join order other than left to right. Ensure columns exist in tables that are in the same scope.
  • For an ON clause in a MERGE statement, ensure referenced columns are within the scope of the ON clause.
  • Specify a CROSS JOIN instead of an implicit join.
SQLCODE or SQLCODEs: -338
SQLSTATE or SQLSTATEs: 42972
SQL0340
Message Text: Duplicate name &1 for common table expressions.
Cause Text: Name &1 cannot be used to define more than one table expression.
Recovery Text: Change the name for one of the common table expressions. Try the request again.
SQLCODE or SQLCODEs: -340
SQLSTATE or SQLSTATEs: 42726
SQL0341
Message Text: Cyclic references between common table expressions.
Cause Text: The common table expressions specified are not valid. The subselect for table &1 refers to table &2 and the subselect for table &2 refers to table &1. Cyclic references between common table expressions are not allowed.
Recovery Text: Change the common table expressions to refer to a table that exists or a common table expression that has already been defined. Try the request again.
SQLCODE or SQLCODEs: -341
SQLSTATE or SQLSTATEs: 42835
SQL0342
Message Text: Keyword not allowed in recursive common table expression &1.
Cause Text: The common table expression &1 is recursive. The recursive common table expression contains one of the following errors:
  • A fullselect within the common table expression cannot start with SELECT DISTINCT because the common table expression is recursive.
  • A fullselect within the common table expression specified UNION instead of UNION ALL as required for recursive common table expressions.
Recovery Text: Remove the keyword DISTINCT from the fullselect. Change the UNION to UNION ALL, or remove the recursive reference within the common table expression. Try the request again.
SQLCODE or SQLCODEs: -342
SQLSTATE or SQLSTATEs: 42925
SQL0343
Message Text: Column list not valid for table.
Cause Text: For a recursive common table expression:
  • The column name list must be specified following the table name of the common table expression. &1 is the common table expression name.
  • The sequence column name and the set cycle column name cannot be referenced in the column list of the recursive common table expression. &1 is the sequence column name or the set cycle column name.
Recovery Text: Correct the recursive common table expression. Try the request again.
SQLCODE or SQLCODEs: -343
SQLSTATE or SQLSTATEs: 42908
SQL0345
Message Text: Recursive common table expression &1 is not valid.
Cause Text: The recursive common table expression is not valid for one of the following reasons:
  • The initialization fullselect of the common table expression cannot refer to itself.
  • Grouping, aggregate functions, and ORDER BY are not allowed within the fullselects of the UNION that define the common table expression.
  • EXCEPT DISTINCT is not allowed if the common table is specified as the right operand of a join.
  • LEFT OUTER JOIN and FULL OUTER JOIN are not allowed if the common table is specified as the right operand of the join.
  • RIGHT OUTER JOIN and FULL OUTER JOIN are not allowed if the common table is specified as the left operand of the join.
  • The common table expression cannot be referenced more than once in a FROM clause and cannot be referenced in a subquery.
Recovery Text: Correct the recursive common table expression. Try the request again.
SQLCODE or SQLCODEs: -345
SQLSTATE or SQLSTATEs: 42836
SQL0346
Message Text: Recursion not allowed for common table expressions.
Cause Text: The common table expression specified is not valid. The subselect for table &1 refers to itself. Recursive common table expressions are not allowed.
Recovery Text: Change the common table expressions to refer to a table that exists or a common table expression that has already been defined. Try the request again.
SQLCODE or SQLCODEs: -346
SQLSTATE or SQLSTATEs: 42836
SQL0348
Message Text: &1 expression not used correctly.
Cause Text: The &1 sequence expression for &2 in &3 is not allowed. A NEXT VALUE or PREVIOUS VALUE sequence expression cannot be specified:
  • In a CREATE VIEW, CREATE TABLE, ALTER TABLE, or CREATE INDEX statement.
  • In a CREATE FUNCTION statement.
  • In a CHECK constraint.
  • In the XMLTABLE function.

A PREVIOUS VALUE expression cannot be specified in a CREATE TRIGGER statement.

A NEXT VALUE expression can only be specified:

  • In the SELECT clause of the outermost SELECT. It cannot be used if the outermost SELECT uses the DISTINCT keyword, contains a GROUP BY, ORDER BY, or OFFSET clause, or is part of a fullselect. It cannot be used in a CASE expression or a START WITH or CONNECT BY clause.
  • In the SELECT clause of the outermost SELECT of a common table expression. It cannot be used if the outermost SELECT uses the DISTINCT keyword, contains a GROUP BY or ORDER BY clause, or is part of a fullselect.
  • As an expression in the SET clause of an UPDATE. It cannot be used in a subselect in the SET clause of an UPDATE.
  • As an INSERT value in either the VALUES clause or in the SELECT clause of the fullselect.
  • As a value in an SET or VALUES statement.
Recovery Text: Remove the NEXT VALUE or PREVIOUS VALUE expression.
SQLCODE or SQLCODEs: -348
SQLSTATE or SQLSTATEs: 428F9
SQL0350
Message Text: Column &1 not valid.
Cause Text: One of the following errors has occurred:
  • A LOB, DataLink, or XML column is not valid as a key field, the key of an index, or the foreign key of a referential constraint.
  • A LOB or XML column is not allowed in the WHERE clause of an index.
  • A DataLink column with the FILE LINK CONTROL option cannot be in a table in QTEMP, QSYS, QSYS2, or SYSIBM, or in a temporary table.
  • A column that is a LOB, ROWID, DataLink, or XML type or a distinct type based on a LOB, ROWID, Datalink, or XML type is not valid as a partitioning key column for RANGE partitioning. A partitioning key column cannot be defined AS IDENTITY.
Recovery Text: Remove the LOB, DataLink, or XML column from the specification of the table, index, key, or constraint.
SQLCODE or SQLCODEs: -350
SQLSTATE or SQLSTATEs: 42962
SQL0351
Message Text: The AR is not at the same level and DB2 cannot transform the data type to a compatible type.
Cause Text: The data type of entry &1 is not supported on the Application Requester. The usual cause it that the Application Requester is at less than Level 6 for the SQL Access Manager, and the Application Server cannot transform the data type to a compatible type. It can also mean that an attempt was made to use SQLCI (SQL Client Integration) with an unsupported data type such as BLOB or DataLink. It can also mean an array variable has been passed in an SQLDA.
Recovery Text: Change the data type to one that is supported by the corresponding Application Requester or SQLCI.
SQLCODE or SQLCODEs: -351
SQLSTATE or SQLSTATEs: 56084
SQL0352
Message Text: The AS is not at the same level and DB2 cannot transform the data type to a compatible type.
Cause Text: The data type of entry &1 is not supported on the Application Server. The Application Server is at less than Level 6 for the SQL Access Manager, and the Application Requester cannot transform the data type to a compatible type.
Recovery Text: Change the data type to one that is supported by the corresponding Application Server.
SQLCODE or SQLCODEs: -352
SQLSTATE or SQLSTATEs: 56084
SQL0356
Message Text: Index expression &1 not valid.
Cause Text: Index expression &1 is not valid. If the expression number is 0, either the expression is referenced in the WHERE clause or INCLUDE clause, or the index key column number is not known. The expression is not valid for one of the following reasons:
  • The expression does not reference a column.
  • The expression refers to a special register or global variable.
  • The expression contains a subselect.
  • The expression contains ROW CHANGE TIMESTAMP or ROW CHANGE TOKEN.
  • The expression uses an aggregate function (such as AVG or COUNT), a function that is not deterministic, a user-defined function, or a system function that is not allowed.
  • The expression uses the NODENAME, DBPARTITIONNAME, DATAPARTITIONNAME, or DATAPARTITIONNUM scalar function.
  • The expression involves LOBs or XML.
  • The expression refers to a column that has a field procedure.
Recovery Text: Correct the error. Try the request again.
SQLCODE or SQLCODEs: -356
SQLSTATE or SQLSTATEs: 429BX
SQL0357
Message Text: File server &1 used in DataLink not currently available.
Cause Text: Server &1 in the URL of the DataLink value is not available for reason code &2. The reason codes are as follows:
  • 1 The file server in a Datalink value is not available.
  • 2 The database server, instance, or database from which the operation was attempted is not registered with the file server.
  • 3 Restart recovery is pending or is in progress on a file server involved in the operation.
  • 4 The file server in a Datalink value is registered with the database but is an unknown server.
Recovery Text: Verify that the server is running and can be accessed. Try the request again.
SQLCODE or SQLCODEs: -357
SQLSTATE or SQLSTATEs: 57050
SQL0358
Message Text: Error &1 occurred using DataLink data type.
Cause Text: An error occurred while using a DataLink. Possible errors are:
  • Error type 21 is format of DataLink value not valid.
  • Error type 22 is the DataLink File Manager (DLFM) is not properly configured on the server.
  • Error type 23 is link type not valid.
  • Error type 24 is file does not exist.
  • Error type 25 is file already linked.
  • Error type 26 is file not available.
  • Error type 27 is length of comment or URL not valid.
  • Error type 28 is user not authorized to link the file.
  • Error type 29 is datalink cannot be unlinked.
Recovery Text: Correct that error in the DataLink and try the request again. For error type 22, it may be that the host database or the prefix have not been added to the DLFM on the server. If that is the case, use the commands Add Host Database to DLFM (ADDHDBDLFM) or Add Prefix to DLFM (ADDPFXDLFM) to correct the error.
SQLCODE or SQLCODEs: -358
SQLSTATE or SQLSTATEs: 428D1
SQL0359
Message Text: Value for identity column or sequence not available.
Cause Text: The value for the identity column or sequence is not available for one of the following reasons:
  • The INSERT or UPDATE statement cannot be run because all values for the identity column have already been assigned.
  • The NEXT VALUE expression cannot be evaluated because all values for the sequence have already been assigned.
Recovery Text: For identity columns, alter the column to allow a larger range of values for the identity column or alter the column to allow for cycling of identity values. For sequences, alter the sequence to allow a larger range of values or to allow cycling of the sequence.
SQLCODE or SQLCODEs: -359
SQLSTATE or SQLSTATEs: 23522
SQL0360
Message Text: DataLink in table &1 in &2 may not be valid due to pending links.
Cause Text: Table &1 in schema &2 has DataLinks in link pending mode. While the DataLink can be retrieved using FETCH or SELECT INTO, the DataLink may not be valid because the table has DataLinks in link pending mode.
Recovery Text: Verify that the value retrieved is a valid URL. The command WRKPFDL (Work with Physical File DataLinks) can be used to determine which tables have DataLinks in link pending mode.
SQLCODE or SQLCODEs: +360
SQLSTATE or SQLSTATEs: 01627
SQL0362
Message Text: Flagging detected an error in the current SQL statement.
Cause Text: The SQL statement contains syntax that is not standard at position &1.
Recovery Text: See previous messages in the job log for a more complete description of the error. If conformance to the standard is needed, change the statement to conform and try the request again.
SQLCODE or SQLCODEs: +362
SQLSTATE or SQLSTATEs: 0168I
SQL0363
Message Text: Extended indicator variable value for item &1 not valid.
Cause Text: The value of the extended indicator variable for item &1 was not within the range of acceptable values. The value must be positive or in the range of 0 to -7 inclusive.
Recovery Text: Change the value of the extended indicator variable to one which is allowed for the statement or context in which it was used. Try the request again.
SQLCODE or SQLCODEs: -363
SQLSTATE or SQLSTATEs: 22010
SQL0364
Message Text: DECFLOAT exception &1 during arithmetic operation or assignment.
Cause Text: The exception error &1 occurred while doing an addition, subtraction, multiplication, division, negation, or built-in function operation on a column whose data type is DECFLOAT. Overflow and underflow exceptions may also occur on assignment to a DECFLOAT column. The possible exception types are:
  • 1 - underflow.
  • 2 - overflow.
  • 3 - inexact result.
  • 4 - operand not valid.
  • 5 - division by zero.
  • 6 - subnormal value.
Recovery Text: Examine the expression for which the warning occurred to see if the cause of the problem can be determined. The problem may be data-dependent. Execution of the statement continues.
SQLCODE or SQLCODEs: +364
SQLSTATE or SQLSTATEs: 0168C, 0168D, 0168E, 0168F, 0168G
SQL0365
Message Text: Use of extended indicator variable value for item &1 not valid.
Cause Text: The value of DEFAULT or UNASSIGNED was used for an extended indicator variable for item &1 in a context in which it is not allowed. These values are only allowed in INSERT, MERGE, and UPDATE statements.
Recovery Text: Change the extended indicator variable to an allowable value for the context in which it was used. Try the request again.
SQLCODE or SQLCODEs: -365
SQLSTATE or SQLSTATEs: 22539
SQL0372
Message Text: Data type or attribute for column &1 already defined for table.
Cause Text: Column &1 cannot be created in table &2 in &3 because column &4 has already been defined. There can be at most one IDENTITY column, one ROWID column, one ROW CHANGE TIMESTAMP column, one ROW BEGIN column, one ROW END column, and one TRANSACTION START ID column defined in a table.
Recovery Text: Remove one of the columns or change the attributes so that only a single column is defined with each of these attributes. Try the request again.
SQLCODE or SQLCODEs: -372
SQLSTATE or SQLSTATEs: 428C1
SQL0373
Message Text: DEFAULT cannot be specified for column &1.
Cause Text: One of the following has occurred:
  • The DEFAULT clause is specified for a ROWID column, a generated column, or an XML column on the CREATE TABLE or ALTER TABLE statement.
  • A SET statement is specified in an SQL trigger that assigns DEFAULT to an IDENTITY column, a ROWID column, an XML column, or a ROW CHANGE TIMESTAMP column that was defined as GENERATED BY DEFAULT.
  • The ON INSERT VIOLATION clause for a check constraint cannot set a column to DEFAULT if the column does not have a default value.
Recovery Text: Remove the DEFAULT clause from the definition of the column or change the statement so it does not assign a value of DEFAULT. Try the request again.
SQLCODE or SQLCODEs: -373
SQLSTATE or SQLSTATEs: 42623
SQL0385
Message Text: SQL routine &1 in &2 created with assignment to SQLCODE or SQLSTATE.
Cause Text: SQL routine &1 in schema &2 was created, but contains an assignment statement that specifies the SQLCODE or SQLSTATE variable as the target. Assignment statements that modify SQLCODE and SQLSTATE only change the value in the variable, the error or warning is not signaled.
Recovery Text: No recovery is necessary. If the intent was to signal an error or warning, specify the SIGNAL or RESIGNAL statement instead of the assignment.
SQLCODE or SQLCODEs: +385
SQLSTATE or SQLSTATEs: 01643
SQL0387
Message Text: No additional result sets returned.
Cause Text: Procedure &1 in &2 was defined to return a maximum number of &4 result sets. The procedure returned &3 result sets.
Recovery Text: None.
SQLCODE or SQLCODEs: +387
SQLSTATE or SQLSTATEs: 02001
SQL0390
Message Text: Use of function &1 in &2 not valid.
Cause Text: Use of function &1 in schema &2 is not valid. The specific name is &3. One of the following has occurred:
  • A table function was specified in a clause other than the FROM clause.
  • A function was specified in the FROM clause but the function is not a table function.
  • A table function was specified as a source function in a CREATE FUNCTION statement.
  • UNNEST was specified but is only allowed in SQL procedures and functions.
  • WITH RETURN was specified for a cursor that has a function with an array result in the select-list.
  • ARRAY_AGG, XMLAGG, or GROUPING aggregate function or a sourced function was used in an OLAP specification.
Recovery Text: Remove the function from the clause or change the function name, arguments, or path so that a different function is found. Try the request again.
SQLCODE or SQLCODEs: -390
SQLSTATE or SQLSTATEs: 42887
SQL0391
Message Text: Table function cannot be argument of function &1.
Cause Text: The table designator for a table function cannot be used as the argument of function &1 in schema &2.
Recovery Text: Use a table designator that does not represent a table function as the argument of this function. Try the request again.
SQLCODE or SQLCODEs: -391
SQLSTATE or SQLSTATEs: 42881
SQL0392
Message Text: Assignment of LOB or XML to specified host variable not allowed.
Cause Text: The target host variable for all fetches of this LOB or XML value for cursor &1 must be a locator, a LOB host variable, or an XML host variable.
Recovery Text: Change the target of this fetch to either a LOB or XML host variable or a LOB or XML locator to be consistent with other fetches for this cursor. If it is necessary to use both host variables and locators as targets for this fetch, use the *NOOPTLOB compiler option.
SQLCODE or SQLCODEs: -392
SQLSTATE or SQLSTATEs: 42855
SQL0393
Message Text: Value specified for condition or diagnostic is not valid.
Cause Text: The value specified for the DIAGNOSTICS SIZE on the SET TRANSACTION statement is out of range, or the condition number specified on the GET DIAGNOSTICS statement is greater than the number of conditions available for the previous SQL statement.
Recovery Text: Specify a correct value.
SQLCODE or SQLCODEs: -393
SQLSTATE or SQLSTATEs: 35000
SQL0398
Message Text: AS LOCATOR can only be specified for a LOB or XML parameter.
Cause Text: AS LOCATOR is only allowed for LOB or XML parameters and return values of a procedure or function. AS LOCATOR is not allowed for arrays. AS LOCATOR was specified for parameter or return value &1.
Recovery Text: Use AS LOCATOR only for a LOB or XML parameter or return value of a procedure or function.
SQLCODE or SQLCODEs: -398
SQLSTATE or SQLSTATEs: 428D2
SQL0399
Message Text: Value for ROWID column &1 not valid.
Cause Text: The INSERT or UPDATE statement cannot be run because the value specified for ROWID column &1 is not valid.
Recovery Text: Remove column &1 from the column list or specify a valid ROWID value or DEFAULT for column &1.
SQLCODE or SQLCODEs: -399
SQLSTATE or SQLSTATEs: 22511
SQL0401
Message Text: Comparison operator &1 operands not compatible.
Cause Text: The operands of comparison operator &1 are not compatible.
  • Numeric operands are compatible with any other numeric operands and with character and graphic operands.
  • Character operands are compatible with operands that are character, graphic, date, time, timestamp, or numeric.
  • Date, time, and timestamp operands are compatible with character and graphic operands or with another operand of the same type. Date and timestamp operands are also compatible.
  • Graphic operands are compatible with graphic, character, date, time, timestamp, or numeric operands.
  • Binary operands are compatible only with binary operands.
  • Operands that are user-defined types can only be compared to operands that are the same exact type.
  • DataLink operands cannot be compared.
  • XML operands cannot be compared.
Recovery Text: Check the data types of all operands to see if the data types are compatible. If all the operands of the SQL statement are correct and a view is being accessed, then check the data types of all the operands in the view definition. Correct the errors. Try the request again.
SQLCODE or SQLCODEs: -401
SQLSTATE or SQLSTATEs: 42818
SQL0402
Message Text: &1 use not valid.
Cause Text: An operand has been specified for the arithmetic function or operator &1 that is not valid.
  • User-defined types cannot be specified as operands of operators or scalar functions. User-defined types can only be specified with operators and within user-defined functions created specifically for that type.
  • The operand of DIGITS can be any numeric or numeric compatible type except floating-point or decimal floating-point.
  • The operand of SMALLINT, FLOAT, REAL, DOUBLE or DOUBLE_PRECISION, and DECFLOAT cannot be date, time, or timestamp.
  • The other functions or operators require numeric or numeric compatible operands.
Recovery Text: Ensure all operands of function or operator &1 are valid. Correct the operands. Try the request again.
SQLCODE or SQLCODEs: -402
SQLSTATE or SQLSTATEs: 42819
SQL0403
Message Text: Alias &1 in &2 created but table or view not found.
Cause Text: The alias &1 was created in &2, but the referenced table or view, &3 in &4, could not be found.
Recovery Text: The alias was created, but cannot be used until &3 in &4 is created.
SQLCODE or SQLCODEs: +403
SQLSTATE or SQLSTATEs: 01522
SQL0404
Message Text: Value for column or variable &1 too long.
Cause Text: An INSERT, UPDATE, MERGE, SET, VALUES INTO, or GET DIAGNOSTICS statement specifies a value that is longer than the maximum length string that can be stored in &1. The length of &1 is &2 and the length of the string is &3.
Recovery Text: Reduce the length of the string from &3 to a maximum of &2 and try the request again.
SQLCODE or SQLCODEs: -404
SQLSTATE or SQLSTATEs: 22001
SQL0405
Message Text: Numeric constant &1 out of range.
Cause Text: The numeric constant beginning &1 is out of range.
  • Decimal and integer constants may contain a maximum of 63 significant digits. The range allowed for a floating point literal is +/- 1 * 10**-6176 to +/- 9.999999999999999999999999999999999 * 10**6144.
  • In a SELECT or DECLARE CURSOR statement, 0 is not valid for the number of rows in the OPTIMIZE clause.
  • The INCREMENT BY value must be an integer value.
  • Identity column and sequence attribute constants must be values that can be assigned to the identity column or sequence.
Recovery Text: Ensure all numeric constants are within the range allowed for the data type and conform to the values allowed for their specific use. Try the request again.
SQLCODE or SQLCODEs: -405
SQLSTATE or SQLSTATEs: 42820
SQL0406
Message Text: Conversion error on assignment to column &2.
Cause Text: During an attempt to assign a value to column &2 with an INSERT, UPDATE, ALTER TABLE, or REFRESH TABLE statement, conversion error type &3 occurred. If precompiling, the error occurred when converting a numeric constant to the same attributes as column &2. A list of the error types follows:
  • Error type 1 is overflow.
  • Error type 2 is floating point overflow.
  • Error type 3 is floating point underflow.
  • Error type 4 is a floating point conversion error.
  • Error type 5 is not an exact result.
  • Error type 6 is numeric data that is not valid.
  • Error type 7 is DBCS data that is not valid.
Recovery Text: Change the statement so that the result value fits in column &2 and is valid, or create the table or view again, specifying a new type or length for column &2 so that the result value can be assigned.
SQLCODE or SQLCODEs: -406
SQLSTATE or SQLSTATEs: 22003, 22023, 22504
SQL0407
Message Text: Null values not allowed in column or variable &5.
Cause Text: One of the following has occurred:
  • Column &5 is a target column in an UPDATE, INSERT, or MERGE statement for table &3 in &4. Either a null value was specified to be inserted or updated into this column or a value for the column was not specified in an INSERT and the column does not allow null values. The null value was specified in the relative entry number &6 in the VALUES list, select list, or SET clause.
  • Column &5 is specified in an ALTER statement for table &3 in &4. The attribute of column &5 can not be changed to NOT NULL because a null value exists in relative entry number &6 of the column.
  • Variable &5 is a target variable in an SQL procedure, function, or trigger. A null value was specified to be set into this variable using a SET or VALUES statement, but the variable does not allow null values. The null value was specified in relative entry number &6 in the SET or VALUES INTO clause.

The null value was specified as either NULL, a host variable with an associated indicator variable that contains a negative value, a column containing a null value, or an expression that evaluated to NULL. If it is a host variable or column then the name is &7.

The null value for a column may be disallowed by a CHECK constraint that was added implicitly to enforce the NOT NULL attribute of the column specified on the CREATE or ALTER of the column.

The null value for a column may be disallowed by a CHECK constraint that was added implicitly to enforce the partitioning key attributes of the column specified for the base table on the CREATE TABLE or ALTER TABLE statement.

Recovery Text: If this is an ALTER TABLE statement, change the existing null values in the column to a non-null value. Otherwise, change the value so the result is not null. If a host variable is specified, change the value in the related indicator variable to be greater than or equal to zero. Try the request again.
SQLCODE or SQLCODEs: -407
SQLSTATE or SQLSTATEs: 23502
SQL0408
Message Text: Value for column, variable, or parameter &1 not compatible.
Cause Text: The data type of the source value is not compatible with the data type of the target column, variable, or parameter &1. If the statement is INSERT or UPDATE, &1 is a column in table &2 in schema &3.
  • Any numeric type value can be assigned to any numeric, character, or graphic type.
  • Any character or graphic value can be assigned to any character, graphic, or numeric type.
  • Any binary value can be assigned to any binary type.
  • A date, time, or timestamp value can be assigned to any character or graphic type.
  • Any character or graphic value can be assigned to a date, time, or timestamp type.
  • A date value can be assigned to a date or timestamp.
  • A time value can be assigned to a time.
  • A timestamp value can be assigned to a date, time, or timestamp.
  • A value being assigned to a user-defined type must be promotable to the source type.
  • The DLVALUE function must be specified when assigning to a DataLink.
  • An XML value can only be assigned to an XML type.
  • A result set locator value can be assigned to a result set locator.
Recovery Text: Change the value assigned to &1 to one that is compatible. Try the request again.
SQLCODE or SQLCODEs: -408
SQLSTATE or SQLSTATEs: 42821
SQL0410
Message Text: Floating point literal &1 not valid.
Cause Text: The number of characters in the floating point constant &1 cannot exceed 42 excluding leading zeros. The number of digits in the first number cannot exceed 34 excluding leading zeros, and the number of digits in the second number cannot exceed 4.
Recovery Text: Correct the indicated literal &1. Make certain that the floating point literal is in the correct form shown by the following examples: +1.2E+3, 15E1, 2.E5, 2.2e-1, +5.E+2, -.1e1. Try the request again.
SQLCODE or SQLCODEs: -410
SQLSTATE or SQLSTATEs: 42820
SQL0412
Message Text: Subselect with more than one result column not valid.
Cause Text: The subselect of a predicate must have only one result column specified when the other operand of the predicate is a single expression. The result of the subselect can be zero, one, or many rows to form a list, but it must have only one result column.
Recovery Text: Change the number of items returned by the subselect so only one result column is specified or change the other operand of the predicate to be a list of expressions.
SQLCODE or SQLCODEs: -412
SQLSTATE or SQLSTATEs: 42823
SQL0413
Message Text: Numeric data type conversion failed.
Cause Text: An overflow or underflow condition occurred when converting from one numeric type to another.
Recovery Text: Make sure numeric values used in the statement are within the range allowed. An OFFSET or FETCH FIRST clause requires a bigint value.
SQLCODE or SQLCODEs: -413
SQLSTATE or SQLSTATEs: 22003
SQL0414
Message Text: Operand not valid in LIKE predicate.
Cause Text: Operand 1 of a LIKE predicate has a type of date, time, timestamp, or DataLink or is a user-defined type. Operands specified in LIKE predicates must be binary, character, graphic, or numeric. If the ESCAPE character is specified, operand 1 cannot be DBCS-only. If the operand is a column, the column name is &1.
Recovery Text: Change operand 1 of the LIKE predicate to be a binary, character, graphic, or numeric type. Use a different predicate for date, time, or timestamp comparisons. Do not specify an ESCAPE character if operand 1 is DBCS-only. Try the request again.
SQLCODE or SQLCODEs: -414
SQLSTATE or SQLSTATEs: 42824
SQL0415
Message Text: Operands of set operation, array constructor, or VALUES not compatible.
Cause Text: Column &2 is not compatible with the corresponding column in another subselect of the UNION, EXCEPT, or INTERSECT, in another row of a VALUES clause, or in another entry in an array constructor. The relative position of the value in the list is &1. One of the following conditions might exists:
  • One column is character, graphic, or numeric and the other is not character, graphic, or numeric.
  • One of the columns is date, time, or timestamp and the other is not character or the same type. Date and timestamp are compatible.
  • One column is binary, and the other is not binary. If the column name is *N, the column is not a named column.
Recovery Text: Change the columns of the operands of the UNION, EXCEPT, INTERSECT, array constructor, or VALUES clause so that they are compatible. A casting function can be used to make the values compatible types. Try the request again.
SQLCODE or SQLCODEs: -415
SQLSTATE or SQLSTATEs: 42825
SQL0417
Message Text: Combination of parameter markers not valid.
Cause Text: The statement string specified as the object of a PREPARE statement contains a predicate or expression where parameter markers have been used as operands of the same operator. The following restrictions apply to the use of parameter markers:
  • Both the operands in a predicate cannot be parameter markers. For example, specifying predicates of the form:

? = ?

or

? = ( SELECT ? FROM x )

are not valid.

  • Both the operands in a expression cannot be parameter markers. For example, specifying an expression of the form:

? + ?

is not valid.

  • At least one of the operands in the BETWEEN predicate cannot be a parameter marker. For example, specifying the predicate of the form:

? BETWEEN ? and ?

is not valid.

  • At least, one of the operands of the IN predicate must not be a parameter marker. For example, specifying the predicate of the form:

? IN (?, ?, ?)

is not valid.

Recovery Text: Correct the statement so that all operands of the predicate or expression are not parameter markers. A CAST specification can be used in most cases to assign attributes to a parameter marker. Try the request again.
SQLCODE or SQLCODEs: -417
SQLSTATE or SQLSTATEs: 42609
SQL0418
Message Text: Use of parameter marker or NULL not valid.
Cause Text: Parameter markers and NULL are not allowed:
  • As an operand of some scalar functions. If the scalar function is VALUE, COALESCE, IFNULL, NULLIF, MIN, MAX, LAND, LOR, XOR, BITAND, BITANDNOT, BITOR, BITXOR, or BITNOT then at least one of the arguments must be a value that is not a parameter marker or NULL.

Parameter markers are also not allowed:

  • In the SELECT clause of the statement string to be prepared.
  • As a value in a VALUES INTO statement.
  • In an SQL statement in embedded SQL or in interactive SQL.
  • In an EXECUTE IMMEDIATE statement.
  • In a CREATE VIEW, CREATE TABLE, ALTER TABLE, CREATE INDEX, CREATE MASK, or CREATE PERMISSION statement.
  • In a default value clause for a parameter in a CREATE PROCEDURE or CREATE FUNCTION statement.
  • In a statement processed by the RUNSQLSTM or RUNSQL command.
  • In a blocked INSERT statement.

The RAISE_ERROR scalar function cannot be used in expressions where a parameter marker is not allowed.

Recovery Text: Ensure parameter markers, NULL, and the RAISE_ERROR scalar function are only specified where they are allowed. A CAST specification can be used in many situations. See the PREPARE statement in the SQL Reference for details of where a parameter marker can be used. Correct any errors. Try the request again.
SQLCODE or SQLCODEs: -418
SQLSTATE or SQLSTATEs: 42610
SQL0419
Message Text: Negative scale not valid.
Cause Text: A decimal division operation has produced a negative scale. To view the algorithm used to determine the scale for decimal division, refer to the DB2 for i SQL Reference topic collection in the Database category in the IBM i Information Center, http://www.ibm.com/systems/i/infocenter/.
Recovery Text: Change one of the operands to floating point by using the FLOAT or DECFLOAT scalar function. This will change the result of division to floating point. If a decimal result is desired, use the DECIMAL scalar function in the floating point result. If one of the operands is integer, small integer, or big integer, SQL has converted it to decimal prior to the division. The DECIMAL function can be used to explicitly convert the integer, small integer, or big integer to a precision that will not cause the division to produce a negative scale. Try the request again.
SQLCODE or SQLCODEs: -419
SQLSTATE or SQLSTATEs: 42911
SQL0420
Message Text: Character in CAST argument not valid.
Cause Text: A character in the argument for the CAST function was not correct.
Recovery Text: Change the result data type to one that recognizes the characters in the CAST argument, or change the argument to contain a valid representation of a value for the result data type. Try the request again.
SQLCODE or SQLCODEs: +420, -420
SQLSTATE or SQLSTATEs: 01565, 22018
SQL0421
Message Text: Number of columns not consistent.
Cause Text: The subselects of a UNION, INTERCEPT, or EXCEPT must have the same number of result columns. All rows specified for a multiple row insert or for a VALUES clause must have the same number of values.
Recovery Text: Correct the SQL statement so that the same number of columns are defined for each row. Try the request again.
SQLCODE or SQLCODEs: -421
SQLSTATE or SQLSTATEs: 42826
SQL0423
Message Text: Locator &1 not valid.
Cause Text: The value of locator &1 is not currently valid. A LOB or XML locator may have been freed by a previous FREE LOCATOR statement or a COMMIT or ROLLBACK. A result set locator may have been freed by a CLOSE statement or a COMMIT or ROLLBACK. An ALLOCATE CURSOR statement cannot be run for a result set locator value that has already had a cursor allocated.
Recovery Text: Ensure that the locator value refers to an active locator that has not been freed because of a FREE LOCATOR, CLOSE, COMMIT, or ROLLBACK statement. A LOB or XML value can be assigned to a locator variable using a SELECT INTO statement, a VALUES INTO or SET statement, a GET DESCRIPTOR statement, or a FETCH statement. A value can be assigned to a result set locator variable using an ASSOCIATE LOCATORS statement or a DESCRIBE PROCEDURE statement.
SQLCODE or SQLCODEs: -423
SQLSTATE or SQLSTATEs: 0F001
SQL0426
Message Text: Dynamic COMMIT is not valid for the application environment.
Cause Text: An application using DRDA two-phase commit protocols has attempted to issue a dynamic COMMIT, or has called a stored procedure which performed a COMMIT ON RETURN.
Recovery Text: Remove the dynamic COMMIT statement, or change the stored procedure definition to not use COMMIT ON RETURN.
SQLCODE or SQLCODEs: -426
SQLSTATE or SQLSTATEs: 2D528
SQL0427
Message Text: Dynamic ROLLBACK is not valid for the application environment.
Cause Text: An application using DRDA two-phase commit protocols has attempted to issue a dynamic ROLLBACK.
Recovery Text: Remove the dynamic ROLLBACK statement.
SQLCODE or SQLCODEs: -427
SQLSTATE or SQLSTATEs: 2D529
SQL0428
Message Text: SQL statement cannot be run.
Cause Text: A SET TRANSACTION, DISCONNECT, or SET SESSION AUTHORIZATION statement cannot be run in the current application state. The reason code is &1. Reason codes and their meanings are:
  • 1 -- A connection is not at a commit boundary.
  • 2 -- The current server is a local relational database and there is an active connection to a remote relational database.
  • 3 -- The SYSTEM_USER is one of the system-supplied user profiles such as QSYS, QDFTOWN, or QSPL.
  • 4 -- A stored procedure, user-defined function, or trigger is running.
  • 5 -- Resources are being held because a COMMIT HOLD statement has been run.
  • 6 -- Resources are being held because a HOLD LOCATOR statement has been run.
  • 7 -- The maximum number of ProfileHandles have been generated.
Recovery Text: Do one of the following actions prior to running the SQL statement. Try the request again.
  • 1 -- If the connection is not at a commit boundary, issue a COMMIT or ROLLBACK SQL statement.
  • 2 -- If connections to remote relational databases are active, disconnect the remote connections.
  • 3 -- If the SYSTEM_USER is one of the system-supplied user profiles, sign-on with a different user profile.
  • 4 -- Run the SET SESSION AUTHORIZATION statement either before or after the stored procedure, user-defined function, or trigger is run.
  • 5 -- If resources are being held because a COMMIT HOLD has been run, issue a COMMIT or ROLLBACK SQL statement.
  • 6 -- If resources are being held because a HOLD LOCATOR has been run, issue a ROLLBACK or FREE LOCATOR SQL statement.
  • 7 -- If the maximum number of ProfileHandles have been generated, release some of the ProfileHandles that are no longer needed using the Release ProfileHandle (QSYRLSPH) program.
SQLCODE or SQLCODEs: -428
SQLSTATE or SQLSTATEs: 25001, 25501
SQL0429
Message Text: The maximum number of concurrent LOB and XML locators has been reached.
Cause Text: The LOB or XML locator could not be generated because there are already 16000000 valid locators for this process.
Recovery Text: Use the FREE LOCATOR statement to free LOB or XML locators.
SQLCODE or SQLCODEs: -429
SQLSTATE or SQLSTATEs: 54028
SQL0432
Message Text: A parameter marker cannot have the user-defined type name &1.
Cause Text: A parameter marker in the statement has been determined as having the user-defined type &1 based on the context in which it is used. A parameter marker cannot have a user-defined type as its data type unless it is part of an assignment (VALUES clause of INSERT or SET clause of UPDATE) or it is being explicitly cast to a user-defined type using the CAST specification.
Recovery Text: Use an explicit cast to the user-defined distinct type for the parameter marker or cast the columns that are user-defined types to their corresponding source data type.
SQLCODE or SQLCODEs: -432
SQLSTATE or SQLSTATEs: 42841
SQL0433
Message Text: Significant data truncated during CAST or XMLSERIALIZE.
Cause Text: The length of the resulting character or graphic string is not large enough to hold the character representation of the value. This could happen for the CAST, XMLCAST, and XMLSERIALIZE functions.
Recovery Text: Change the result data type to a character or graphic string long enough to hold the result. Try the request again.
SQLCODE or SQLCODEs: -433
SQLSTATE or SQLSTATEs: 22001
SQL0435
Message Text: SQLSTATE value &1 not valid.
Cause Text: SQLSTATE value &1 specified in a handler or condition, in a SIGNAL or RESIGNAL statement, or in a RAISE_ERROR function is not valid. SQLSTATE values must have a length of 5 and must contain uppercase characters A-Z or numbers 0-9. The first two characters of the SQLSTATE value cannot be '00'. The SQLSTATE value in a RAISE_ERROR function cannot begin with '00', '01', or '02'. If the SQLSTATE value shown is '*N', an empty string or null value was passed for the SQLSTATE.
Recovery Text: Change the SQLSTATE to one that is valid. Try the request again.
SQLCODE or SQLCODEs: -435
SQLSTATE or SQLSTATEs: 428B3
SQL0438
Message Text: Message &1 returned from SIGNAL, RESIGNAL, or RAISE_ERROR.
Cause Text: An application has executed a SIGNAL or RESIGNAL statement, the RAISE_ERROR function has been invoked, or an error was signalled within a MERGE statement. If the application is an SQL procedure, function, trigger, or a compound (dynamic) statement, the SQLSTATE was not handled in the SQL routine. The message returned is &1.
Recovery Text: See the documentation for the application that issued the SIGNAL or RESIGNAL statement or invoked the RAISE_ERROR function.
SQLCODE or SQLCODEs: +438, -438
SQLSTATE or SQLSTATEs: 01xxx, XXXXX
SQL0440
Message Text: Routine &1 in &2 not found with specified parameters.
Cause Text: A function or procedure with the specified name and compatible arguments was not found. This could be due to an authorization failure.
Recovery Text: Specify the correct number and type of parameters on the CALL statement, CREATE OR REPLACE statement, or function invocation. Try the request again.
SQLCODE or SQLCODEs: +440, -440
SQLSTATE or SQLSTATEs: 0168L, 42884
SQL0441
Message Text: Clause or keyword &1 not valid where specified.
Cause Text: One of the following errors has occurred:
  • AS LOCATOR is specified for a parameter in a procedure or as a parameter or in the RETURNS clause of a function and the parameter is defined as BLOB, CLOB, or DBCLOB and a length, a CCSID value, or a FOR BIT DATA, FOR MIXED DATA, or FOR SBCS DATA clause was specified.
  • ALL or DISTINCT is specified in a function that is not an aggregate function.
Recovery Text: Remove the clause that is not correct. Try the request again.
SQLCODE or SQLCODEs: -441
SQLSTATE or SQLSTATEs: 42601
SQL0442
Message Text: Too many parameters for procedure &1 in &2 on CALL statement.
Cause Text: Only 8000 parameters are allowed on the CALL statement. If the procedure is a REXX procedure, only 32766 bytes of data can be passed on the CALL statement.
Recovery Text: Reduce the number of parameters specified to the maximum of 8000. If calling a REXX procedure, limit the total number of bytes of parameter data to be less than 32766. Try the request again.
SQLCODE or SQLCODEs: -442
SQLSTATE or SQLSTATEs: 54023
SQL0443
Message Text: Trigger program or external routine detected an error.
Cause Text: Either a trigger program, external procedure, or external function detected and returned an error to SQL. If the error occurred in a trigger program, the trigger was on table &4 in schema &5. If the error occurred in an external procedure or function, the external name is &4 in schema &5. The associated text is &6. If the error occurred in a trigger program, the associated text is the type of trigger program. If the error occurred in an external function, the associated text is the text of the error message returned from the external function.
Recovery Text: Refer to the joblog for more information regarding the detected error. Correct the error and try the request again.
SQLCODE or SQLCODEs: -443
SQLSTATE or SQLSTATEs: 38501, 38xxx
SQL0444
Message Text: External program &4 in &5 not found.
Cause Text: An attempt was made to CALL procedure or invoke function &1 in &2. External program or service program &4 in schema &5 was not found.
Recovery Text: The external program or service program associated with the procedure or function cannot be found. Ensure that an object exists with the name specified on the DECLARE PROCEDURE, CREATE PROCEDURE, CREATE FUNCTION, ALTER PROCEDURE, or ALTER FUNCTION statement. If no name was specified, ensure that an object with a name which matches the procedure or function name specified exists. If a program name was specified, a program object must exist. If an entry point name was specified, then a service program object must exist. Try the request again.
SQLCODE or SQLCODEs: -444
SQLSTATE or SQLSTATEs: 42724
SQL0445
Message Text: A value was truncated.
Cause Text: If the value was truncated when calling a procedure, the value of parameter &4 in procedure &1 in &2 was too long. Parameter &4, which is declared as OUT or INOUT, contains a value that is longer than the maximum length string that can be stored in host variable &8. Parameter &4 is being returned from procedure &1 in &2 to host variable &8. The length of the parameter is &6 and the length of the host variable is &7. Otherwise, the truncation occurred during another SQL operation.

Trailing blanks are not included in the length of the string for character values. Trailing hex zeros are not included in the length of the string for binary values.

Recovery Text: Increase the length of the host variable from &7 to &6, or ensure that the truncation is expected and has not caused any unexpected consequences.
SQLCODE or SQLCODEs: +445
SQLSTATE or SQLSTATEs: 01004
SQL0446
Message Text: Conversion error in assignment of argument &2.
Cause Text: During an attempt to assign input argument number &1 on a CALL statement to the corresponding parameter for the call, error type &3 occurred. A list of the error types follows:
  • 1 - Overflow.
  • 2 - Floating point overflow.
  • 3 - Floating point underflow.
  • 4 - Floating point conversion error.
  • 5 - Not an exact result.
  • 6 - Numeric data is not valid.
  • 7 - Double-byte character set (DBCS) data is not valid.

The parameter name is &2.

Recovery Text: Change the attribute declaration for parameter &1 in the CREATE, ALTER, or DECLARE PROCEDURE statement to match the attributes of argument &1 in the CALL statement or correct the data that is not valid. Try the request again.
SQLCODE or SQLCODEs: -446
SQLSTATE or SQLSTATEs: 22003
SQL0448
Message Text: Too many parameters for routine &1 in &2.
Cause Text: One of the following limits has been exceeded:
  • 8000 parameters for a procedure or scalar function.
  • 8000 combined parameters and return values for a table function. The actual number may be less and depends on the language.
Recovery Text: Reduce the number of parameters or return values. Try the request again.
SQLCODE or SQLCODEs: -448
SQLSTATE or SQLSTATEs: 54023
SQL0449
Message Text: External program name for routine &1 in &2 not valid.
Cause Text: The external program name specified on a DECLARE PROCEDURE, CREATE PROCEDURE, CREATE FUNCTION, ALTER PROCEDURE, or ALTER FUNCTION statement is not valid for the routine or the language specified.
  • The external program name for a procedure or function must be of the form 'library-name/program-name' or 'library-name/program-name(entry-point-name)'.
  • The external program name for a JAVA procedure or function must be 'class-name!method-name' or 'class-name.method-name'.
  • The external program name for a REXX procedure must be 'library-name/source-file-name(member-name)'.
Recovery Text: Specify the correct form of the external program name. Try the request again.
SQLCODE or SQLCODEs: -449
SQLSTATE or SQLSTATEs: 42878
SQL0451
Message Text: Attributes of parameter &1 not valid for procedure or function &3 in &4.
Cause Text: The data type, length, or value of parameter &1 is not valid for the language specified for procedure or function &3 in &4. The parameter name is &2. A list of conditions for the parameters follows:
  • For C: NUMERIC is not a valid data type.
  • For C++: NUMERIC and DECFLOAT are not valid data types.
  • For PL/I: NUMERIC, BIGINT, DECFLOAT, GRAPHIC, VARGRAPHIC, CLOB, BLOB, DBCLOB, and XML are not valid data types.
  • For COBOL: precision for DECIMAL or NUMERIC cannot be greater than 18. FLOAT, DECFLOAT, GRAPHIC, BIGINT, VARGRAPHIC, CLOB, BLOB, DBCLOB, and XML are not valid data types.
  • For ILE COBOL: precision for DECIMAL or NUMERIC cannot be greater than 18. DECFLOAT is not valid.
  • For REXX: SMALLINT, BIGINT, NUMERIC, DECFLOAT, Unicode graphic, CLOB, BLOB, DBCLOB, and XML are not valid data types. FLOAT is not valid if the precision is from 1 to 24. Precision for DECIMAL cannot be greater than 63.
  • For ILE RPG: DECFLOAT is not a valid data type.
  • For RPG: FLOAT, DECFLOAT, BIGINT, VARCHAR, VARBINARY, GRAPHIC, VARGRAPHIC, CLOB, BLOB, DBCLOB, ROWID, and XML are not valid data types.
  • For CL: BIGINT, NUMERIC, VARCHAR, VARBINARY, FLOAT, DECFLOAT, GRAPHIC, VARGRAPHIC, CLOB, BLOB, DBCLOB, and XML are not valid data types. GENERAL WITH NULLS cannot be specified for CL.
  • DataLinks are not valid data types for parameters unless the routine is an SQL procedure or function.
  • LOBs with AS LOCATOR are not valid data types for parameters of an SQL procedure or function.
  • XML AS must be specified for the XML data type for external routines.
Recovery Text: Correct the data type or precision specified for the parameter on the DECLARE PROCEDURE, CREATE PROCEDURE, ALTER PROCEDURE, CREATE FUNCTION, or ALTER FUNCTION statement. Try the request again.
SQLCODE or SQLCODEs: -451
SQLSTATE or SQLSTATEs: 42815
SQL0452
Message Text: Unable to access a file that is referred to by a file reference variable.
Cause Text: The file referred to by the file reference variable (host variable &1) could not be accessed because of reason code &2. The reason codes and their meanings are:
  • 1 - The file name or path has a format that is not valid.
  • 2 - The length of the file name is greater than the maximum allowed length.
  • 3 - The file option is not valid.
  • 4 - The file or directory cannot be found.
  • 5 - A file already exists with the same name as that specified for a file that has the NEW option.
Recovery Text: Do one of the following: If the reason code is 1, correct the format of the filename or path and then try the request again.
  • If the reason code is 2, correct the file name and then try the request again.
  • If the reason code is 3, correct the file option and then try the request again.
  • If the reason code is 4, specify SQL_FILE_CREATE for the file option, or verify the directory exists, and then try the request again.
  • If the reason code is 5, specify SQL_FILE_OVERWRITE or SQL_FILE_APPEND and then try the request again.
SQLCODE or SQLCODEs: -452
SQLSTATE or SQLSTATEs: 428A1
SQL0453
Message Text: Return type for function &1 in &2 not compatible with CAST TO type.
Cause Text: The data types specified in the RETURNS clause for function &1 in &2 are not valid. The CAST TO and CAST FROM data types are not compatible.
Recovery Text: Correct the data type specified in the RETURNS clause for the function. Try the request again.
SQLCODE or SQLCODEs: -453
SQLSTATE or SQLSTATEs: 42880
SQL0454
Message Text: Routine &1 in &2 already exists.
Cause Text: One of the following has occurred:
  • Procedure &1 with the same number of parameters already exists in schema &2. Procedures in a schema cannot have the same name and number of parameters.
  • Function &1 with the same signature already exists in schema &2. All functions in the same schema must have a unique signature. The database uses the name of the function and the number and data types of the arguments to determine the signature for the function.
Recovery Text: Change the routine name or the parameters or drop the existing routine. Try the request again.
SQLCODE or SQLCODEs: -454
SQLSTATE or SQLSTATEs: 42723
SQL0455
Message Text: Schema &2 for specific name not same as routine schema &3.
Cause Text: The specific name schema &2 specified on a CREATE PROCEDURE, DECLARE PROCEDURE, or CREATE FUNCTION statement is not the same as schema &3 for procedure or function &1.
Recovery Text: Specify the same schema for the specific name as for the procedure or function name.
SQLCODE or SQLCODEs: -455
SQLSTATE or SQLSTATEs: 42882
SQL0456
Message Text: Specific name &3 in &2 already exists.
Cause Text: An attempt was made to create a function or procedure &1 in &2 with specific name &3, but specific name &3 already exists in the schema. All routines (functions and procedures) in the same schema must have unique specific names.
Recovery Text: Specify a SPECIFIC NAME that does not exist or do not specify a SPECIFIC NAME and a unique name will be generated for you. Otherwise, delete the existing routine. Try the request again.
SQLCODE or SQLCODEs: -456
SQLSTATE or SQLSTATEs: 42710
SQL0457
Message Text: Name &1 in &2 not allowed for function.
Cause Text: Function &1 in &2 cannot be created or altered or cannot be used as the source function name. Either the function name is a reserved word or the schema is specified as QSYS, QSYS2, SYSIBM, SYSPROC, or QTEMP. Functions cannot be created or altered in QSYS, QSYS2, SYSIBM, SYSPROC, or QTEMP.
Recovery Text: Change the name of the function to one that is not reserved or specify a different schema. Try the request again.
SQLCODE or SQLCODEs: -457
SQLSTATE or SQLSTATEs: 42939
SQL0458
Message Text: Routine &1 in &2 not found with matching signature.
Cause Text: Routine &1 is specified in schema &2. The name of a function and the number and data types of the parameters make up a function signature. The name of a procedure and the number of parameters make up a procedure signature. A routine with a matching signature was not found. This could be due to an authorization failure.
Recovery Text: Ensure that the routine name exists and that the signature matches the routine definition. Try the request again.
SQLCODE or SQLCODEs: -458
SQLSTATE or SQLSTATEs: 42883
SQL0460
Message Text: Truncation of data may have occurred for ALTER TABLE of &1 in &2.
Cause Text: Table &1 in &2 has been altered. The length of column &3 has been reduced and data may have been truncated.
Recovery Text: No recovery is necessary.
SQLCODE or SQLCODEs: +460
SQLSTATE or SQLSTATEs: 01593
SQL0461
Message Text: CAST from &1 to &2 not supported.
Cause Text: CAST is not supported from data type &1 to data type &2. If the CAST is from date, time, or timestamp to character, the length of the character result is too small.
Recovery Text: Change the result data type or length to one that is supported for the CAST function or change the expression to have a data type that can be cast to &2. Try the request again.
SQLCODE or SQLCODEs: -461
SQLSTATE or SQLSTATEs: 42846
SQL0462
Message Text: Procedure or user-defined function &1 in &2 returned a warning SQLSTATE.
Cause Text: An SQLSTATE of the form 01xxx was returned by the procedure or user-defined function &1 in &2 (with specific name &3), along with message text &4.
Recovery Text: The user must understand the meaning of the warning. See your database administrator, or the author of the user-defined function or procedure.
SQLCODE or SQLCODEs: +462
SQLSTATE or SQLSTATEs: 01Hxx
SQL0463
Message Text: SQLSTATE &4 returned from routine &1 in &2 not valid.
Cause Text: SQLSTATE &4 cannot be returned from an external routine if PARAMETER STYLE SQL or DB2SQL is specified. Routine &1 in &2 is either an external procedure that was called or an external function that was invoked. The specific name is &3. The diagnostic text is &5.
Recovery Text: Change the external routine to only return a SQLSTATE that is valid for the PARAMETER STYLE SQL or DB2SQL. Try the request again.
SQLCODE or SQLCODEs: -463
SQLSTATE or SQLSTATEs: 39001
SQL0464
Message Text: Procedure &1 returned &3 result sets, which exceeds the defined limit of &4.
Cause Text: The stored procedure &1 in &2 was successful. However, the stored procedure exceeded the defined limit on the number of result sets that can be returned. Only &4 result sets are returned to the SQL program that issued the SQL CALL statement.

The possible causes are:

  • The number of result sets is greater than the maximum specified when the procedure was created.
  • The stored procedure is unable to return &3 result sets due to DRDA limitations imposed by the client.
Recovery Text: The SQL statement is successful. SQLSTATE '0100E' is returned.
SQLCODE or SQLCODEs: +464
SQLSTATE or SQLSTATEs: 0100E
SQL0466
Message Text: &3 result sets are available from procedure &1 in &2.
Cause Text: Procedure &1 in &2 was called and has returned one or more result sets.
Recovery Text: None.
SQLCODE or SQLCODEs: +466
SQLSTATE or SQLSTATEs: 0100C
SQL0467
Message Text: Another result set exists for procedure &1 in &2.
Cause Text: A result set was closed for &1 in &2. Another result set exists for the stored procedure. A maximum of &3 result sets are possible for this procedure.
Recovery Text: None.
SQLCODE or SQLCODEs: +467
SQLSTATE or SQLSTATEs: 0100D
SQL0469
Message Text: IN, OUT, or INOUT not valid for parameter &4 in procedure &1 in &2.
Cause Text: The IN, INOUT, or OUT attribute specified for parameter &4 when the procedure was defined is not valid. The parameter name is &5. One of the following errors occurred:
  • A default cannot be specified for an OUT parameter.
  • The attribute is not consistent with the parameter on the CALL statement. If the parameter was declared INOUT or OUT, the parameter on the CALL statement must be specified as a host variable or a global variable.
  • The attribute was specified as INOUT or OUT and REXX was specified as the language. The attribute must be IN if REXX is specified.
Recovery Text: Either change the attribute of the parameter on the DECLARE PROCEDURE, CREATE PROCEDURE, or ALTER PROCEDURE statement or change the parameter. Try the request again.
SQLCODE or SQLCODEs: -469
SQLSTATE or SQLSTATEs: 42886
SQL0470
Message Text: Null values not allowed for parameter &4 in procedure &1 in &2.
Cause Text: Null values are not allowed on the CALL statement for procedure &1 because the procedure was declared with GENERAL specified. The null value was specified as either the NULL keyword, a host variable with an associated indicator variable that contains a negative value, or a global variable with the null value. The parameter number is &4 and the parameter name is &5.
Recovery Text: Specify PARAMETER STYLE SQL, DB2SQL, or GENERAL WITH NULLS on the CREATE PROCEDURE, ALTER PROCEDURE, or DECLARE PROCEDURE statement or pass a value other than the null value on the CALL statement. Try the request again.
SQLCODE or SQLCODEs: -470
SQLSTATE or SQLSTATEs: 39004
SQL0473
Message Text: Name &1 cannot be used for user-defined type.
Cause Text: Name &1 specified for a user-defined type is the same as a system predefined type or is a function name that is reserved. Function names that cannot be used include CAST, DATAPARTITIONNAME, DATAPARTITIONNUM, DBPARTITIONNAME, DBPARTITIONNUM, EXTRACT, NODENAME, NODENUMBER, PARTITION, POSITION, RID, RRN, STRIP, SUBSTRING, and TRIM.
Recovery Text: Change the name for the user-defined type. Try the request again.
SQLCODE or SQLCODEs: -473
SQLSTATE or SQLSTATEs: 42918
SQL0475
Message Text: RETURNS data type for function &3 in &4 not valid.
Cause Text: The data type specified for the RETURNS clause or the CAST FROM clause for function &3 in schema &4 is not appropriate for the data type returned from the sourced function or the value specified on the RETURN statement in the SQL function body. The data type specified in the RETURNS clause is &1 and the data type returned from the sourced function or SQL function is &2.
Recovery Text: Correct the data types specified or specify another sourced function. Try the request again.
SQLCODE or SQLCODEs: -475
SQLSTATE or SQLSTATEs: 42866
SQL0476
Message Text: Routine &1 in &2 not unique.
Cause Text: Function or procedure &1 in &2 was specified, not by signature or specific name, and more than one specific instance of the routine was found. Or the procedure was used in a DESCRIBE PROCEDURE or ASSOCIATE LOCATOR statement without a schema name specified while connected to a remote system, and more than one procedure has been called with that name.
Recovery Text: Request the routine either by its specific name, or by its signature (function or procedure name with parameter types). If this is for a DESCRIBE PROCEDURE or ASSOCIATE LOCATOR statement, specify the schema name for the procedure. Try the request again.
SQLCODE or SQLCODEs: -476
SQLSTATE or SQLSTATEs: 42725
SQL0478
Message Text: Object &1 of type &3 cannot be dropped or altered.
Cause Text: The base object &1 in schema &2 cannot be dropped or altered because another object depends on it. The dependent object &4 in &5 is of type &6.
  • If base object type is *N, the object being dropped or altered is a function, procedure, trigger, mask, or permission. For other objects it may be that the dependency is indirect. That is, the named object is dependent on another object which is dependent on the object being dropped or altered.
  • If the base object is a function, the dependent object is sourced on the base object, or is a view, a materialized query table, or an SQL procedure, function, global variable, or trigger that references the function.
  • If the base object is a procedure, the dependent object is referenced in an SQL procedure, function, or trigger.
  • If the base object is a table and it has a history table or there are other tables with triggers or foreign key constraints dependent on the base table, then the RESTRICT clause of the DROP statement will prevent the base table from being dropped.
  • If the base object is *LIB and if there are tables, views, functions, procedures, distinct types, aliases, global variables, or triggers in the schema, then the RESTRICT clause of the DROP statement will prevent the schema from being dropped. A trigger can be defined in one schema on a table that exists in a different schema.
  • If the base object is *SQLUDT and if there are tables, views, indexes, functions, procedures, sequences, global variables, or triggers dependent on the distinct type, then the RESTRICT clause of the DROP statement will prevent the base distinct type from being dropped.
  • If the base object is *DTAARA and if there are SQL routines, global variables, or triggers dependent on the sequence, then the RESTRICT clause of the DROP statement will prevent the base sequence from being dropped.
  • If the base object is *SRVPGM and if there are views, SQL routines, global variables, or triggers dependent on the global variable, then the RESTRICT clause of the DROP statement will prevent the base global variable from being dropped.
Recovery Text: Drop the dependent objects first. Try the request again.
SQLCODE or SQLCODEs: -478
SQLSTATE or SQLSTATEs: 42893
SQL0480
Message Text: Procedure &1 not previously called.
Cause Text: Procedure &1 in schema &2 referenced in a DESCRIBE PROCEDURE or ASSOCIATE LOCATOR statement has not yet been called within the application process.
Recovery Text: Call the procedure before running the DESCRIBE PROCEDURE or ASSOCIATE LOCATOR statement.
SQLCODE or SQLCODEs: -480
SQLSTATE or SQLSTATEs: 51030
SQL0482
Message Text: Procedure &1 returned no locators.
Cause Text: Procedure &1 in schema &2 referenced in an ASSOCIATE LOCATOR statement returned no result set locators to this invocation. This error will also occur for an ASSOCIATE LOCATOR statement when connected remotely and the procedure has not been called or does not exist.
Recovery Text: Determine if result set locators are returned from the identified procedure by using the DESCRIBE PROCEDURE statement.
SQLCODE or SQLCODEs: +482
SQLSTATE or SQLSTATEs: 02503
SQL0483
Message Text: Parameters for function &1 in &2 not same as sourced function.
Cause Text: The number of parameters specified for function &1 in &2 is not the same as the number of parameters specified for the sourced function.
Recovery Text: Specify the correct number of parameters for the function or specify another sourced function. If not qualified, ensure the correct sourced function exists in the current path. Try the request again.
SQLCODE or SQLCODEs: -483
SQLSTATE or SQLSTATEs: 42885
SQL0484
Message Text: Routine &1 in &2 already exists.
Cause Text: An attempt was made to create routine &1 in &2, but &1 already exists. All procedures and functions in the same schema must have unique specific names.
Recovery Text: Specify a SPECIFIC name that does not exist or do not specify a SPECIFIC name and a unique name will be generated for you. Otherwise, delete the existing routine. Try the request again.
SQLCODE or SQLCODEs: -484
SQLSTATE or SQLSTATEs: 42733
SQL0487
Message Text: SQL statements not allowed.
Cause Text: One of the following errors has occurred:
  • A procedure was called or a function was invoked that was created with NO SQL specified as the data access attribute. A routine created with NO SQL, or any subsequent routines, cannot contain SQL statements and cannot invoke a routine that has the CONTAINS SQL DATA, READS SQL DATA, or MODIFIES SQL DATA attribute.
  • NO SQL cannot be specified when creating an SQL procedure or function.
  • A trigger containing SQL statements was activated.
  • The client SQL special registers cannot be changed within a procedure, function, or trigger.
  • A field procedure containing SQL statements was called.

If the error occurred in a procedure or function, the routine name is &1 and the specific name is &2.

Recovery Text: Ensure routines created as NO SQL only invoke routines that do not contain SQL statements. Do not specify NO SQL for an SQL procedure or function. Do not change the client SQL special registers within a procedure, function, or trigger. Do not use SQL statements in a field procedure program.
SQLCODE or SQLCODEs: -487
SQLSTATE or SQLSTATEs: 38001
SQL0490
Message Text: Numeric value &1 not valid.
Cause Text: &1 was specified, but it is not in the valid range of values for its use. The valid range of values are &2 through &3.
Recovery Text: Change the value and try the request again.
SQLCODE or SQLCODEs: -490
SQLSTATE or SQLSTATEs: 428B7
SQL0491
Message Text: Clause not correct for procedure or function.
Cause Text: A clause for CREATE PROCEDURE or CREATE FUNCTION or ALTER PROCEDURE or ALTER FUNCTION is missing or not allowed. The reason code is &1. Reason codes and their meanings are:
  • 1 -- For functions, the RETURNS clause is required.
  • 3 -- For functions, the DBINFO, FINAL CALL, and SCRATCHPAD clauses cannot be specified if the parameter style is JAVA or GENERAL. For procedures, DBINFO cannot be specified unless the parameter style is SQL.
  • 4 -- For functions, GENERAL can only be specified if the EXTERNAL NAME specifies a service program.
  • 5 -- For functions and procedures, parameter style JAVA or DB2GENERAL can only be specified for LANGUAGE JAVA.
  • 6 -- A table function cannot have parameter style JAVA, GENERAL, or GENERAL WITH NULLS.
  • 7 -- For functions and procedures, PROGRAM TYPE MAIN is not allowed for JAVA or REXX. PROGRAM TYPE SUB is only allowed for service programs.
  • 9 -- The CARDINALITY clause is only allowed for table functions.
  • 10 -- For external functions and procedures, LANGUAGE SQL is not allowed and there must not be a routine body.
  • 11 -- For external functions and procedures, CONCURRENT ACCESS RESOLUTION cannot be specified.
Recovery Text: Add the missing clause or remove the clause that is not allowed. Try the request again.
SQLCODE or SQLCODEs: -491
SQLSTATE or SQLSTATEs: 42601
SQL0492
Message Text: Data type for function &1 in &2 not valid for source type.
Cause Text: The data type specified for parameter &3 for function &1 in library &2 is not valid for the corresponding type of the SOURCE function.
Recovery Text: Correct the data type specified for parameter &3 or specify another sourced function. Try the request again.
SQLCODE or SQLCODEs: -492
SQLSTATE or SQLSTATEs: 42879
SQL0494
Message Text: Fewer locators than number of result sets.
Cause Text: On an ASSOCIATE LOCATOR statement for procedure &1 in schema &2, fewer result set locator variables were provided than the number of available result sets. &3 result set locator variables were provided and &4 result sets are available.
Recovery Text: No recovery is necessary.
SQLCODE or SQLCODEs: +494
SQLSTATE or SQLSTATEs: 01614
SQL0499
Message Text: Cursor &1 already assigned to result set.
Cause Text: An attempt was made to assign a cursor to a result set using the ALLOCATE CURSOR statement and one of the following applies:
  • The result set locator specified in the ALLOCATE CURSOR statement is already assigned to cursor &2.
  • Cursor &1 specified in the ALLOCATE CURSOR statement is already assigned to a result set.
Recovery Text: Only do one ALLOCATE CURSOR for each result set.
SQLCODE or SQLCODEs: -499
SQLSTATE or SQLSTATEs: 24516
SQL0501
Message Text: Cursor &1 not open.
Cause Text: The cursor &1 was specified in a FETCH or CLOSE statement, but the cursor is not open. Cursor &1 has one of the following conditions:
  • Cursor &1 was never opened.
  • The cursor &1 was opened in another program or another call of this program and the program was created with CLOSQLCSR(*ENDPGM).
  • The cursor &1 was opened in another module or another call of this module and the module was created with CLOSQLCSR(*ENDMOD).
  • The cursor &1 was opened in another call of this program and programs which have run SQL statements have ended and the program was created with CLOSQLCSR(*ENDSQL).
  • The cursor &1 was opened in another call of this module and the activation group ended between calls. The module was created with CLOSQLCSR(*ENDACTGRP).
  • The cursor was closed by a CLOSE, COMMIT, or ROLLBACK statement.
  • The cursor &1 was opened under a transaction which is different than the current transaction.
Recovery Text: Do one of the following and precompile again:
  • Make certain that cursor &1 is opened in the same program or module call prior to using the cursor in an FETCH or CLOSE statement.
  • Specify either CLOSQLCSR(*ENDSQL), CLOSQLCSR(*ENDJOB), or CLOSQLCSR(*ENDACTGRP) when precompiling the application.
  • If the cursor was closed by a COMMIT or ROLLBACK, specify HOLD on the COMMIT or ROLLBACK statement to preserve any open cursors, prepared statements, and locks on tables.
SQLCODE or SQLCODEs: -501
SQLSTATE or SQLSTATEs: 24501
SQL0502
Message Text: Cursor &1 already open or allocated.
Cause Text: The cursor specified in an OPEN statement or ALLOCATE CURSOR statement is already open or allocated for this call of the program.
Recovery Text: Close cursor &1 and then try the OPEN statement or ALLOCATE CURSOR statement again or change the name of the cursor, and then precompile the program again.
SQLCODE or SQLCODEs: -502
SQLSTATE or SQLSTATEs: 24502
SQL0503
Message Text: Column &3 cannot be updated.
Cause Text: An UPDATE statement attempted to update column &3 in table or view &1 in &2. The column cannot be updated because it was not specified in the FOR UPDATE OF clause in the associated DECLARE CURSOR statement.
Recovery Text: Add column &3 to the FOR UPDATE OF clause in the related DECLARE CURSOR statement. Precompile the program again.
SQLCODE or SQLCODEs: -503
SQLSTATE or SQLSTATEs: 42912
SQL0504
Message Text: Cursor &1 not declared.
Cause Text: Cursor &1 is not declared in the program before it is referred to. A cursor must be declared before being referred to in other statements. All cursors used in the SET RESULT SETS statement must be declared WITH RETURN if any cursors in the program are declared WITH RETURN or WITHOUT RETURN.
Recovery Text: Verify that the application program is complete and has no spelling errors in the cursor declarations. Make certain the declaration for a cursor is in an application program before it is referred to by other statements. If any cursors are declared WITH RETURN or WITHOUT RETURN, make sure all cursors used by the SET RESULT SETS statement are declared WITH RETURN. Precompile the program again.
SQLCODE or SQLCODEs: -504
SQLSTATE or SQLSTATEs: 34000
SQL0507
Message Text: Cursor &1 not open.
Cause Text: Cursor &1 was specified in an UPDATE or DELETE statement, but the cursor is not open. Cursor &1 has one of the following conditions:
  • Cursor &1 was never opened.
  • The cursor &1 was opened in another program or another call of this program and the program was created with CLOSQLCSR(*ENDPGM).
  • The cursor &1 was opened in another module or another call of this module and the module was created with CLOSQLCSR(*ENDMOD).
  • The cursor &1 was opened in another call of this program and programs which have run SQL statements have ended and the program was created with CLOSQLCSR(*ENDSQL).
  • The cursor &1 was opened in another call of this module and the activation group was ended between calls. The program was created with CLOSQLCSR(*ENDACTGRP).
  • The cursor was closed by a CLOSE, COMMIT, or ROLLBACK statement.
Recovery Text: Do one of the following and precompile again:
  • Make certain that cursor &1 is opened in the same program or module call prior to using the cursor in an UPDATE or DELETE statement.
  • Specify either CLOSQLCSR(*ENDSQL), CLOSQLCSR(*ENDJOB), or CLOSQLCSR(*ENDACTGRP) when precompiling the application.
  • If the cursor was closed by a COMMIT or ROLLBACK, specify HOLD on the COMMIT or ROLLBACK statement to preserve any open cursors, prepared statements, and locks on tables.
SQLCODE or SQLCODEs: -507
SQLSTATE or SQLSTATEs: 24501
SQL0508
Message Text: Cursor &1 not positioned on locked row.
Cause Text: An UPDATE or DELETE statement with a WHERE CURRENT OF &1 was attempted, but the cursor is not positioned on a row or is positioned on a row, but the row is not locked because a COMMIT HOLD or ROLLBACK HOLD statement released the lock on the row. A FETCH statement must be issued to position the cursor on a row and lock the row.
Recovery Text: Issue a FETCH statement to position the cursor on a row and lock the row; then, try the request again.
SQLCODE or SQLCODEs: -508
SQLSTATE or SQLSTATEs: 24504
SQL0509
Message Text: Table &2 in &3 not same as table in cursor &1.
Cause Text: An UPDATE or DELETE statement with a WHERE CURRENT OF &1 specified the table &2 in &3, but cursor &1 refers to a different table. The table specified in the UPDATE or DELETE statement and the table referred to by cursor &1 must be the same.
Recovery Text: Change the specified table name to match the table specified in the cursor &1 and precompile the program again.
SQLCODE or SQLCODEs: -509
SQLSTATE or SQLSTATEs: 42827
SQL0510
Message Text: Cursor &1 for table or view &2 read-only.
Cause Text: An UPDATE or DELETE statement with a WHERE CURRENT OF clause was specified, but the cursor is read only. Either the cursor &1 is read-only or the view or logical file &2 in schema &3 is read-only.

A view or logical file is read-only if one or more of the following conditions are true:

-- The view contains a DISTINCT keyword, GROUP BY clause, HAVING clause, aggregate function, FOR SYSTEM_TIME clause, or UNION, EXCEPT, or INTERSECT in the outer-most subselect.

-- The view or logical file contains a join.

-- The view contains a subquery that refers to the same table as the table of the outer-most subselect.

-- All the columns of the view are expressions, scalar functions, or constants.

-- All the columns of the logical file are input only.

A cursor is read only if one or more of the following conditions is true:

-- The DECLARE CURSOR statement specified an ORDER BY clause but did not specify a FOR UPDATE OF clause.

-- The DECLARE CURSOR statement specified a FOR READ ONLY clause.

-- The DECLARE CURSOR statement specified the SCROLL keyword without DYNAMIC.

-- The cursor referred to a read-only view or logical file in the select list.

-- The fullselect specified in the DECLARE CURSOR statement contains any of the above restrictions that would make a view read only.

-- A second INSTEAD OF trigger is required for the update or delete on a dependent view.

-- The DECLARE CURSOR statement specified a SELECT with a data change table reference.

Recovery Text: Do one of the following and precompile the program again:

-- If the DECLARE CURSOR statement specified an ORDER BY clause but not a FOR UPDATE OF clause, add a FOR UPDATE OF clause.

-- If the DECLARE CURSOR statement specified a FOR READ ONLY clause, remove the FOR READ ONLY clause.

-- If the DECLARE CURSOR statement specified the SCROLL keyword, specify DYNAMIC SCROLL.

-- If the referred to view or logical file is read only, remove the UPDATE or DELETE statement.

-- If the DECLARE CURSOR statement contains any conditions that make the cursor read only, remove the UPDATE or DELETE statement.

SQLCODE or SQLCODEs: -510
SQLSTATE or SQLSTATEs: 42828
SQL0511
Message Text: FOR UPDATE clause not valid.
Cause Text: The FOR UPDATE clause cannot be used for cursor &1 because the result table is read only. The result table is read only if:
  • The select-statement includes the DISTINCT keyword, an aggregate function, a GROUP BY clause, a HAVING clause, or a UNION, EXCEPT, or INTERSECT operator.
  • The select-statement contains a VALUES clause.
  • The FROM clause identifies more than one table, more than one view, or a read-only view.
  • The FROM clause contains a data change table reference.
  • The FROM clause contains a FOR SYSTEM_TIME clause.
Recovery Text: Cursor &1 cannot be updated. Remove the FOR UPDATE clause.
SQLCODE or SQLCODEs: -511
SQLSTATE or SQLSTATEs: 42829
SQL0512
Message Text: Statement references objects in multiple databases.
Cause Text: The statement refers to objects that reside on multiple databases. The objects could be either explicitly qualified object names or alias names that are defined to reference a different database. This SQL statement can only refer to a single database.

A CREATE TABLE AS that selects from a remote database cannot reference a table that has a FIELDPROC defined. It cannot define a materialized query table. If the remote database is not on an IBM i server, the INCLUDING clauses are not allowed.

Recovery Text: Ensure all objects used in the statement reside at the same database. Try the request again.
SQLCODE or SQLCODEs: -512
SQLSTATE or SQLSTATEs: 56023
SQL0513
Message Text: Alias &1 in &2 cannot reference another alias.
Cause Text: Alias &1 in &2 can only reference a table or a view. It cannot reference another alias.
Recovery Text: Change the referenced name and try the request again.
SQLCODE or SQLCODEs: -513
SQLSTATE or SQLSTATEs: 42924
SQL0514
Message Text: Prepared statement &2 not found.
Cause Text: An attempt was made to open cursor &1 which referred to prepared statement &2. Statement &2 has one of the following conditions:
  • The statement has never been prepared.
  • The statement was prepared in another program or another call of this program and the program was created with CLOSQLCSR(*ENDPGM).
  • The statement was prepared in another module or another call of this module and the module was created with CLOSQLCSR(*ENDMOD).
  • The statement was prepared in another call of this program and programs which have run SQL statements have ended and the program was created with CLOSQLCSR(*ENDSQL).
  • The statement was prepared in another call of this module and the activation group ended between calls. The module was created with CLOSQLCSR(*ENDACTGRP).
  • A COMMIT or ROLLBACK statement has destroyed all the prepared statements.
Recovery Text: Do one of the following and precompile again:
  • Prepare the statement &2 (PREPARE statement) before attempting to open cursor &1.
  • Make certain that &2 has been prepared in the same program or module call prior to attempting to open cursor &1 or specify either CLOSQLCSR(*ENDSQL) CLOSQLCSR(*ENDJOB), or CLOSQLCSR(*ENDACTGRP) when precompiling the application.
  • If the statement was deleted by a COMMIT or ROLLBACK, specify HOLD on the COMMIT or ROLLBACK statement to preserve any open cursors, prepared statements, and locks on tables.
SQLCODE or SQLCODEs: -514
SQLSTATE or SQLSTATEs: 26501
SQL0516
Message Text: Prepared statement &2 not found.
Cause Text: &2 is not a valid prepared statement. The statement has one of the following conditions:
  • The statement has never been prepared.
  • The statement was prepared in another program or another call of this program and the program was created with CLOSQLCSR(*ENDPGM).
  • The statement was prepared in another module or another call of this module and the module was created with CLOSQLCSR(*ENDMOD).
  • The statement was prepared in another call of this program and programs which have run SQL statements have ended and the program was created with CLOSQLCSR(*ENDSQL).
  • The statement was prepared in another call of this module and the activation group ended between calls. The module was created with CLOSQLCSR(*ENDACTGRP).
  • A COMMIT or ROLLBACK statement has destroyed all the prepared statements.
Recovery Text: Do one of the following and precompile again:
  • Make certain that &1 has been prepared in the same program or module call prior to using the DESCRIBE statement or specify either CLOSQLCSR(*ENDSQL), CLOSQLCSR(*ENDJOB), or CLOSQLCSR(*ENDACTGRP) when precompiling the application.
  • If the statement was deleted by a COMMIT or ROLLBACK, specify HOLD on the COMMIT or ROLLBACK statement to preserve any open cursors, prepared statements, and locks on tables.
SQLCODE or SQLCODEs: -516
SQLSTATE or SQLSTATEs: 26501
SQL0517
Message Text: Prepared statement &2 not select-statement.
Cause Text: An attempt was made to open cursor &1, which refers to statement &2. Statement &2 is a valid prepared statement, but it is not a select-statement. OPEN can only refer to prepared select-statements.
Recovery Text: Change the OPEN statement to refer to a prepared select-statement, or prepare statement &2 using a valid select-statement and then try the open.
SQLCODE or SQLCODEs: -517
SQLSTATE or SQLSTATEs: 07005
SQL0518
Message Text: Prepared statement &1 not found.
Cause Text: An EXECUTE statement referred to the statement &1. &1 is not a valid prepared statement. The statement has one of the following conditions:
  • The statement has never been prepared.
  • The statement identifies a prepared SELECT or DECLARE PROCEDURE statement.
  • The statement was in error at prepare or bind time.
  • The statement was prepared in another program or another call of this program and the program was created with CLOSQLCSR(*ENDPGM).
  • The statement was prepared in another module or another call of this module and the module was created with CLOSQLCSR(*ENDMOD).
  • The statement was prepared in another call of this program and programs which have run SQL statements have ended and the program was created with CLOSQLCSR(*ENDSQL).
  • The statement was prepared in another call of this module and the activation group ended between calls. The module was created with CLOSQLCSR(*ENDACTGRP).
  • The prepared statement was destroyed by a COMMIT or ROLLBACK statement. This only occurs when connected to a database other than DB2 for IBM i.
Recovery Text: Do one of the following:
  • If &1 identifies a prepared SELECT or DECLARE PROCEDURE statement, a different prepared statement must be named in the EXECUTE statement.
  • If the statement had errors, correct the errors and either prepare the statement again or precompile the program again.
  • Make certain that &1 has been prepared in the same program or module call prior to using the EXECUTE statement or specify either CLOSQLCSR(*ENDSQL), CLOSQLCSR(*ENDJOB), or CLOSQLCSR(*ENDACTGRP) when precompiling the application.
  • If the statement was deleted by a COMMIT or ROLLBACK, either specify PREPARE WITH HOLD or bind the program with the correct option to preserve prepared statements.
SQLCODE or SQLCODEs: -518
SQLSTATE or SQLSTATEs: 07003
SQL0519
Message Text: Prepared statement &2 in use.
Cause Text: The application program has attempted to prepare statement &2. This statement is the SELECT statement for cursor &1 that is currently open.
Recovery Text: Change the statement name in the PREPARE statement or correct the logic of the application program so that it closes cursor &1 before attempting the PREPARE statement again.
SQLCODE or SQLCODEs: -519
SQLSTATE or SQLSTATEs: 24506
SQL0520
Message Text: Cannot UPDATE or DELETE on cursor &1.
Cause Text: Cursor &1 is blocking records. An UPDATE or DELETE WHERE CURRENT OF cursor &1 was attempted but cannot be run because blocking was being used for the cursor.
Recovery Text: Do not block records for cursor &1 if UPDATE or DELETE statements will be used against it.
SQLCODE or SQLCODEs: -520
SQLSTATE or SQLSTATEs: 42828
SQL0525
Message Text: Statement not valid on application server.
Cause Text: An attempt was made to run statement number &4 of package &2 in schema &3. Either the statement is in error, or the statement is not supported by the application server. The section number corresponding to the statement is &1.
Recovery Text: Correct the statement which is in error and verify that it is a valid SQL statement on the application server. If the statement is a multiple-row FETCH, specify a single-row FETCH. If the statement is a multiple-row INSERT, either specify a VALUES clause with one or more rows to insert, or specify a subselect. If the statement is SET TRANSACTION, remove it from the application or prevent it from being issued when the Distributed Relational Database Architecture (DRDA) connection is used. Try the request again.
SQLCODE or SQLCODEs: -525
SQLSTATE or SQLSTATEs: 51015
SQL0526
Message Text: Statement not valid for &1 TEMPORARY TABLE &2 in &3.
Cause Text: Temporary table &2 in &3 cannot be specified on the CREATE TRIGGER, CREATE MASK, CREATE PERMISSION, LOCK TABLE, or RENAME statements. The table cannot have a constraint and cannot be partitioned. In addition:

For a DECLARED TEMPORARY TABLE the following are not allowed:

  • ALTER TABLE, COMMENT, LABEL, GRANT, REVOKE statements.

For a CREATED TEMPORARY TABLE the following is not allowed:

  • A view that uses WITH CHECK OPTION.
Recovery Text: Specify a valid table on the statement. Try the request again.
SQLCODE or SQLCODEs: -526
SQLSTATE or SQLSTATEs: 42995
SQL0527
Message Text: ALWCPYDTA(*NO) specified but temporary result required for &1.
Cause Text: The Allow Copy Data (ALWCPYDTA) parameter was specified on the precompiler command or the STRSQL command with a value of *NO. This value indicates that the queries should always use data directly retrieved from the database, so that the data always reflects the current values. Certain types of SQL queries can not be resolved without making a copy of the data. Examples would be queries using the keywords DISTINCT or UNION. The query being run is a query which requires a copy of the data.
Recovery Text: Specify a different value for the ALWCPYDTA parameter or change the SQL statement so that it can be evaluated without using a temporary result.
SQLCODE or SQLCODEs: -527
SQLSTATE or SQLSTATEs: 42874
SQL0530
Message Text: Operation not allowed by referential constraint &1 in &2.
Cause Text: If this is an INSERT, UPDATE, or MERGE statement, the value is not valid for the foreign key because it does not have a matching value in the parent key. If this is a DELETE or MERGE statement affected by a SET DEFAULT delete rule, the default value is not valid for the same reason. If this is an ALTER TABLE statement, the result of the operation would violate the constraint &1. Constraint &1 in &2 for table &3 in &4 requires that any non-null value of the foreign key have a matching value in the parent key.
Recovery Text: To conform to the constraint rule, you must either:
  • change the INSERT, UPDATE, or MERGE value to match a value in the parent key,
  • insert a row in the parent file that matches the foreign key values being inserted or updated.
  • insert a row in the parent file that matches the foreign key default values of the dependent rows. Otherwise, you must drop the referential constraint.
SQLCODE or SQLCODEs: -530
SQLSTATE or SQLSTATEs: 23503
SQL0531
Message Text: Update prevented by referential constraint &1 in &2.
Cause Text: Constraint &1 in &2 identifies the table being updated as the parent table in a relationship with dependent table &3 in &4, with an update rule of RESTRICT or NO ACTION. The update of a parent key is prevented when there are rows in the dependent table with matching values.
Recovery Text: In order to perform this update, you must either drop the constraint, or delete the rows in the dependent table that are dependent on this row.
SQLCODE or SQLCODEs: -531
SQLSTATE or SQLSTATEs: 23001, 23504
SQL0532
Message Text: Delete prevented by referential constraint &1 in &2.
Cause Text: Constraint &1 in &2 identifies the table being modified as the parent table in a relationship with dependent table &3 in &4, with a delete rule of RESTRICT or NO ACTION. The deletion of a row is prevented when there are rows in the dependent table with matching values.
Recovery Text: In order to delete the row, you must either drop the constraint, or delete the rows in the dependent table that are dependent on this row.
SQLCODE or SQLCODEs: -532
SQLSTATE or SQLSTATEs: 23001, 23504
SQL0536
Message Text: Delete not allowed because table &1 in &2 in subquery can be affected.
Cause Text: The delete operation can not be performed because table &1 in &2, which is referenced in a subquery, may be affected by the operation. &1 in &2 is a dependent table in a referential constraint that has a delete rule of CASCADE, SET NULL, or SET DEFAULT.
Recovery Text: Change the statement so that the subquery does not refer to a dependent table, or drop the constraint that defines the relationship between the two tables.
SQLCODE or SQLCODEs: -536
SQLSTATE or SQLSTATEs: 42914
SQL0537
Message Text: Duplicate column name &1 in definition of key.
Cause Text: Column &1 is specified more than once in the list of columns for a primary, unique, foreign, or partitioning key or in the list of columns for the key expression of a CREATE INDEX statement. Columns may only be specified once in the definition of a key. Index columns named using the AS clause must have different names than the columns in the table.
Recovery Text: Remove the duplicate column from the list of columns for the key or rename the column. Try the request again.
SQLCODE or SQLCODEs: -537
SQLSTATE or SQLSTATEs: 42709
SQL0538
Message Text: The FOREIGN key in constraint &1 in &2 not same as the parent key.
Cause Text: The FOREIGN key in constraint &1 in &2 is not the same as the parent key of table &3 in &4. The FOREIGN key must have the same number of columns as the parent key and the data type, attributes, and field procedure of the FOREIGN key must be identical to the data type, attributes, and field procedure of the corresponding column of the parent key.
Recovery Text: Correct the statement so that the description of the FOREIGN key conforms to that of the parent key of the specified table.
SQLCODE or SQLCODEs: -538
SQLSTATE or SQLSTATEs: 42830
SQL0539
Message Text: Table &1 in &2 does not have a primary or unique key.
Cause Text: Table &1 in &2 was specified either as the parent table in a referential constraint, or as the table from which to drop the primary or unique key in an ALTER TABLE statement. When no referencing column list is specified in a referential constraint, an attempt is made to use the primary key of the parent table. Table &1 has no primary key defined.
Recovery Text: Correct the statement so that a referencing column list is specified in the FOREIGN KEY clause that matches the FOREIGN KEY column list, or define a primary key for the table being used as a parent. If this is an attempt to drop a primary or unique key, no recovery is necessary.
SQLCODE or SQLCODEs: -539
SQLSTATE or SQLSTATEs: 42888
SQL0541
Message Text: Duplicate UNIQUE constraint exists for table &1 in &2.
Cause Text: An attempt was made to add UNIQUE constraint &3 in &4. Table &1 in &2 already has a UNIQUE constraint that is a duplicate of the constraint being added. A UNIQUE constraint is a duplicate if the columns in the constraint are the same as the columns in another UNIQUE constraint, even if the columns are not in the same order. Constraint &1 cannot be added.
Recovery Text: The constraint is already in effect. To change the name of the UNIQUE constraint, drop the duplicate constraint and try the request again.
SQLCODE or SQLCODEs: -541
SQLSTATE or SQLSTATEs: 42891
SQL0542
Message Text: Null values not allowed for column &1 of a PRIMARY key.
Cause Text: Column &1 is defined to be a column of a PRIMARY KEY. A column of a PRIMARY KEY cannot allow null values.
Recovery Text: Create the column so null values are not allowed.
SQLCODE or SQLCODEs: -542
SQLSTATE or SQLSTATEs: 42831
SQL0543
Message Text: Constraint &1 conflicts with SET NULL or SET DEFAULT rule.
Cause Text: Constraint &1 is a CHECK constraint that conflicts with an existing referential constraint that has either a SET NULL or a SET DEFAULT rule.
Recovery Text: Change the CHECK constraint so it does not conflict with the referential constraint rule, or drop the referential constraint.
SQLCODE or SQLCODEs: -543
SQLSTATE or SQLSTATEs: 23511
SQL0544
Message Text: CHECK constraint &1 cannot be added.
Cause Text: Existing data in the table violates the CHECK constraint rule in constraint &1. The constraint cannot be added.
Recovery Text: Change the data in the table so that it follows the constraint specified in &1. Try the request again.
SQLCODE or SQLCODEs: -544
SQLSTATE or SQLSTATEs: 23512
SQL0545
Message Text: INSERT, UPDATE, or MERGE not allowed by CHECK constraint.
Cause Text: The value being inserted or updated does not meet the criteria of CHECK constraint &1. The operation is not allowed.
Recovery Text: Change the values being inserted or updated so that the CHECK constraint is met. Otherwise, drop the CHECK constraint &1.
SQLCODE or SQLCODEs: -545
SQLSTATE or SQLSTATEs: 23513
SQL0546
Message Text: CHECK condition of constraint &1 not valid.
Cause Text: The CHECK condition of constraint &1 is not valid for one of the following reasons:
  • A column level CHECK condition refers to some other column in the table.
  • The CHECK condition refers to a column that is not in this table.
  • The CHECK condition refers to a special register.
  • The CHECK condition uses an aggregate function (such as AVG or COUNT), a user-defined function, or an OLAP specification.
  • The CHECK condition contains a subselect.
  • The CHECK condition uses a built-in scalar function that is not allowed.
  • The CHECK condition uses an expression involving LOBs.
  • The CHECK condition uses an incompatible data type.
  • The CHECK condition contains ROW CHANGE TIMESTAMP or ROW CHANGE TOKEN.
  • The CHECK condition contains a sequence reference.
  • The CHECK condition refers to a global variable.
  • The CHECK condition refers to an XML column.
  • The column specified on the ON INSERT VIOLATION and ON UPDATE VIOLATION clauses must be specified in the CHECK condition.
  • The same column name must be specified for the ON INSERT VIOLATION and the ON UPDATE VIOLATION clauses.
Recovery Text: Correct the error. Try the request again.
SQLCODE or SQLCODEs: -546
SQLSTATE or SQLSTATEs: 42621
SQL0551
Message Text: Not authorized to object &1 in &2 type *&3.
Cause Text: An operation was attempted on object &1 in &2 type *&3. This operation cannot be performed without the required authority.
Recovery Text: Obtain the required authority from either the security officer, the object owner, or a user that is authorized to the QIBM_DB_SECADM function. If you are not authorized to a logical file, obtain the authority to the based-on files of the logical file. Try the operation again.
SQLCODE or SQLCODEs: +551, -551
SQLSTATE or SQLSTATEs: 01548, 42501
SQL0552
Message Text: Not authorized to &1.
Cause Text: The operation cannot be performed without the required authority.
  • CREATE TABLE requires *USE authority to the CRTPF command.
  • CREATE VIEW or CREATE INDEX requires *USE authority to the CRTLF command.
  • CREATE ALIAS requires *USE authority to the CRTDDMF command.
  • CREATE SCHEMA requires *USE authority to the CRTLIB command.
  • ALTER TABLE requires *USE authority to the ADDPFCST command in order to add constraints, and *USE authority to the RMVPFCST command in order to drop constraints.
  • ALTER TRIGGER requires *USE authority to the CHGPFTRG command.
  • CREATE PROCEDURE or CREATE FUNCTION requires *OBJOPR and *ADD authority to the catalog table SYSROUTINES in QSYS2.
  • DROP PROCEDURE or DROP FUNCTION requires *OBJOPR and *DLT authority to the catalog table SYSPARMS in QSYS2.
  • CREATE TYPE requires *OBJOPR and *ADD authority to the catalog table SYSTYPES in QSYS2.
  • DROP TYPE requires *OBJOPR and *DLT authority to the catalog table SYSTYPES in QSYS2.
  • CREATE TRIGGER requires *USE authority to the ADDPFTRG command.
  • DROP TRIGGER requires *USE authority to the RMVPFTRG command.
  • CREATE SEQUENCE requires *USE authority to the CRTDTAARA command.
  • DROP SEQUENCE requires *USE authority to the DLTDTAARA command.
  • ALTER SEQUENCE requires *USE authority to the RTVDTAARA and CRTDTAARA commands.
  • The COMMENT ON statements for procedures, functions, types, triggers and sequences require *OBJOPR, *READ, and *UPD authority to the catalog table associated with the object.
  • SET SESSION AUTHORIZATION requires that the authorization ID associated with the statement has *ALLOBJ special authority.
  • SET CURRENT DEGREE and the QSYS2/RESET_ENVIRONMENTAL_LIMITS procedure require that the authorization ID associated with the statement has *JOBCTL special authority or be authorized to the QIBM_DB_SQLADM function.
  • CREATE, ALTER, DROP, LABEL ON and COMMENT ON of a MASK or PERMISSION requires that the authorization ID associated with the statement be authorized to the QIBM_DB_SECADM function. The same authorization is required to RENAME, DROP or delete an object that is referenced by a mask or permission and to CREATE, DROP, or ALTER a secure TRIGGER or FUNCTION.
Recovery Text: Obtain authority from the security officer and try the operation again.

Authorization to the QIBM_DB_SQLADM and QIBM_DB_SECADM functions can be handled by Application Administration in System i Navigator. The Change Function Usage (CHGFCNUSG) command can also be used to allow or deny use of the function. For example: CHGFCNUSG FCNID(QIBM_DB_SQLADM) USER(xxxxx) USAGE(*ALLOWED).

SQLCODE or SQLCODEs: +552, -552
SQLSTATE or SQLSTATEs: 01542, 28000, 42502
SQL0553
Message Text: Schema name &1 not allowed.
Cause Text: Schema name &1 not allowed since it is a reserved word.
Recovery Text: Change the schema name to a non-reserved word.
SQLCODE or SQLCODEs: -553
SQLSTATE or SQLSTATEs: 42939
SQL0557
Message Text: Privilege not valid for &1 in &2.
Cause Text: The specified privilege is not valid for one of the following reasons:
  • An INDEX privilege is valid for tables and physical files but not for views. An index cannot be created on a view.
  • The specified privilege is not valid because table or view &1 in &2 does not have that capability. For example: DELETE, INSERT, and UPDATE privileges are not valid for a read-only view.
  • WRITE privilege is not valid because &1 in &2 is a read-only global variable.
Recovery Text: Specify a table or view that has the correct capability or remove the privilege that is not valid from the SQL statement.
SQLCODE or SQLCODEs: -557
SQLSTATE or SQLSTATEs: 42852
SQL0567
Message Text: Authorization name &1 is not allowed.
Cause Text: The authorization name cannot be a system-supplied user profile such as QSYS, QDFTOWN, or QSPL.
Recovery Text: Change the name and try the request again.
SQLCODE or SQLCODEs: -567
SQLSTATE or SQLSTATEs: 28000, 42501
SQL0569
Message Text: Not all requested privileges revoked from object &1 in &2 type *&3.
Cause Text: A REVOKE operation was attempted on object &1 in &2 type *&3, but the privilege was not revoked. Either you do not have the specified privilege to object &1, you do not have *OBJMGT authority to object &1, you are not authorized to the QIBM_DB_SECADM function, or you tried to revoke the privilege from someone who does not currently have that privilege.

All valid requested privileges were revoked.

Recovery Text: If revoking a privilege from someone who does not currently have that privilege, then no action is required.

If you do not have the privilege, change the REVOKE statement to specify valid privileges.

SQLCODE or SQLCODEs: +569, -569
SQLSTATE or SQLSTATEs: 01006, 56092
SQL0570
Message Text: Not all requested privileges to object &1 in &2 type *&3 granted.
Cause Text: A GRANT operation was attempted on object &1 in &2 type *&3 but the privilege was not granted for one of the following reasons.

-- You do not have all of the privileges to be granted.

-- You are attempting to perform a GRANT statement using WITH GRANT OPTION but are not the object owner.

-- You do not have *OBJMGT authority to the object.

-- You do not have *ALLOBJ special authority.

-- You are not authorized to the QIBM_DB_SECADM function.

-- You are attempting to perform a GRANT of WRITE privileges for a read-only global variable.

All valid requested privileges were granted.

Recovery Text: Obtain the required authority from either the security officer or the object owner. Try the operation again.
SQLCODE or SQLCODEs: +570
SQLSTATE or SQLSTATEs: 01007
SQL0573
Message Text: Table &1 in &2 does not have a matching parent key.
Cause Text: A referencing column list was specified in the FOREIGN KEY clause for constraint &3 in &4. The parent table &1 in &2 does not have a matching PRIMARY or UNIQUE key. If the file is partitioned, the access path of the parent file must be non-partitioned. The constraint cannot be added.
Recovery Text: Do one of the following and try the request again:
  • Specify a table in the FOREIGN KEY clause that has a PRIMARY or UNIQUE key that matches the referencing column list.
  • Change the referencing column list to match the definition of the PRIMARY or UNIQUE key defined on the parent table.
  • If the parent file is partitioned, add a non-partitioned access path.
SQLCODE or SQLCODEs: -573
SQLSTATE or SQLSTATEs: 42890
SQL0574
Message Text: Column, sequence, or variable attribute is not valid.
Cause Text: Either the DEFAULT value, identity attribute value, or generated column data type for column &3 in &1 in &2 is not valid, a sequence attribute value for sequence &1 in &2 is not valid, a constant value for an SQL variable is not valid, or an assigned value for cycle column &3 is not valid.

For a DEFAULT value, the incorrect value may either be specified in this statement or it may already be defined for the column and is not compatible with the new attributes specified on the ALTER TABLE statement.

The values must conform to the following rules:

  • The DEFAULT value must be compatible with the data type of the column. A floating-point constant can only be a default value for a floating-point or DECFLOAT column. A DECFLOAT constant can only be a default value for a DECFLOAT column.
  • The DEFAULT value must not be too long for the column.
  • If the column is defined as a date, time, or timestamp the DEFAULT value must be a valid string representation of that type.
  • If the DEFAULT value is defined as the value of the USER special register, the column must be defined as a CHAR or VARCHAR and the length attribute must be greater than or equal to 18.
  • The CCSID of the DEFAULT value must be compatible with the CCSID of the column.
  • The DEFAULT value for a column that is a user-defined type must either be promotable to the source type or must be cast to the user-defined type using the cast function for the type.
  • A DEFAULT value cannot be specified for a DataLink or an XML column or SQL variable.

For a generated column the data type and length must exactly match the definition of the special register, built-in global variable, or data change operation.

For an identity column or a sequence, the values specified for the START WITH, INCREMENT BY, MINVALUE, MAXVALUE, and RESTART WITH options must have a scale of zero.

For an SQL variable, CONSTANT cannot be specified for DataLink or XML data types.

For a recursive common table expression cycle column name, the assignment value must be a character string with a length of one.

Recovery Text: Change the value to one that is valid for the column, sequence, or variable. Try the request again.
SQLCODE or SQLCODEs: -574
SQLSTATE or SQLSTATEs: 42894
SQL0577
Message Text: Modifying SQL data not permitted.
Cause Text: One of the following errors has occurred:
  • A procedure was called or a function was invoked that was created with READS SQL DATA or CONTAINS SQL DATA specified as the data access attribute. A procedure or function created with READS SQL DATA or CONTAINS SQL DATA, or any procedure or function that is called by the procedure or function, cannot change data and cannot call a procedure or function that has the MODIFIES SQL DATA attribute.
  • READS SQL DATA and CONTAINS SQL DATA cannot be specified on the CREATE PROCEDURE, ALTER PROCEDURE, CREATE FUNCTION, or ALTER FUNCTION statements for an SQL procedure or function if the routine body contains statements that change data.
  • A global variable default value used a function that changes data.

Statements that change data include INSERT, UPDATE, DELETE, MERGE, REFRESH TABLE, GRANT, REVOKE, LABEL, COMMENT, and any CREATE, DROP, or ALTER statements. If the error occurred in a procedure or function, the routine name is &1 and the specific name is &2.

Recovery Text: Ensure procedures or functions created with READS SQL DATA or CONTAINS SQL DATA do not call procedures or functions that change SQL data. Specify MODIFIES SQL DATA when creating functions that change SQL data. The default value for a CREATE VARIABLE statement cannot modify SQL data.
SQLCODE or SQLCODEs: -577
SQLSTATE or SQLSTATEs: 2F002, 38002, 42985
SQL0578
Message Text: RETURN statement not executed for SQL function &1 in &2.
Cause Text: During the execution of SQL function &1 in &2, the end of the routine body was reached without executing a RETURN statement.
Recovery Text: Add a RETURN statement to the end of the function routine body. Try the request again.
SQLCODE or SQLCODEs: -578
SQLSTATE or SQLSTATEs: 2F005
SQL0579
Message Text: Reading SQL data not permitted.
Cause Text: One of the following errors has occurred:
  • A procedure was called or a function was invoked that was created with CONTAINS SQL DATA as the data access attribute. A procedure or function created with CONTAINS SQL DATA or any procedure or function that is called by the procedure or function, cannot read data and cannot call a procedure or function that has the READS SQL DATA attribute.
  • CONTAINS SQL DATA cannot be specified on the CREATE PROCEDURE, ALTER PROCEDURE, CREATE FUNCTION, or ALTER FUNCTION statements for an SQL procedure or function if the routine body contains statements that read data.
  • A trigger containing SQL statements was activated.

If the error occurred in a procedure or function, the routine name is &1 and the specific name is &2.

Recovery Text: Ensure procedures and functions created with CONTAINS SQL DATA do not call procedures or functions that read SQL data.
SQLCODE or SQLCODEs: -579
SQLSTATE or SQLSTATEs: 2F004, 38004, 42985
SQL0580
Message Text: At least one result in CASE expression must be not NULL.
Cause Text: The NULL value, a parameter marker, or the RAISE_ERROR scalar function is specified for all results in a CASE expression. At least one result in a CASE expression must be a value other than NULL, a parameter marker, or the RAISE_ERROR scalar function.
Recovery Text: Change the CASE expression to have at least one result expression following a THEN or ELSE keyword to be some value other than NULL, a parameter marker, or the RAISE_ERROR scalar function. Try the request again.
SQLCODE or SQLCODEs: -580
SQLSTATE or SQLSTATEs: 42625
SQL0581
Message Text: The results in a CASE expression are not compatible.
Cause Text: The expressions specified as the result values of a CASE expression are not compatible.
Recovery Text: Change the results in the CASE expression to values that are compatible. Try the request again.
SQLCODE or SQLCODEs: -581
SQLSTATE or SQLSTATEs: 42804
SQL0583
Message Text: Use of function &1 in &2 not valid.
Cause Text: Function &1 in &2 cannot be invoked where specified because it is defined to be not deterministic or contains an external action. Functions that are not deterministic cannot be specified in a GROUP BY clause or in a JOIN clause, or in the default clause for a global variable. Functions that are not deterministic or contain an external action cannot be specified in a PARTITION BY clause or an ORDER BY clause for an OLAP function and cannot be specified in the select list of a query that contains an OFFSET clause. The RAISE_ERROR function cannot be specified in a GROUP BY or HAVING clause.
Recovery Text: Remove the function. Try the request again.
SQLCODE or SQLCODEs: +583, -583
SQLSTATE or SQLSTATEs: 01685, 42845
SQL0584
Message Text: NULL or parameter marker in VALUES not allowed.
Cause Text: Each column in a VALUES clause must have a data type. All rows for a column cannot contain NULL, a parameter marker, or the RAISE_ERROR scalar function.
Recovery Text: Ensure every column has at least one value with a defined type. A CAST specification can be used to assign a type. Try the request again.
SQLCODE or SQLCODEs: -584
SQLSTATE or SQLSTATEs: 42608
SQL0585
Message Text: Schema &1 used incorrectly in the specified path.
Cause Text: An incorrect path was specified on the SET PATH or the SET OPTION SQLPATH statement. One of the following errors has occurred:
  • &1 is specified more than once in the path.
  • *LIBL is not the only value specified in the path.
  • If the schema name is *N, one of USER, CURRENT PATH, or SYSTEM PATH is specified more than one time in the path.
Recovery Text: Specify a valid path. Try the request again.
SQLCODE or SQLCODEs: -585
SQLSTATE or SQLSTATEs: 42732
SQL0590
Message Text: Name &1 specified in procedure or function &2 not unique.
Cause Text: &1 is specified as a parameter, SQL variable, condition, or label in SQL procedure or function &2. The name is not unique.
Recovery Text: Change the name so that it is unique.
SQLCODE or SQLCODEs: -590
SQLSTATE or SQLSTATEs: 42734
SQL0593
Message Text: Generated column &1 must be NOT NULL.
Cause Text: NOT NULL must be specified for column &1. ROW CHANGE TIMESTAMP columns, ROW BEGIN columns, and ROW END columns do not support null values.
Recovery Text: Change the statement to specify NOT NULL for column &1. Try the request again.
SQLCODE or SQLCODEs: -593
SQLSTATE or SQLSTATEs: 42831
SQL0595
Message Text: Commit level *&1 escalated to *&2 lock.
Cause Text: *&1 was specified for the commit level, but *&1 was not used. The base tables were locked *&2 to satisfy the request for commitment level of *&1. If a ROLLBACK HOLD statement is requested, the cursor will remain in the same position.

*&1 was not used for one of the following reasons:

  • A GROUP BY clause, HAVING clause, or an aggregate function was specified in the statement.
  • A DISTINCT keyword was specified in the statement.
  • A UNION keyword was specified in the statement.
  • A join was specified in the statement, but not all of the tables are journaled to the same journal.
  • The repeatable read commit level is implemented by DB2 for IBM i by locking the table.
Recovery Text: If escalation of commit level is not desired, change the statement or the requested commit level. If a lock level of share-no-update (*SHRNUP) was granted, but is not acceptable, specify *CHG or *NONE for the commit level.
SQLCODE or SQLCODEs: +595
SQLSTATE or SQLSTATEs: 01526
SQL0596
Message Text: Error occurred during DISCONNECT of relational database &1.
Cause Text: An error occurred during DISCONNECT of relational database &1. However, this did not prevent the successful disconnect of relational database &1. Refer to the previous messages for a description of the error.
Recovery Text: None required.
SQLCODE or SQLCODEs: +596
SQLSTATE or SQLSTATEs: 01002
SQL0601
Message Text: &1 in &2 type *&3 already exists.
Cause Text: An attempt was made to create &1 in &2 or to rename a table, view, alias, or index to &1, but &1 already exists. All tables, views, aliases, indexes, SQL packages, sequences, global variables, masks, permissions, constraints, triggers, user-defined types, and XSR objects in the same schema must have unique names.
  • If &1 is a temporary table, it cannot be replaced unless the WITH REPLACE clause is specified.
  • If the schema name is *N, this is a CREATE SCHEMA statement. If this is a CREATE TABLE or ALTER TABLE statement and the type is *N, &1 is a constraint.
Recovery Text: Change &1 to a name that does not exist, or delete, move, or rename the existing object. If this is a temporary table, use the WITH REPLACE clause. If creating an SQL package, specify REPLACE(*YES) on CRTSQLPKG. Try the request again.
SQLCODE or SQLCODEs: -601
SQLSTATE or SQLSTATEs: 42710
SQL0602
Message Text: More than 120 columns specified for CREATE INDEX.
Cause Text: Only 120 columns are allowed in the CREATE INDEX statement.
Recovery Text: Reduce the number of column names in the column list to the maximum of 120 names. Try the request again.
SQLCODE or SQLCODEs: -602
SQLSTATE or SQLSTATEs: 54008
SQL0603
Message Text: Unique index cannot be created because of duplicate keys.
Cause Text: An attempt was made to create unique index &1 in &2 or add unique constraint &1 in &2. The operation cannot be performed because the rows in table &3 in &4 contain one or more duplicate values in the columns used to create the index.
Recovery Text: Do one of the following and try the request again:
  • Remove the UNIQUE attribute from the CREATE INDEX statement.
  • Remove the UNIQUE constraint from the ALTER TABLE statement.
  • Change the data in the related table so that all key values are unique.
  • Specify UNIQUE WHERE NOT NULL on the CREATE INDEX statement if the duplicate keys contain nulls. The uniqueness restriction would not apply when the key value contains nulls.

For information on what rows contain the duplicate key values, see the previously listed messages in the job log.

SQLCODE or SQLCODEs: -603
SQLSTATE or SQLSTATEs: 23515
SQL0604
Message Text: Attributes not valid.
Cause Text: One of the following contains a data type, length, precision, scale, or an ALLOCATE attribute that is not valid.
  • A column in the CREATE TABLE, ALTER TABLE, DECLARE GLOBAL TEMPORARY TABLE, or CREATE GLOBAL TEMPORARY TABLE statement, or an INCLUDE column in an INSERT statement.
  • A parameter or an SQL variable in the DECLARE PROCEDURE, CREATE PROCEDURE, ALTER PROCEDURE, CREATE FUNCTION, ALTER FUNCTION, or CREATE TRIGGER statement.
  • The CAST scalar function.
  • A CREATE TYPE source data type.
  • A CREATE VARIABLE data type.

The definition is not valid for one of the following reasons:

  • If a DECIMAL or NUMERIC data type is specified, precision must be from 1 through 63 and the scale must be between 0 and the precision.
  • If DECFLOAT is specified, the precision must be omitted or must be 16 or 34.
  • If CHARACTER or BINARY is specified, the length must be from 1 through 32766 for a parameter or for a column that does not allow null values or from 1 through 32765 for a column that allows null values.
  • If VARCHAR or VARBINARY is specified, the length must be from 1 through 32740 for a parameter or for a column that does not allow null values or from 1 through 32739 for a column that allows null values.
  • If the FOR MIXED DATA clause or a mixed CCSID is specified, the length cannot be less than 4.
  • If GRAPHIC or NCHAR is specified, the length must be from 1 through 16383 for a parameter or for a column that does not allow null values and from 1 through 16382 for a column that allows null values. The length specified is the number of DBCS characters.
  • If VARGRAPHIC or NVARCHAR is specified, the length must be from 1 through 16370 for a parameter or for a column that does not allow null values or from 1 through 16369 for a column that allows null values. The length specified is the number of DBCS characters.
  • If BLOB or CLOB is specified, the length must be from 1 through 2G (2048 M or 2,097,152 K or 2,147,483,647 bytes). If DBCLOB or NCLOB is specified, the length must be from 1 through 1073741823.
  • If TIMESTAMP is specified, the precision must be from 0 to 12.
  • If DATALINK is specified, the length must be from 1 through 32717.
  • If VARCHAR, VARGRAPHIC, NVARCHAR, VARBINARY, CLOB, BLOB, DBCLOB, NCLOB, or DATALINK is specified, the ALLOCATE attribute must be less than or equal to both the length attribute specified and 32766.
  • DATALINK and array types cannot be specified as the type of a global variable.
  • When defining an array type, the length of a CLOB or BLOB cannot exceed 1048576 and the length of a DBCLOB cannot exceed 524288.
  • ARRAY[0] cannot be specified on CREATE TYPE.
Recovery Text: Correct the length, precision, scale, or ALLOCATE attribute. Try the request again.
SQLCODE or SQLCODEs: -604
SQLSTATE or SQLSTATEs: 42611
SQL0607
Message Text: Operation not allowed on system table &1 in &2.
Cause Text: The table or view &1 in &2 is a catalog or system table. Catalogs, system tables and system triggers cannot be changed or locked by the user.
Recovery Text: Change the SQL statement to refer to a table that is not a system table. Try the request again.
SQLCODE or SQLCODEs: -607
SQLSTATE or SQLSTATEs: 42832
SQL0612
Message Text: &1 is a duplicate column name.
Cause Text: One of the following errors has occurred:
  • Column &1 is specified more than once on a CREATE TABLE or CREATE VIEW statement. Column names and system column names must be unique in a table or view.
  • Column &1 is specified in the ADD clause of an ALTER TABLE statement. Column &1 already exists in the table.
  • Column &1 is specified more than once in the ALTER, DROP, or ADD clauses of an ALTER TABLE statement.
  • Column &1 is specified more than once in the column list of a common table expression or in the correlation clause for a table or derived table.
  • Column &1 is specified more than once in the column list of an UPDATE trigger.
  • Column &1 is specified more than once in the RETURNS TABLE clause of a CREATE FUNCTION statement. The return column names for a user defined table function must be unique.
  • Column &1 is specified more than once in the CYCLE column list of the recursive common table expression.
  • Column &1 is specified more that once in the COLUMNS clause for XMLTABLE.
  • AS name &1 specified more than once for XMLTABLE.
  • A SYSTEM_TIME period is defined for the table and a column is named SYSTEM_TIME.
Recovery Text: Do one of the following and try the request again:
  • Specify unique names for each of the columns.
  • Remove the column from all but one clause of a single ALTER TABLE statement. Multiple statements can be specified, if required.
SQLCODE or SQLCODEs: -612
SQLSTATE or SQLSTATEs: 42711
SQL0613
Message Text: Key is too long or contains too many columns.
Cause Text: One of the following has occurred:
  • The PRIMARY or UNIQUE key cannot be created for constraint &1 in &2.
  • The partitioning key for the table is too long.

Either more than 120 columns were specified in a key or the sum of the lengths of the columns specified in the key exceeds the maximum of 32768 bytes. If the list contains null capable columns then an additional byte is required for the length of each null capable column. If the list contains variable length columns, then the 2-byte length of the columns is included in the total length. The key length may be too long if an ICU (UNICODE) table is being used. The internal expansion of the key can be up to six times the user specified key length due to translation. See previous messages for details.

Recovery Text: Remove some of the columns from the key or change the length attributes of the columns so that the total length of the key does not exceed the maximum. Try the request again.
SQLCODE or SQLCODEs: -613
SQLSTATE or SQLSTATEs: 54008
SQL0614
Message Text: Length of columns for CREATE INDEX too long.
Cause Text: The sum of the lengths of the columns specified in a CREATE INDEX exceeds the maximum of 32768 bytes. If the list contains null capable columns then an additional byte is required for each null capable column. If the index contains variable length columns, then the 2-byte length of the columns is included in the total length. The key length may be too long if an ICU (UNICODE) table is being used. The internal expansion of the key can be up to six times the user specified key length due to translation. See previous messages for details.
Recovery Text: Reduce the length by deleting some of the columns from the CREATE INDEX column list. Try the request again.
SQLCODE or SQLCODEs: -614
SQLSTATE or SQLSTATEs: 54008
SQL0615
Message Text: Object &1 in &2 type *&3 not dropped. It is in use.
Cause Text: Object &1 in &2 type *&3 was not dropped because it is already being used by the same application process. If the object is a table, it may be in use by an open cursor. If the object is an SQL package, the package may currently be running.
Recovery Text: If the object is a table, the cursor must be closed. If the object is an SQL package, the SQL package cannot drop itself. Try the drop request again.
SQLCODE or SQLCODEs: -615
SQLSTATE or SQLSTATEs: 55006
SQL0616
Message Text: &1 in &2 type &3 cannot be dropped with RESTRICT.
Cause Text: An attempt was made to drop &1 in &2 with the RESTRICT option. &1 cannot be dropped because a view, a constraint, a trigger, a materialized query table, a history table, or an index is dependent on it.
Recovery Text: Specify CASCADE on the ALTER TABLE statement to drop &1 and the views, constraints, triggers, materialized query tables, history tables, and indexes that are dependent on it. If this is a CREATE OR REPLACE TABLE statement, the dependency must be removed before the table can be replaced. Try the request again.
SQLCODE or SQLCODEs: -616
SQLSTATE or SQLSTATEs: 42893
SQL0624
Message Text: Table &1 in &2 already has a primary key.
Cause Text: An attempt was made to add a primary or unique key to table &1 in &2. Either a primary key is already defined for this table, or the table has an access path which does not match the key being added. A table can only have one primary key. The constraint cannot be added.
Recovery Text: Drop the primary key currently defined on the table or add the constraint as a UNIQUE constraint. If the table's access path does not match, make sure that the number of columns in the constraint match the number of columns in the access path. Try the request again.
SQLCODE or SQLCODEs: -624
SQLSTATE or SQLSTATEs: 42889
SQL0628
Message Text: Clauses not valid in same definition.
Cause Text: Clauses specified to define the attributes of a column, a sourced function, a procedure, a trigger, or an index are not valid. One of the following has occurred:
  • More than one of the clauses FOR BIT DATA, FOR SBCS DATA, FOR MIXED DATA, or CCSID was specified for a column definition.
  • READ PERMISSION FS and WRITE PERMISSION BLOCKED were specified for a DataLink column.
  • READ PERMISSION DB and WRITE PERMISSION FS were specified for a DataLink column.
  • WRITE PERMISSION FS and the ON UNLINK clause were specified for a DataLink column.
  • INCLUDING or EXCLUDING COLUMN DEFAULTS and USING TYPE DEFAULTS were specified for a table.
  • A clause was specified that is not valid when creating a sourced function.
  • A RETURNS clause was specified for ALTER FUNCTION, but the alter did not specify REPLACE.
  • AUTONOMOUS is specified for a procedure and COMMIT ON RETURN or DYNAMIC RESULT SETS with a non-zero value is also specified.
  • WITH RETURN is specified for a cursor in a compound (dynamic) statement.
  • FOR EACH STATEMENT is specified for a BEFORE or INSTEAD OF trigger or is specified with MODE DB2ROW.
  • MODE DB2SQL is specified for a BEFORE trigger and the trigger contains a reference to the trigger table.
  • A WHEN clause or an UPDATE column list is specified for an INSTEAD OF trigger.
  • A correlation name with OLD ROW or NEW ROW and a SET OPTION for date or time option were specified.
  • For CREATE INDEX, the RCDFMT clause cannot be specified if the INCLUDE clause is specified. The INCLUDE clause requires the ENCODED VECTOR clause.
  • The option specified on SET OPTION DBGVIEW is not consistent with the value specified for the DEBUG MODE.
  • The SET OPTION CONACC option cannot be specified with routine option CONCURRENT ACCESS RESOLUTION.
  • The SET OPTION SYSTIME option cannot be specified with routine option SYSTEM_TIME SENSITIVE.
Recovery Text: Change or remove a clause so that the definition is valid. Try the request again.
SQLCODE or SQLCODEs: -628
SQLSTATE or SQLSTATEs: 42613
SQL0629
Message Text: SET NULL not allowed for referential constraint &1 in &2.
Cause Text: SET NULL was specified in the REFERENCES clause for referential constraint &1. None of the columns in the foreign key allows null values.
Recovery Text: Create the table so that at least one of the columns in the foreign key allows null values or specify a different default action on the ON DELETE clause. Try the request again.
SQLCODE or SQLCODEs: -629
SQLSTATE or SQLSTATEs: 42834
SQL0631
Message Text: Foreign key for referential constraint &1 in &2 too long.
Cause Text: The FOREIGN key cannot be created for constraint &1 in &2. Either more than 120 columns were specified in a FOREIGN KEY clause or the sum of the lengths of the columns specified in the key exceeds the maximum of 32768 bytes. If the list contains null capable columns then an additional byte is required for the length of each null capable column. If the list contains variable length columns, then the 2-byte length of the columns is included in the total length.
Recovery Text: Remove some of the columns from the FOREIGN KEY clause. Try the request again.
SQLCODE or SQLCODEs: -631
SQLSTATE or SQLSTATEs: 54008
SQL0636
Message Text: Ranges specified for partition &1 not valid.
Cause Text: The ranges specified for the partitioning keys are not valid for one of the following reasons:
  • Partitions are not specified in the correct order.
  • ENDING value for a partition is less than the STARTING value.
  • Values specified in the EVERY clause are not valid for the range.
  • MINVALUE or MAXVALUE was specified for a start or end value and the statement contained an EVERY clause.
  • Partition keys overlap.
  • MINVALUE or MAXVALUE was specified for a start or end value of a partition key boundary and a subsequent key value for that range is not the same value.
Recovery Text: Specify valid ranges for the STARTING, ENDING, or EVERY clause. Try the request again.
SQLCODE or SQLCODEs: -636
SQLSTATE or SQLSTATEs: 56016
SQL0637
Message Text: Keyword or clause starting with &1 not valid.
Cause Text: Keyword or clause &1 is not valid for one of the following reasons:
  • DEFAULT, HIDDEN, ROW CHANGE TIMESTAMP, ROW BEGIN, ROW END, TRANSACTION START ID, FIELDPROC, UNIQUE, PRIMARY, each DataLink option, and each identity option can only be specified once in a column definition on a CREATE TABLE statement.
  • UNIQUE and PRIMARY cannot both be specified for the same column definition.
  • PRIMARY can only be specified once on a CREATE TABLE statement.
  • Each of the IDENTITY COLUMN ATTRIBUTES, COLUMN DEFAULTS, USING TYPE DEFAULTS, HIDDEN COLUMN ATTRIBUTES, and ROW CHANGE TIMESTAMP COLUMN ATTRIBUTES options can only be specified once.
  • For ALTER TABLE ALTER COLUMN, each SET or DROP option can only be specified once for a column.
  • For ALTER TABLE, ROW ACCESS CONTROL and COLUMN ACCESS CONTROL can each be specified only one time.
  • A check constraint can have only one ON INSERT VIOLATION and one ON UPDATE VIOLATION clause.
  • Each option for an XML function can be specified only one time.
  • Each of the FOR READ ONLY, FOR UPDATE, OPTIMIZE, isolation level, and SKIP LOCKED DATA clauses can only be specified once.
  • For CREATE TRIGGER, each of the INSERT, UPDATE, or DELETE events can be specified only one time.
  • Only one FOR ORDINALITY column can be defined in an XMLTABLE function.
  • Only one xquery-context-item-expression can be specified in the PASSING clause of XMLTABLE.
  • The attribute string for the PREPARE statement can only specify an option once and cannot contain conflicting options.
Recovery Text: Remove all but one specification for each keyword or clause. Try the request again.
SQLCODE or SQLCODEs: -637
SQLSTATE or SQLSTATEs: 42614
SQL0642
Message Text: Maximum number of constraints exceeded for &1 in &2.
Cause Text: A constraint cannot be added to table &1 in &2 because the table is already associated with 5000 constraints. This limit includes all constraints defined on the table and all referential constraints where the table is defined as a parent.
Recovery Text: Drop one of the other 5000 constraints, if possible, and try the request again.
SQLCODE or SQLCODEs: -642
SQLSTATE or SQLSTATEs: 54021
SQL0644
Message Text: ATTRIBUTES value &1 not valid.
Cause Text: The ATTRIBUTES string specified for the PREPARE statement contains &1, which is not correct. The type of SQL statement being prepared is &2.
Recovery Text: Remove or correct the invalid attribute and try again.
SQLCODE or SQLCODEs: -644
SQLSTATE or SQLSTATEs: 42615
SQL0645
Message Text: WHERE NOT NULL clause ignored for index &1 in &2.
Cause Text: UNIQUE WHERE NOT NULL was specified when creating index &1 in &2. However, none of the columns in the index allow null values. The index is created as a unique index.
Recovery Text: Remove the WHERE NOT NULL clause from the CREATE INDEX statement.
SQLCODE or SQLCODEs: +645
SQLSTATE or SQLSTATEs: 01528
SQL0658
Message Text: Function &1 in &2 cannot be dropped.
Cause Text: Function &1 in schema &2 cannot be dropped because it was implicitly generated by the CREATE DISTINCT TYPE statement.
Recovery Text: To drop the function, you must drop the distinct type with which this function is associated.
SQLCODE or SQLCODEs: -658
SQLSTATE or SQLSTATEs: 42917
SQL0662
Message Text: Partitioned index cannot be created for &1 in &2.
Cause Text: PARTITIONED or NOT PARTITIONED was specified on a CREATE INDEX statement, but table &1 in schema &2 is not a partitioned table.
Recovery Text: Remove the PARTITIONED clause from the statement. Try the request again.
SQLCODE or SQLCODEs: -662
SQLSTATE or SQLSTATEs: 53037
SQL0663
Message Text: Number of partitioning values is not correct.
Cause Text: Wrong number of values were specified in the STARTING or ENDING clause for partition &1. The number of values specified must match the number of key columns for the partitioning key.

Only one column can be specified in the partitioning key if the EVERY clause is used.

Recovery Text: Change the number of key limit values specified so that it matches the number of partitioning key columns or change the number of columns in the partitioning key. Try the request again.
SQLCODE or SQLCODEs: -663
SQLSTATE or SQLSTATEs: 53038
SQL0665
Message Text: The partition name or number &1 is not valid.
Cause Text: Partition name or partition number &1 was specified in a DROP PARTITION clause but does not refer to a partition in the table. The partition name or number specified must identify an existing partition from the table.
Recovery Text: Specifiy the partition name or number for an existing partition. Try the request again.
SQLCODE or SQLCODEs: -665
SQLSTATE or SQLSTATEs: 53039
SQL0666
Message Text: SQL query exceeds specified time limit or storage limit.
Cause Text: A database query was about to be started whose estimated run time of &1 exceeds the specified limit of &2 or whose estimated temporary storage usage of &3 exceeds the specified limit of &4. The query time limit and temporary storage limit are specified on the CHGQRYA CL command.
Recovery Text: The following changes to the query could reduce the estimated elapsed time or estimated amount of temporary storage usage.
  • Change the query so that fewer records are returned by adding more restrictive record selection specifications.
  • Change the record selection of the query so that an existing access path can be used to process the records more quickly.
  • Create an access path with keys that match the record selection of the query using the SQL CREATE INDEX statement.
  • Change the ordering specification so neither a temporary access path needs to be built nor a sort needs to be performed.
  • Change the grouping field specification to match the left-most key fields of an existing access path. This allows an existing access path to be used.
  • Specify the OPTIMIZE FOR NN ROWS clause where NN represents the actual number of records which are to be retrieved before the query is ended. This clause will cause the query optimizer to assume that the query will not be run to completion and consequently reduce the estimates.
  • Change the output type of your query to produce the results on the display.
  • Specify a new value for the query time limit with the QRYTIMLMT parameter of the CHGQRYA CL command.
  • Specify a new value for the query temporary storage limit with the QRYSTGLMT parameter of the CHGQRYA CL command.
  • Examine the query debug messages contained in the job log for performance information and suggestions. These messages will precede this message in the job log and will provide additional information and suggestions.
SQLCODE or SQLCODEs: -666
SQLSTATE or SQLSTATEs: 57005
SQL0667
Message Text: FOREIGN key value does not match a value in the parent key of constraint &1 in &2.
Cause Text: Every value in the FOREIGN key of the dependent table must have a matching value in the parent key of the parent table. For constraint &1 in &2, there is an existing value in FOREIGN key of table &3 in &4 that does not have a matching value in the parent table. The constraint cannot be added.
Recovery Text: Update the rows in either the dependent table or parent table so that all values of the FOREIGN key have matching values in the parent key, or modify the definition of the keys in the referential constraint. Try the request again.
SQLCODE or SQLCODEs: -667
SQLSTATE or SQLSTATEs: 23520
SQL0675
Message Text: Specified delete rule not allowed with trigger on table &1 in &2.
Cause Text: The delete rule specified in referential constraint &3 in &4 on table &1 in &2 is not allowed for the specified trigger. Constraint rule DELETE CASCADE is not allowed with a delete trigger. Constraint rules DELETE SET NULL and DELETE SET DEFAULT are not allowed with an update trigger.
Recovery Text: Either use the RMVPFTRG command to remove the trigger, use the RMVPFCST command to remove the constraint, define the constraint with a valid delete rule, or define the trigger with a different event.
SQLCODE or SQLCODEs: -675
SQLSTATE or SQLSTATEs: 42892
SQL0678
Message Text: Data type of literal &1 not compatible with column &3.
Cause Text: The literal specified is not compatible. If literal &1 is specified for the STARTING, ENDING, or EVERY clause, it is not compatible with column &3. The data type of column &3 is &2. If the literal is specified in a comparison with a numeric value, the literal is not a valid numeric value.
Recovery Text: Specify a valid literal. Try the request again.
SQLCODE or SQLCODEs: -678
SQLSTATE or SQLSTATEs: 53045
SQL0679
Message Text: Object &1 in &2 type *&3 not created due to pending operation.
Cause Text: The object &1 has an outstanding DROP or CREATE under commitment control which is preventing the create. This could have occurred in one of the following ways:
  • This application process has performed a DROP under commitment control which has not been committed and is now trying to create the same object using commitment control level *NONE.
  • A different application process has performed a DROP under commitment control which has not been committed.
  • This application process has performed a DROP under commitment control using a different commit definition and the DROP has not been committed.
  • This application process has performed a CREATE under commitment control which has not been committed and is now trying to use the object on a subsequent CREATE under commitment control level *NONE.
Recovery Text: Do one of the following and try the request again:
  • If it was your application process which issued the uncommitted DROP or CREATE statement then issue a COMMIT before attempting the creation of the object or issue the CREATE statement from a program using a commitment control level other than *NONE.
  • If the application process that issued the DROP on this object is not your application, then that application process must perform a COMMIT or a ROLLBACK of the DROP statement.
  • If your application process issued the uncommitted DROP or CREATE statement under a different commit definition, issue a COMMIT or ROLLBACK for that commit definition.
SQLCODE or SQLCODEs: -679
SQLSTATE or SQLSTATEs: 57006
SQL0680
Message Text: Too many columns specified.
Cause Text: Too many columns were specified in the definition of a user defined table function. A maximum of 8000 columns can be specified for the input parameters and the return columns combined. The actual number may be less and depends on the language.
Recovery Text: Reduce the number of parameters or return columns specified for the user defined table function. Try the request again.
SQLCODE or SQLCODEs: -680
SQLSTATE or SQLSTATEs: 54011
SQL0681
Message Text: Field procedure on column &1 returned SQLSTATE &5.
Cause Text: Field procedure on column &1 returned SQLSTATE &5. The associated message text is &4.
Recovery Text: Change the field procedure to return a valid SQLSTATE. Try the request again.
SQLCODE or SQLCODEs: -681
SQLSTATE or SQLSTATEs: 23507
SQL0682
Message Text: Program name &1 for field procedure cannot be used.
Cause Text: The program name &1 in &2 that was specified for the field procedure is not found or there is insufficient authority to use the program. The reason code is &3. The reason codes and their meanings are:
  • 1 -- The field procedure is not found.
  • 2 -- There is insufficient authority to use the program. *EXECUTE authority is required on the program and library containing the program.
  • 3 -- The program name does not specify an ILE program. It cannot refer to an OPM program, service program, or a Java procedure. If specified as the string form of an external program name, it must be of the form 'library-name/program-name'.
  • 4 -- The field procedure program cannot have an activation group of *NEW.
Recovery Text: Ensure the program name was specified correctly and that an ILE program exists by that name. If the program exists, obtain the required authority to use the program and library. Try the request again.
SQLCODE or SQLCODEs: -682
SQLSTATE or SQLSTATEs: 57010
SQL0683
Message Text: Clause not valid for specified type.
Cause Text: One of the following has occurred:
  • The FOR BIT DATA, the FOR MIXED DATA, the FOR SBCS DATA, or the CCSID clause was specified for the CAST scalar function, for a CREATE DISTINCT TYPE source data type, or for column or parameter &1. These clauses are not valid if the type is numeric, date, time, timestamp, binary, NCHAR, or a user defined type. The FOR BIT DATA, FOR MIXED DATA, or FOR SBCS DATA clause is not valid if the type is graphic, XML, or DataLink.
  • The LINKTYPE option was specified for a column that is not a DataLink.
  • ROW CHANGE TIMESTAMP was specified and the data type is not timestamp with precision of 6.
  • ROW BEGIN, ROW END, or TRANSACTION START ID was specified and the data type is not timestamp with precision 12.
  • FIELDPROC cannot be specified for a column that has a ROWID or DATALINK data type or that is defined as a generated column.
  • FOR BIT DATA cannot be specified for result columns of the XMLTABLE function.
  • A CCSID cannot be specified for XML variables in an SQL routine.
Recovery Text: Change or remove the clause that is not correct. Try the request again.
SQLCODE or SQLCODEs: -683
SQLSTATE or SQLSTATEs: 42842
SQL0684
Message Text: FIELDPROC list of constants too long.
Cause Text: The list of constants for FIELDPROC beginning with &1 is longer than 2000 bytes.
Recovery Text: Shorten the list by using shorter values or fewer values. Try the request again.
SQLCODE or SQLCODEs: -684
SQLSTATE or SQLSTATEs: 54012
SQL0685
Message Text: Field procedure on column &1 has returned invalid data.
Cause Text: Field procedure on column &1 has returned invalid data.
Recovery Text: Change the field procedure to return valid data.
SQLCODE or SQLCODEs: -685
SQLSTATE or SQLSTATEs: 58002
SQL0696
Message Text: Correlation name or table &3 not valid.
Cause Text: The correlation name or table &3 is not valid for trigger &1 in &2. The reason code is &4. One of the following reason codes indicates the error:
  • 1 - NEW correlation name or NEW_TABLE &3 was specified in a DELETE trigger.
  • 2 - OLD correlation name or OLD_TABLE &3 was specified in an INSERT trigger.
  • 3 - OLD_TABLE or NEW_TABLE was specified in a BEFORE trigger or was specified with DB2ROW.
Recovery Text: Change the referencing clause or the type of trigger so that the statement is valid. Try the request again.
SQLCODE or SQLCODEs: -696
SQLSTATE or SQLSTATEs: 42898
SQL0697
Message Text: REFERENCING OLD or NEW not valid for statement trigger.
Cause Text: REFERENCING OLD or NEW was specified for an SQL trigger. Old and new correlation variables are not valid for statement triggers.
Recovery Text: Remove the REFERENCING clause or specify FOR EACH ROW on the CREATE TRIGGER statement. Try the request again.
SQLCODE or SQLCODEs: -697
SQLSTATE or SQLSTATEs: 42899
SQL0707
Message Text: Name &1 in &2 not allowed.
Cause Text: Name &1 is not allowed for one of the following reasons:
  • Distinct type, array type, sequence, or global variable &1 in &2 cannot be created or dropped. Either the name is a reserved word or the schema is specified as QSYS, QSYS2, SYSIBM or QTEMP. Distinct types, array types, sequences, and global variables cannot be created in QSYS, QSYS2, SYSIBM, SYSPROC, or QTEMP.
  • Savepoint &1 cannot have a name that starts with SYS.
Recovery Text: Change the name to a non-reserved word, or create the user-defined data type, sequence or global variable in a schema other than QSYS, QSYS2, SYSIBM, SYSPROC, or QTEMP.
SQLCODE or SQLCODEs: -707
SQLSTATE or SQLSTATEs: 42939
SQL0713
Message Text: Value for &2 is not correct.
Cause Text: The value specified in the SET &2 statement is not correct. The NULL value cannot be used to set the &2 special register. &2 can only be set using a character or UCS-2 or UTF-16 graphic string.

For SET ENCRYPTION PASSWORD WITH HINT, the hint value cannot be longer than 32 characters.

For SET SCHEMA, all letters in the schema name must be uppercase or the schema name must be delimited.

For SET CURRENT DEGREE, the value cannot be longer than 5 characters.

For SET SESSION AUTHORIZATION, the authorization name cannot be longer than 10 characters. An authorization name specified as a string literal or with a host variable cannot contain the special register strings USER, SYSTEM_USER, or SESSION_USER and cannot contain lower case letters or special characters.

For SET CURRENT DECFLOAT ROUNDING MODE, the value must not contain lowercase letters and must identify one of the supported rounding modes.

For SET CURRENT IMPLICIT XMLPARSE OPTION, the value must identify one of the supported whitespace options.

Recovery Text: Specify a valid value for the special register. Make sure it does not have the NULL value. Try the request again.
SQLCODE or SQLCODEs: -713
SQLSTATE or SQLSTATEs: 42815
SQL0723
Message Text: SQL trigger &1 in &2 failed with SQLCODE &3 SQLSTATE &4.
Cause Text: An error has occurred in a triggered SQL statement in trigger &1 in schema &2. The SQLCODE is &3, the SQLSTATE is &4, and the message is &5.
Recovery Text: Refer to the joblog for more information regarding the detected error. Correct the error and try the request again.
SQLCODE or SQLCODEs: -723
SQLSTATE or SQLSTATEs: 09000
SQL0724
Message Text: Too many cascaded trigger programs.
Cause Text: The maximum depth of 200 cascaded triggers has been exceeded.
Recovery Text: Remove any trigger that is causing repeated trigger programs to be called for the same table.
SQLCODE or SQLCODEs: -724
SQLSTATE or SQLSTATEs: 54038
SQL0727
Message Text: Evaluation of an expression associated with &5 in &6 failed.
Cause Text: One of the following has occurred:
  • An error occurred during evaluation of the DEFAULT clause of global variable &5 in &6.
  • An error occurred during the evaluation of the DEFAULT clause for a parameter for routine &5 in &6.
  • An error occurred during the evaluation of the rule text for PERMISSION or MASK &5 in &6.

The SQLCODE associated with the failure is &2. The SQLSTATE is &3. The message tokens are &4.

This failure may also indicate an error occurred on a system other than DB2 for IBM i during implicit system action &1.

Recovery Text: Refer to the joblog or see the product documentation for more information regarding the detected error. Correct the error and try the request again.
SQLCODE or SQLCODEs: -727
SQLSTATE or SQLSTATEs: 56098
SQL0750
Message Text: Column &3 in table &1 cannot be renamed.
Cause Text: Column &3 is specified more than once on a CREATE TABLE statement for table &1 in &2. Column names and system column names must be unique in a table.
Recovery Text: Specify unique names for each of the columns.
SQLCODE or SQLCODEs: -750
SQLSTATE or SQLSTATEs: 42986
SQL0751
Message Text: SQL statement &1 not allowed.
Cause Text: The statement &1 is not allowed in a procedure, user-defined function, or trigger. A compound (dynamic) statement is not allowed in a secondary thread.
  • Statements not allowed in a trigger program are CONNECT, SET CONNECTION, RELEASE, DISCONNECT, and SET RESULT SETS.
  • The RETURN statement is not allowed in an SQL trigger.
  • The TRUNCATE statement is not allowed in an SQL before trigger.
  • RUNSQLSTM is not allowed in a trigger program.
  • COMMIT and ROLLBACK are not allowed in a trigger program if the trigger program is running in the same activation group as the triggering program. COMMIT and ROLLBACK are not allowed in an SQL trigger.
  • ALTER TABLE is not allowed in a trigger program when commitment control is active.
  • COMMIT and ROLLBACK are not allowed if the procedure is defined as COMMIT ON RETURN YES or for a distributed unit of work.
  • The PIPE statement is not allowed in a procedure, scalar function, or trigger.
Recovery Text: Remove the statement &1 from your trigger program, user-defined function, or procedure. Try the request again.
SQLCODE or SQLCODEs: -751
SQLSTATE or SQLSTATEs: 0W000, 2F003, 38003, 42985, 42987
SQL0752
Message Text: Connection cannot be changed. Reason code is &1.
Cause Text: Connection cannot be made because the application process is not in a connectable state. The reason code is &1. Reason codes and their meanings are:
  • 1 -- SQL is not in a connectable state. SQL enters the connectable state after a COMMIT or ROLLBACK. SQL leaves the connectable state when any SQL statement except a COMMIT, ROLLBACK, or CONNECT statement is run.
  • 2 -- There are pending changes or open files under commitment control at the current server and the relational database (RDB) specified on the CONNECT request is not the current server.
  • 3 -- A create SQL package request is being processed when not on a commit boundary.
  • 4 -- The connection is locked by another invocation of Interactive SQL, or there is a level mismatch between the Interactive SQL product and IBM i.
  • 5 -- The connection cannot be changed due to restrictions with remote connections and the job level commitment definition.
  • 6 -- The connection cannot be changed to a remote system due to a SET TRANSACTION statement.
  • 7 -- The connection cannot be changed using *RUW connection management because a previous connection is protected.
  • 8 -- CONNECT RESET cannot start a local connection to RDB &2 because the RDB for the auxiliary storage pool (ASP) group of the thread is &3.
  • 9 -- There is a mismatch between the active connection and the current ASP group of the thread.
Recovery Text: Do one of the following based on the reason code:
  • 1 -- Issue a COMMIT or ROLLBACK statement to enter the connectable state.
  • 2 -- Close all files open under commitment control and issue a COMMIT or ROLLBACK statement.
  • 3 -- Issue a COMMIT or ROLLBACK statement.
  • 4 -- Exit Interactive SQL and try the request again. If Interactive SQL is active, the current server can only be changed using Interactive SQL.
  • 5 -- All activation groups associated with the job level commitment definition must be local; or only one remote connection and no local connections can be associated with the job level commitment definition.
  • 6 -- Issue a COMMIT or ROLLBACK statement.
  • 7 -- Release the protected conversation followed by a COMMIT.
  • 8 -- Change the ASP group of the thread to the ASP group for relational database &2.
  • 9 -- Either change the ASP group of the thread to the ASP group for relational database &2 or use a CONNECT or SET CONNECTION statement to change the active connection.
SQLCODE or SQLCODEs: -752
SQLSTATE or SQLSTATEs: 0A001
SQL0771
Message Text: Use of ROWID not valid.
Cause Text: ROWID is not valid for one of the following reasons:
  • A table with a ROWID column cannot be created in QTEMP.
  • A table cannot be created with a ROWID column that has the NULL attribute.
  • ROWID cannot be specified as a type on the CREATE VARIABLE statement.
Recovery Text: Remove the ROWID column or type or create the table in a schema other than QTEMP. Try the request again.
SQLCODE or SQLCODEs: -771
SQLSTATE or SQLSTATEs: 428C7
SQL0773
Message Text: Case not found for CASE statement.
Cause Text: A CASE statement without an ELSE clause was specified in the routine body of an SQL procedure. None of the conditions specified in the CASE statement were met.
Recovery Text: Change the CASE statement to handle all conditions that can occur.
SQLCODE or SQLCODEs: -773
SQLSTATE or SQLSTATEs: 20000
SQL0774
Message Text: Statement cannot be executed within a compound SQL statement.
Cause Text:
Recovery Text:
SQLCODE or SQLCODEs: -774
SQLSTATE or SQLSTATEs: 2D522
SQL0775
Message Text: Statement not allowed in specified SQL routine.
Cause Text: A statement specified in the routine body of an SQL procedure, SQL function, or compound(dynamic) statement is not allowed. A list of restrictions follows:
  • A COMMIT or ROLLBACK statement cannot be specified in an atomic compound statement in an SQL procedure or in an atomic compound(dynamic) statement.
  • An ATOMIC compound statement cannot be specified in an SQL function.
  • COMMIT, ROLLBACK, CONNECT, DISCONNECT, SET CONNECTION, SET RESULT SETS, and SET TRANSACTION statements cannot be specified in an SQL function.
  • The SET RESULT SETS statement cannot be specified in a compound (dynamic) statement or in an SQL procedure routine body unless RESULT SET is specified for the procedure.
Recovery Text: Remove the statement from the SQL function, procedure, on compound(dynamic) statement.
SQLCODE or SQLCODEs: -775
SQLSTATE or SQLSTATEs: 42910
SQL0776
Message Text: Cursor &1 specified in FOR statement not allowed.
Cause Text: Cursor &1 is specified as the cursor name on a FOR statement in an SQL procedure. The cursor cannot be specified on a FETCH, OPEN, or CLOSE statement within the FOR statement.
Recovery Text: Remove the OPEN, CLOSE, or FETCH statement.
SQLCODE or SQLCODEs: -776
SQLSTATE or SQLSTATEs: 428D4
SQL0777
Message Text: CASE nested deeper than three levels.
Cause Text: CASE statements in the routine body of an SQL procedure, function, or trigger can be nested up to three levels when used with a simple-when-clause. There is no nesting limit when the CASE uses a searched-when-clause.
Recovery Text: Change the CASE statement to use a searched-when-clause.
SQLCODE or SQLCODEs: -777
SQLSTATE or SQLSTATEs: 42919
SQL0778
Message Text: End label &1 not same as begin label.
Cause Text: Label &1 specified at the end of a compound, FOR, WHILE, REPEAT, or LOOP statement in an SQL routine body is not the same as the label at the beginning of the statement. The end label cannot be specified if the begin label is not specified.
Recovery Text: Ensure the end label is the same as the begin label for compound, FOR, WHILE, REPEAT, and LOOP statements.
SQLCODE or SQLCODEs: -778
SQLSTATE or SQLSTATEs: 428D5
SQL0779
Message Text: Label &1 specified not valid.
Cause Text: Label &1 is specified on a LEAVE or a GOTO statement in an SQL routine body. The label is not a valid label or is not in the same scope as the current statement.
Recovery Text: Specify a valid label that is within the same scope. Try the request again.
SQLCODE or SQLCODEs: -779
SQLSTATE or SQLSTATEs: 42736
SQL0780
Message Text: UNDO specified for a handler not valid.
Cause Text: UNDO is specified for a handler in a compound statement in an SQL procedure, function, or trigger. UNDO cannot be specified unless the compound statement is ATOMIC. UNDO cannot be specified in a trigger.
Recovery Text: Either specify an ATOMIC compound statement or specify EXIT or CONTINUE on the handler.
SQLCODE or SQLCODEs: -780
SQLSTATE or SQLSTATEs: 428D6
SQL0781
Message Text: Condition &1 specified in handler not defined.
Cause Text: Condition &1 specified in a handler in an SQL routine body is not defined.
Recovery Text: Define the condition using the DECLARE CONDITION statement or remove the condition from the handler.
SQLCODE or SQLCODEs: -781
SQLSTATE or SQLSTATEs: 42737
SQL0782
Message Text: Condition value &1 specified in handler not valid.
Cause Text: Condition &1 specified in a handler in an SQL routine body is not valid for one of the following reasons.
  • The condition value has already been specified by another handler in the same scope.
  • The condition or SQLSTATE was specified in the same handler as SQLEXCEPTION, SQLWARNING, or NOT FOUND.
Recovery Text: Remove the condition from the handler.
SQLCODE or SQLCODEs: -782
SQLSTATE or SQLSTATEs: 428D7
SQL0783
Message Text: Select list for cursor &1 in FOR statement not valid.
Cause Text: The select list in the FOR statement must contain unique column names.
  • The select list contains duplicate column names or unnamed expressions. If two column names are the same, the column name is &2.
  • The FROM clause of the select references a table on a remote server.
Recovery Text: Specify unique column names in the select list specified in the FOR statement.
SQLCODE or SQLCODEs: -783
SQLSTATE or SQLSTATEs: 42738
SQL0784
Message Text: Constraint &1 cannot be dropped.
Cause Text: Constraint &1 is a CHECK constraint or a UNIQUE constraint. It cannot be dropped because it is enforcing a primary key to be not null or a ROWID to be unique.
Recovery Text: Do one of the following and try the request again:
  • Drop the primary key which this CHECK constraint is enforcing to be not null. If the primary key is needed, change the attributes of the columns that make up the primary key to be NOT NULL, and then add the primary key again.
  • Drop the ROWID column. An identity column could be used instead of the ROWID column.
SQLCODE or SQLCODEs: -784
SQLSTATE or SQLSTATEs: 42860
SQL0785
Message Text: Use of SQLCODE or SQLSTATE not valid.
Cause Text: SQLCODE or SQLSTATE was used as a variable in an SQL routine body, but is not valid for one of the following reasons:
  • SQLCODE is not declared as INT.
  • SQLSTATE is not declared as CHAR(5).
  • The variable is set to NULL.
  • SQLCODE or SQLSTATE is declared as a CONSTANT.
Recovery Text: Declare the SQLCODE variable as INT and the SQLSTATE variable as CHAR(5). Set the variable to a valid value.
SQLCODE or SQLCODEs: -785
SQLSTATE or SQLSTATEs: 428D8
SQL0787
Message Text: RESIGNAL statement not within a handler.
Cause Text: The RESIGNAL statement, specified in an SQL routine, must be specified inside a handler.
Recovery Text: Remove the RESIGNAL statement or use a SIGNAL statement. Try the request again.
SQLCODE or SQLCODEs: -787
SQLSTATE or SQLSTATEs: 0K000
SQL0788
Message Text: Duplicate row identified for MERGE target &1 in &2.
Cause Text: The set of rows identified in the USING clause of the MERGE statement identifies the same row more than once in target table or view &1 in &2 specified in the INTO clause. Any row in the target table or view may only be identified once by the input of the USING clause.
Recovery Text: Change the data identified in the USING clause such that no rows occur more than once in the target table or view. Try the request again.
SQLCODE or SQLCODEs: -788
SQLSTATE or SQLSTATEs: 21506
SQL0789
Message Text: Default value not valid for array parameter &1.
Cause Text: A default value cannot be specified for array parameter &1.
Recovery Text: Remove the default value for parameter &1. Try the request again.
SQLCODE or SQLCODEs: -789
SQLSTATE or SQLSTATEs: 429BB
SQL0798
Message Text: Value cannot be specified for GENERATED ALWAYS column &1.
Cause Text: A value cannot be specified for column &1 because it is defined as GENERATED ALWAYS.
Recovery Text: Do one of the following and try the request again:
  • Remove the value from the INSERT or UPDATE statement, or specify DEFAULT to have a system value generated for the column.
  • For a ROWID, identity, or row change timestamp column, specify the OVERRIDING USER VALUE clause on the INSERT or UPDATE statement to override the GENERATED ALWAYS attribute and assign the value to the column.
  • Remove the column from the SET statement.
SQLCODE or SQLCODEs: -798
SQLSTATE or SQLSTATEs: 428C9
SQL0799
Message Text: Special register &1 does not exist at the application server.
Cause Text: A SET statement references special register &1. This special register does not exist on the application server so it cannot be referenced in the statement.
Recovery Text: Remove the reference to the unsupported special register from the statement. Try the request again.
SQLCODE or SQLCODEs: +799
SQLSTATE or SQLSTATEs: 01527
SQL0802
Message Text: Data conversion or data mapping error.
Cause Text: Error type &3 has occurred. Error types and their meanings are:
  • 1 -- Arithmetic overflow.
  • 2 -- Floating point overflow.
  • 3 -- Floating point underflow.
  • 4 -- Floating point conversion error.
  • 5 -- Not an exact result.
  • 6 -- Numeric data that is not valid.
  • 7 -- Double-byte character set (DBCS) or UTF-8 data that is not valid.
  • 8 -- Division by zero.
  • 9 -- Hash value cannot be computed for the requested query.
  • 10 -- User-defined function returned a mapping error.
  • 11 -- Not valid length found in a varying-length column returned from an array result set.
  • 12 -- Result of a concatenation operation on a varying-length field exceeded the maximum allowed length of the result type.

If the error occurred when assigning a value to a host variable of a FETCH, embedded SELECT, SET, or VALUES INTO statement, the host variable name is &2 and the relative position of the host variable in the INTO clause is &1. If the host variable name is *N, the error occurred when attempting to resolve a search condition.

If more than one data mapping error occurred, this is a description of the first error that occurred. For a description of any other data mapping errors, see the previously listed messages in the job log.

Recovery Text: The error was caused by data that was not valid or that was too large. Look at the previously listed messages in the job log (DSPJOBLOG command) or press F10 (Display messages in job log) on this display to determine what row and columns were involved in the error. Correct the data and then try the request again.
SQLCODE or SQLCODEs: +802, -802
SQLSTATE or SQLSTATEs: 01004, 01519, 01547, 01564, 01565, 22001, 22003, 22012, 22023, 22504
SQL0803
Message Text: Duplicate key value specified.
Cause Text: A unique index or unique constraint &1 in &2 exists over one or more columns of table &3 in &4. The operation cannot be performed because one or more values would have produced a duplicate key in the unique index or constraint.
Recovery Text: Change the statement so that duplicate keys are not produced. For information on what rows contain the duplicate key values, look at the previously listed messages in the job log (DSPJOBLOG command) or press F10 (Display messages in job log) on this display.
SQLCODE or SQLCODEs: -803
SQLSTATE or SQLSTATEs: 23505
SQL0804
Message Text: SQLDA or descriptor area not valid.
Cause Text: If the error type is 2, 3, 9, 12, or 13, the entry in error is &2, the value of SQLTYPE or TYPE is &3, and the value of SQLLEN, SQLLONGLEN, or LENGTH is &4. If the error type is 13, the &5 was being set when the inconsistency was found. The specified SQLDA or descriptor area is not valid because of error type &1. Error types and their meanings are:
  • 1 -- The value of SQLN is less than zero, the value of SQLD is not between 0 and 8000, the value of SQLD is greater than the value of SQLN, or that the value of SQLD has not been initialized in REXX.
  • 2 -- The value of SQLTYPE is either not valid or not supported or has not been initialized in REXX.
  • 3 -- The value of SQLLEN or SQLLONGLEN is not valid or the value of SQLLEN, SQLPRECISION, or SQLSCALE has not been initialized in REXX. If REXX and SQLTYPE is decimal or numeric, then either SQLPRECISION or SQLSCALE has not been initialized. Otherwise, SQLLEN has not been initialized. If SQLTYPE is a LOB or XML variable, then SQLLONGLEN is not valid.
  • 4 -- The attributes in the descriptor for an array variable are not valid. The DATA item in the level 0 descriptor item must not be NULL except when the array is null.
  • 5 -- The SQLDA area was not on a 16-byte boundary.
  • 6 -- The value specified for SQLDABC is not valid. The value is either not large enough for the number of entries specified in SQLN or the value is greater than the maximum allowed.
  • 7 -- The value of SQLN was not at least twice the size of SQLD and LOB host variables were found in the SQLDA.
  • 8 -- The seventh byte of SQLDAID was not a '2', '3' or '4' and LOB host variables were found in the SQLDA.
  • 9 -- The SQLDATAL pointer was not null for a DBCLOB host variable, but the length value referenced by the SQLDATAL pointer had an odd value.
  • 10 -- The SQLTYPE for a LOB locator did not match the type associated with LOB locator.
  • 11 -- The row length is greater than the maximum allowed row length.
  • 12 -- The TYPE for an item in the descriptor area has not been set.
  • 13 -- The attributes of the item in the descriptor area are not consistent. TYPE, LENGTH, PRECISION, SCALE, DB2_CCSID, and DATETIME_INTERVAL_CODE need to be consistent with one another for each item set with the SET DESCRIPTOR statement.
  • 14 -- The value of LEVEL in the descriptor area is not valid.
  • 15 -- The value of DATETIME_INTERVAL_CODE in the descriptor area is not valid.
  • 16 -- Input and output descriptors used on a CALL statement did not match. Both descriptors must include all of the parameters for the CALL and the items must match, except when the descriptors were built by a DESCRIBE of the CALL statement.
  • 17 -- An ARRAY SQLTYPE was specified in an SQLDA.
Recovery Text: Correct the error in the SQLDA or descriptor area and try the request again.
SQLCODE or SQLCODEs: -804
SQLSTATE or SQLSTATEs: 07002, 0700E, 0700F
SQL0805
Message Text: SQL package &1 in &2 not found at DRDA Server.
Cause Text: A remote request was attempted to &4 for SQL package &1 in &2. The SQL package was not found. If you are using Interactive SQL or Query Manager, an attempt to create a package on the remote system failed and the package requested does not exist.
Recovery Text: The most common cause of this problem in an Interactive SQL session to a server that is not DB2 for IBM i is that the connection is not updateable. In that case the package cannot be automatically created. To ensure the connection is updateable, do a RELEASE ALL command followed by a COMMIT before connecting to the relational database.

In other cases, the SQL package can be created by using the CRTSQLPKG command. Also, precompiling an SQL program with the RDB parameter specified will create an SQL package on the system. Create or restore the SQL package. Run the application again.

If you are using Interactive SQL or Query Manager or SQL Call Level Interface, exit the product or application and enter a CL COMMIT or ROLLBACK command. This will enable you to continue processing at the local system. Determine why the package creation failed by examining the job log. Correct the problem and attempt the Interactive SQL or Query Manager session again.

SQLCODE or SQLCODEs: -805
SQLSTATE or SQLSTATEs: 51002
SQL0809
Message Text: Row length exceeds 3.5 gigabytes.
Cause Text: The lengths of the values used as input in the INSERT or UPDATE statement would cause the row length to exceed the maximum length of 3.5 gigabytes.
Recovery Text: Change the statement so that the sum of all field lengths result in a row length of less than 3.5 gigabytes.
SQLCODE or SQLCODEs: -809
SQLSTATE or SQLSTATEs: 54018
SQL0811
Message Text: Result of SELECT more than one row.
Cause Text: The result table of a SELECT INTO statement, a subquery, or a subselect of a SET statement contains more than one row. The error type is &1. If the error type is 1 then a SELECT INTO statement attempted to return more than one row. If the error type is 2 then a subselect of a basic predicate has produced more than one row. Only one row is allowed.
Recovery Text: Change the selection so that only one result row is returned and then try the request again. The DECLARE CURSOR, OPEN, and FETCH statements must be used to process more than one result row. For a subquery the IN, EXISTS, ANY or ALL predicates can be used to process more than one result row. If one row was expected, there may be data errors, such as duplicate rows, that are causing more than one row to be returned.
SQLCODE or SQLCODEs: -811
SQLSTATE or SQLSTATEs: 21000
SQL0817
Message Text: Update operation not allowed.
Cause Text: An attempt has been made to run an SQL statement that would change the contents of a table or create or drop a database object after SET TRANSACTION READ ONLY has been performed.
Recovery Text: Specify SET TRANSACTION READ WRITE, or remove the update operation from the program and try again.
SQLCODE or SQLCODEs: -817
SQLSTATE or SQLSTATEs: 25006
SQL0818
Message Text: Consistency tokens do not match.
Cause Text: Package &3 in &4 on application server &5 cannot be run with the current application program because either the application program has been recompiled without rebuilding the package or the package has been restored from a back level version.
Recovery Text: Rebuild the package by using the CRTSQLPKG command or by using a CRTSQLxxx command specifying the correct relational database. Otherwise, restore the package from a version which matches the application program being run.
SQLCODE or SQLCODEs: -818
SQLSTATE or SQLSTATEs: 51003
SQL0822
Message Text: Address in the SQLDA or descriptor area not valid.
Cause Text: The SQLDA or descriptor area contains an address, SQLDATA or DATA value, or SQLIND or INDICATOR value in entry number &1 that is not valid. The incorrect address or value is type &2.
  • Type 1 indicates that the SQLDATA or DATA address is not valid.
  • Type 2 indicates that the SQLIND or INDICATOR address is not valid.
  • Type 3 indicates that the SQLDA address is not valid.
  • Type 4 indicates that the row storage area is not large enough.
  • Type 5 indicates that the indicator area for a blocked FETCH statement is not large enough.
  • Type 6 indicates that the SQLDATA field was not initialized to a value in a REXX procedure.
  • Type 7 indicates that the SQLIND field was not initialized to a value in a REXX procedure.
  • Type 8 indicates that the SQLDATAL address is not valid.
Recovery Text: For types 1, 2, 3, or 8, change the address in entry &1 to a valid address. For types 4 and 5, allocate enough area for all of the rows being requested. For types 6 and 7, initialize the SQLDATA or SQLIND fields to a valid value. Try the request again.
SQLCODE or SQLCODEs: -822
SQLSTATE or SQLSTATEs: 0700C, 51004
SQL0827
Message Text: &1 in &2 type *SQLPKG cannot be accessed.
Cause Text: SQL Package &1 in &2 was not created using the QSQPRCED API and cannot be accessed by the QSQPRCED API. *SQLPKG objects created using CRTSQLPKG or the CRTSQLxxx commands cannot be used by the QSQPRCED API.
Recovery Text: Use the QSQPRCED API to create a new *SQLPKG object. Change your request to use the package created by the API.
SQLCODE or SQLCODEs: -827
SQLSTATE or SQLSTATEs: 42862
SQL0840
Message Text: Number of selected items exceeds 8000.
Cause Text: The number of items returned in a select list or presented in the insert list exceeds the maximum of 8000.
Recovery Text: Reduce the number of selected items and try the request again.
SQLCODE or SQLCODEs: -840
SQLSTATE or SQLSTATEs: 54004
SQL0842
Message Text: Connection to relational database &1 already exists.
Cause Text: An attempt was made to do one of the following:
  • CONNECT to a relational database when the connection is active.
  • CONNECT to a relational database that has the same communication information as a connection to a relational database that is active.

The active relational database is &1.

Recovery Text: If CONNECT was specified, either use the SET CONNECTION statement to make relational database &1 the current connection or change the RDB directory entry (CHGRDBDIRE) for the relational database you are connecting to so that at least part of the communication information is different from what is specified in the entry for &1. For APPC connections, the communication information is the remote location, device description, local location, remote network identifier, mode, and transaction program. For TCP/IP connections, the communication information is the remote location and port identification.
SQLCODE or SQLCODEs: -842
SQLSTATE or SQLSTATEs: 08002
SQL0843
Message Text: Connection to relational database &1 does not exist.
Cause Text: A SET CONNECTION, RELEASE, or DISCONNECT statement or a call to the SQLESETI API specified relational database name &1 which is not active.
Recovery Text: Specify the name of a relational database which has an active connection.
SQLCODE or SQLCODEs: -843
SQLSTATE or SQLSTATEs: 08003
SQL0845
Message Text: PREVIOUS VALUE for sequence &1 cannot be used.
Cause Text: A PREVIOUS VALUE expression specified sequence &1 in &2, but a value is not available in this application process.
  • A NEXT VALUE expression must be evaluated before a PREVIOUS VALUE expression can be used.
  • A NEXT VALUE expression must be evaluated after a sequence is altered or dropped.
Recovery Text: Evaluate the NEXT VALUE expression for sequence &1 in &2 in the same application process before using PREVIOUS VALUE.
SQLCODE or SQLCODEs: -845
SQLSTATE or SQLSTATEs: 51035
SQL0846
Message Text: Attributes not valid for IDENTITY column or sequence.
Cause Text: Error &6 occurred for an IDENTITY column or sequence. For an IDENTITY column, &2 in schema &3 is the name of the table. For a sequence, &2 in &3 is the name of the sequence.
  • Code 1 -- The data type of an IDENTITY column or sequence is not INTEGER, BIGINT, SMALLINT, or DECIMAL or NUMERIC with a scale of zero. An IDENTITY column that is DECIMAL or NUMERIC must have a precision less than or equal to 31.
  • Code 2 -- The value specified for START WITH, INCREMENT BY, MINVALUE, or MAXVALUE is outside the range for the data type specified.
  • Code 3 -- The value specified for MINVALUE is larger than the value specified for MAXVALUE.
  • Code 4 -- The value specified for CACHE is not valid. The minimum value for CACHE is 2.
  • Code 7 -- A sequence can only be altered to a distinct type if the current data type is a built-in data type and it is promotable to the source data type of the distinct type. If the current data type is a distinct type, it can only be changed to its source data type.
Recovery Text: Specify valid attributes for the IDENTITY column or sequence. Try the request again.
SQLCODE or SQLCODEs: -846
SQLSTATE or SQLSTATEs: 42815
SQL0858
Message Text: Cannot disconnect relational database &1 due to LU6.2 protected conversation.
Cause Text: The DISCONNECT statement cannot be used to disconnect relational database &1 because the conversation uses an LU6.2 protected conversation.
Recovery Text: Use the RELEASE statement followed by a COMMIT statement to end LU6.2 protected conversations.
SQLCODE or SQLCODEs: -858
SQLSTATE or SQLSTATEs: 08501
SQL0862
Message Text: Local program attempted to connect to a remote relational database.
Cause Text: Local program &1 in &2 attempted to connect to a remote relational database. Either the CONNECT statement or the SET CONNECTION statement was specified and the relational database specified was a remote relational database.
Recovery Text: Specify the RDB parameter on the SQL precompile command.
SQLCODE or SQLCODEs: -862
SQLSTATE or SQLSTATEs: 55029
SQL0863
Message Text: Mixed or DBCS CCSID not supported by relational database &1.
Cause Text: The connection was completed, but remote relational database &1 does not support either the mixed or DBCS CCSID. SBCS data can be used. The product identification is &2.
Recovery Text: No recovery needed.
SQLCODE or SQLCODEs: +863
SQLSTATE or SQLSTATEs: 01539
SQL0864
Message Text: Constraint attempted to update or delete a row of table &3.
Cause Text: Referential constraint &1 in &2 attempted to update or delete a row of table &3 in &4 that was modified by a data change table reference. A data change table reference was specified in the FROM clause, but the target table of the data change table reference has a referential constraint which modifies the same table. Modifying the same row is not allowed.
Recovery Text: Remove the data change table reference from the FROM clause, or remove the referential constraint from table &3.
SQLCODE or SQLCODEs: -864
SQLSTATE or SQLSTATEs: 560C6
SQL0871
Message Text: Too many CCSID values specified.
Cause Text: More than 80 unique combinations of character data type and Coded Character Set Identifier (CCSID) were used. When accessing remote data, there is a limit of 80 different CCSID values.
Recovery Text: Change that request to only access 80 different combinations of character data type and CCSID.
SQLCODE or SQLCODEs: -871
SQLSTATE or SQLSTATEs: 54019
SQL0880
Message Text: Savepoint &1 does not exist or is not valid in this context.
Cause Text: The RELEASE TO SAVEPOINT or ROLLBACK TO SAVEPOINT statement does not identify a savepoint that exists at the current savepoint level.
Recovery Text: Correct the statement to use a valid savepoint name, then try the statement again.
SQLCODE or SQLCODEs: -880
SQLSTATE or SQLSTATEs: 3B001
SQL0881
Message Text: Savepoint &1 already exists.
Cause Text: The savepoint name was previously defined at the current savepoint level and either an existing savepoint or the new savepoint is defined with the UNIQUE keyword.
Recovery Text: Either use a different savepoint name or omit the UNIQUE clause if the existing savepoint was created without the UNIQUE clause and the savepoint name is intended to be reused. An existing savepoint can be released using the RELEASE TO SAVEPOINT statement.
SQLCODE or SQLCODEs: -881
SQLSTATE or SQLSTATEs: 3B501
SQL0882
Message Text: Savepoint does not exist.
Cause Text: A ROLLBACK TO SAVEPOINT without a savepoint name was attempted but no savepoint exists at the current savepoint level.
Recovery Text: Correct the application logic to either set a savepoint or to not attempt to rollback to a savepoint.
SQLCODE or SQLCODEs: -882
SQLSTATE or SQLSTATEs: 3B502
SQL0900
Message Text: Application process not in a connected state.
Cause Text: One of the following occurred:
  • The current connection was disconnected using the DISCONNECT statement.
  • The current connection was released and a commit occurred.
  • A previous error has left the application process in an unconnected state. Use the Display Job Log (DSPJOBLOG) command to see previous errors.
Recovery Text: Issue CONNECT statement with the TO or RESET clause or the SET CONNECTION statement to enter the connected state.
SQLCODE or SQLCODEs: -900
SQLSTATE or SQLSTATEs: 08003
SQL0901
Message Text: SQL system error.
Cause Text: An SQL system error has occurred. The current SQL statement cannot be completed successfully. The error will not prevent other SQL statements from being processed. Previous messages may indicate that there is a problem with the SQL statement and SQL did not correctly diagnose the error. The previous message identifier was &1. Internal error type &2 has occurred. If precompiling, processing will not continue beyond this statement.
Recovery Text: See the previous messages to determine if there is a problem with the SQL statement. To view the messages, use the DSPJOBLOG command if running interactively, or the WRKJOB command to view the output of a precompile. An application program receiving this return code may attempt further SQL statements. Correct any errors and try the request again.
SQLCODE or SQLCODEs: -901
SQLSTATE or SQLSTATEs: 58004
SQL0904
Message Text: Resource limit exceeded.
Cause Text: Resource limit type &1 exceeded with reason code &2. A list of the limit types follows:
  • Type 1 indicates that the user profile storage limit or the machine storage limit was exceeded.
  • Type 2 indicates that the machine lock limit was exceeded.
  • Type 3 indicates that the query resource limit was exceeded. For more information see the previously listed message CPD4365.
  • Type 4 indicates that a journal error has occurred.
  • Type 5 indicates that the commit lock limit was exceeded.
  • Type 6 indicates that the maximum size of the table has been reached.
  • Type 7 indicates that the maximum size of the prepared statement area has been reached.
  • Type 8 indicates that the maximum number of cursors have been opened for this job.
  • Type 9 indicates that the maximum number of entries in the lock table have been used for this job.
  • Type 12 indicates that the maximum DRDA communications buffer size was exceeded.
  • Type 13 indicates that the maximum amount of blocked data was exceeded.
  • Type 14 indicates that the maximum amount of descriptor space has been allocated.
  • Type 15 indicates that the maximum size of the parameter default area has been reached.
Recovery Text: Do one of the following: If this is error type 1, contact the security officer to increase the user profile storage limit, or delete some objects to free up storage and then try the request again.
  • If this is error type 2, then try the operation when the number of machine locks held has decreased.
  • If this is error types 3, 4, or 5, see previously listed messages in the job log for recovery information.
  • If this is error type 6, Some of the rows from this table must be moved to another table.
  • If this is error type 7, issue a COMMIT or ROLLBACK without the HOLD clause before issuing anymore PREPARE statements.
  • If this is error type 8, issue a CLOSE before issuing any more OPEN statements.
  • If this is error type 9, issue a COMMIT or ROLLBACK without the HOLD clause.
  • If this is error type 12, reduce the total size of column data supplied with the SQL request.
  • If this is error type 13, reduce the number of rows in the block.
  • If this is error type 14, reduce the number of allocated descriptors with the DEALLOCATE DESCRIPTOR statement.
  • If this is error type 15, simplify the parameter defaults.
SQLCODE or SQLCODEs: +904, -904
SQLSTATE or SQLSTATEs: 01687, 57011
SQL0906
Message Text: Operation not performed because of previous error.
Cause Text: A previous error has made cursor &1 not usable.
Recovery Text: The cursor is not usable. Perform the following steps:

1) Close the cursor.

2) Open the cursor.

3) Try the operation again.

SQLCODE or SQLCODEs: -906
SQLSTATE or SQLSTATEs: 24514
SQL0907
Message Text: Data change violation occurred.
Cause Text: The row referenced by the statement which caused a trigger program to be invoked was referenced again in the trigger program. The reference in the trigger program attempted to update or delete the row. This is called a destructive data change and is not allowed.
Recovery Text: Remove the statement which caused the error from your trigger program and attempt the request again.
SQLCODE or SQLCODEs: -907
SQLSTATE or SQLSTATEs: 27000
SQL0910
Message Text: Object &1 in &2 type *&3 has a pending change.
Cause Text: Object &1 has an outstanding change made under commitment control that is preventing this operation. One of the following may have occurred:
  • This application process performed an operation on this object under commitment control. The operation has not been committed. The application process is now attempting to change the same object using commitment control level *NONE.
  • A different application process has performed an operation on this object under commitment control. The operation has not been committed.
  • This application process has performed an operation on this object under commitment control using a different commit definition. The operation has not been committed.
  • This application process has performed an operation on this object under commitment control. The operation has not been committed. The table cannot be altered until the changes are committed or rolled back.
Recovery Text: Do one of the following and try the request again:
  • If your application process issued the uncommitted operation, either issue a COMMIT or ROLLBACK before attempting any other operations on this object, or issue the statement from a program using a commitment control level other than *NONE.
  • If the application process that issued the uncommitted operation on this object is not your application process, then that application process must perform a COMMIT or a ROLLBACK.
  • If your application process issued the uncommitted operation using a different commit definition, issue a COMMIT or ROLLBACK for that commit definition.
  • Issue either a COMMIT or ROLLBACK before attempting an ALTER TABLE statement on this object.
SQLCODE or SQLCODEs: -910
SQLSTATE or SQLSTATEs: 57007
SQL0913
Message Text: Row or object &1 in &2 type *&3 in use.
Cause Text: The requested object &1 in &2 type *&3 is either in use by another application process or a row in the object is in use by either another application process or another cursor in this application process.
Recovery Text: Look at the previously listed messages in the job log (DSPJOBLOG command) or from interactive SQL press F10 (Display messages in job log) on this display to determine if this is an object or record lock wait time out.

Do one of the following:

  • If the object is locked by another application process, try the SQL statement again when the object is not in use. Use the Work with Object Locks (WRKOBJLCK) command to determine who is currently using the object.
  • If the object is a schema and an attempt was made to create a table, view, or index into this schema under commitment control, a save-while-active operation may be in progress on the same schema by another job in the system. Try the request again when the save-while-active processing is complete.
  • If a record is locked by another application process, try the SQL statement again when the record is not in use. The Display Record Locks (DSPRCDLCK) command will determine who is currently using the record.
  • If this is a record lock held by another cursor in the same application process, you must issue a COMMIT, ROLLBACK, or another FETCH statement on the cursor that is holding the lock before issuing this SQL statement.

If this error occurs frequently, use the Change Physical File (CHGPF), Change Logical File (CHGLF), or Override Data Base File (OVRDBF) command to change the object or record wait time out.

SQLCODE or SQLCODEs: -913
SQLSTATE or SQLSTATEs: 57033
SQL0918
Message Text: ROLLBACK required.
Cause Text: The activation group requires a ROLLBACK to be performed prior to running any other SQL statements. One of the following has occurred:
  • An SQL statement updated a distributed database server, but the database server can be used only for read-only operations.
Recovery Text: Issue a ROLLBACK CL command or an SQL ROLLBACK statement and then continue. If SQL server mode was used, consider switching to use the distributed unit of work setting.
SQLCODE or SQLCODEs: -918
SQLSTATE or SQLSTATEs: 51021
SQL0950
Message Text: Relational database &1 not in relational database directory.
Cause Text: A request for relational database &1 was made. However the relational database name was not found in the relational database directory.
Recovery Text: Do one of the following:
  • Change the name of the relational database specified on the CONNECT, SET CONNECTION, RELEASE, or DISCONNECT statement or the RDB parameter of the SQL precompile commands.
  • Add the relational database name to the relational database directory using the Add Relational Database Directory Entry (ADDRDBDIRE) command.
  • If the CREATE TABLE statement specifies a node group, add this system to the relational database directory on the target system.
SQLCODE or SQLCODEs: -950
SQLSTATE or SQLSTATEs: 42705, 55006
SQL0951
Message Text: Object &1 in &2 not altered.
Cause Text: Object &1 in &2 was not altered because it, or a related object, is being used by the same application process. A table may be related in a referential constraint relationship with another table being used by the same application process.
Recovery Text: Close the cursor and try the alter request again.
SQLCODE or SQLCODEs: -951
SQLSTATE or SQLSTATEs: 55007
SQL0952
Message Text: Processing of the SQL statement ended. Reason code &1.
Cause Text: The SQL operation was ended before normal completion. The reason code is &1. Reason codes and their meanings are:
  • 1 -- An SQLCancel API request has been processed, for example from ODBC.
  • 2 -- SQL processing was ended by sending an exception.
  • 3 -- Abnormal termination.
  • 4 -- Activation group termination.
  • 5 -- Reclaim activation group or reclaim resources.
  • 6 -- Process termination.
  • 7 -- An EXIT function was called.
  • 8 -- Unhandled exception.
  • 9 -- A Long Jump was processed.
  • 10 -- A cancel reply to an inquiry message was received.
  • 11 -- Open Database File Exit Program (QIBM_QDB_OPEN).
  • 0 -- Unknown cause.
Recovery Text: If the reason code is 1, a client request was made to cancel SQL processing. For all other reason codes, see previous messages to determine why SQL processing was ended.
SQLCODE or SQLCODEs: -952
SQLSTATE or SQLSTATEs: 57014
SQL0969
Message Text: Error occurred while passing request to application requester driver program.
Cause Text: An unexpected error occurred while passing the SQL request to the application requester driver program for relational database &1. See previously listed messages in the job log for the cause of the failure.
Recovery Text: Correct any problems and try the request again.
SQLCODE or SQLCODEs: -969
SQLSTATE or SQLSTATEs: 58033
SQL0971
Message Text: Constraint &4 in check pending state.
Cause Text: The operation being performed on table &2 in &3 failed. Constraint &4 in &5 could not be enforced because of reason code &1. The reason codes and their meanings are:
  • 1 -- The dependent file is in check pending status due to a referential constraint violation.
  • 2 -- The dependent or parent file's access path is not valid.
  • 3 -- The file is in check pending status due to a check constraint violation.
Recovery Text: For reason codes 1 and 3, use the CHGPFCST command to disable the constraint. Then use the DSPCPCST command to see the records causing the check pending status. Correct the data in the file and then use the CHGPFCST command to enable the constraint. For reason code 2, use the EDTRBDAP command or Manage Index Rebuilds in System i Navigator to rebuild the file's access path.
SQLCODE or SQLCODEs: -971
SQLSTATE or SQLSTATEs: 57011
SQL0989
Message Text: Trigger &1 attempted to modify a row in table &3.
Cause Text: Target table &3 in &4 of a data change table reference has an AFTER trigger &1 in &2 that modifies the same table. Modification of the same table by an AFTER trigger is not allowed.
Recovery Text: Remove the data change table reference from the FROM clause, or change the AFTER trigger to not modify the same table as the data change table reference.
SQLCODE or SQLCODEs: -989
SQLSTATE or SQLSTATEs: 560C3
SQL0990
Message Text: Outcome unknown for the unit of work.
Cause Text: The unit of work completed but the outcome is not fully known at all sites. Either a conversation failure occurred and resynchronization is occurring to correct the problem, or a ROLLBACK occurred at one of the resources.
Recovery Text: No user action is necessary.
SQLCODE or SQLCODEs: +990
SQLSTATE or SQLSTATEs: 01587
SQL1530
Message Text: SET CURRENT DEGREE statement not fully enabled.
Cause Text: Parallel processing is not enabled on this machine because the system feature DB2 Symmetric Multiprocessing is not installed on the system.
Recovery Text:
SQLCODE or SQLCODEs: +1530
SQLSTATE or SQLSTATEs: 01623
SQL1583
Message Text: PAGESIZE value &1 not correct.
Cause Text: The PAGESIZE value of &1 was not correct for one of the following reasons.
  • It cannot be specified for an ENCODED VECTOR index.
  • The valid values for PAGESIZE are 8, 16, 32, 64, 128, 256, and 512.
  • The PAGESIZE value may conflict with the key length of the index.
Recovery Text: Change the PAGESIZE value to one of the allowed values. Make sure this is not an ENCODED VECTOR index. Try the request again.
SQLCODE or SQLCODEs: -1583
SQLSTATE or SQLSTATEs: 428DE
SQL1596
Message Text: WITH EMPTY TABLE not valid for &1 in &2.
Cause Text: The ALTER TABLE cannot have the WITH EMPTY TABLE clause specified for table &1 in &2. The table is either a materialized query table or the parent table in a referential constraint which conflicts with the WITH EMPTY TABLE clause.
Recovery Text: Change the name of the table and try the request again.
SQLCODE or SQLCODEs: -1596
SQLSTATE or SQLSTATEs: 42928
SQL4300
Message Text: Java support is not installed or properly configured on this platform.
Cause Text: Support for Java stored procedures and user-defined functions is not installed and configured on this server.
Recovery Text: Ensure that a compatible Java Development Kit is installed.
SQLCODE or SQLCODEs: -4300
SQLSTATE or SQLSTATEs: 42724
SQL4301
Message Text: Java interpreter startup or communication failed for reason code &1.
Cause Text: An error occurred while attempting to start or communicate with a Java interpreter. The reason codes and their meanings follow:
  • 1 -- Java environment variables or Java database configuration parameters are invalid.
  • 2 -- A Java Native Interface call to the Java interpreter failed.
  • 4 -- The Java interpreter has terminated itself and cannot be restarted.
Recovery Text: Ensure that Java environment variables or Java database configuration parameters are valid. Ensure that a Java method called by the Java interpreter does not use System.out. Ensure that internal DB2 classes (com.ibm.db2) are not overridden by user classes.
SQLCODE or SQLCODEs: -4301
SQLSTATE or SQLSTATEs: 58004
SQL4302
Message Text: Java stored procedure or user-defined function &1, specific name &2 aborted with an exception "&3".
Cause Text: The Java stored procedure or user-defined function aborted with a Java exception. If SQJAVA component trace is on, then the component trace for the job contains a Java stack traceback for the aborted method.
Recovery Text: Debug the Java method to eliminate the exception.
SQLCODE or SQLCODEs: -4302
SQLSTATE or SQLSTATEs: 38000
SQL4303
Message Text: Java stored procedure or user-defined function &1, specific name &2, could not be identified from external name &3.
Cause Text: The CREATE PROCEDURE, ALTER PROCEDURE, CREATE FUNCTION, or ALTER FUNCTION statement that declared this stored procedure or user-defined function had a badly formatted EXTERNAL NAME clause. The external name must be formatted as follows: "package.subpackage.class.method".
Recovery Text: Change the external name on the statement. Try the request again.
SQLCODE or SQLCODEs: -4303
SQLSTATE or SQLSTATEs: 42724
SQL4304
Message Text: Java stored procedure or user-defined function &1, specific name &2 could not load Java class &3 for reason code &4.
Cause Text: The Java class given by the EXTERNAL NAME clause of a CREATE PROCEDURE, ALTER PROCEDURE, CREATE FUNCTION or ALTER FUNCTION statement could not be loaded. The reason codes and their meanings follow:
  • 1 -- The class was not found on the CLASSPATH.
  • 2 -- The class did not implement the required interface ("com.ibm.db2.app.StoredProc" or "com.ibm.db2.app.UDF") or lacked the Java "public" access flag.
  • 3 -- The default constructor failed or was unavailable.
Recovery Text: Ensure that the compiled ".class" file is installed in the CLASSPATH, for example under "/QIBM/UserData/OS400/SQLLib/Function". Ensure it implements the required Java interfaces and is "public".
SQLCODE or SQLCODEs: -4304
SQLSTATE or SQLSTATEs: 42724
SQL4306
Message Text: Java stored procedure or user-defined function &1, specific name &2 could not call Java method &3, signature &4.
Cause Text: The Java method given by the EXTERNAL NAME clause of a CREATE PROCEDURE or CREATE FUNCTION statement could not be found. Its declared argument list may not match what the database expects, or it may not be a "public" instance method.
Recovery Text: Ensure that a Java instance method exists with the "public" flag and the expected argument list for this call.
SQLCODE or SQLCODEs: -4306
SQLSTATE or SQLSTATEs: 42724
SQL4701
Message Text: Too many partitions specified or partitioning key too long.
Cause Text: One of the following has occurred:
  • There are too many partitions specified on the CREATE TABLE statement.
  • There was an attempt to add a partition to a existing table with an ALTER TABLE statement but the table already has the maximum number of partitions.
  • The partitioning key is too long.

There is a maximum of 256 partitions allowed in a partitioned table. The maximum partitioning key length is 2000.

Recovery Text: For a CREATE TABLE statement, correct the number of partitions so that the number does not exceed the maximum or reduce the key length. For an ALTER TABLE statement, remove the ADD PARTITION or ATTACH PARTITION clause. Try the request again.
SQLCODE or SQLCODEs: -4701
SQLSTATE or SQLSTATEs: 54054
SQL4729
Message Text: Procedure &1 in &2 cannot be called because call stack already contains an autonomous procedure.
Cause Text: Procedure &1 in &2 is defined as autonomous and another autonomous procedure is already on the call stack. Only one invocation of an autonomous procedure can be present on the call stack at any given time.
Recovery Text: Call a procedure that is not autonomous when the call stack already has one autonomous procedure running.
SQLCODE or SQLCODEs: -4729
SQLSTATE or SQLSTATEs: 51043
SQL4903
Message Text: The length of parameter &1 of function &2 is not valid.
Cause Text: The length of parameter &1 of function &2 is not valid.
Recovery Text: Correct the specified parameter and call the function again.
SQLCODE or SQLCODEs: -4903
SQLSTATE or SQLSTATEs: