Cause: A host variable could not be used as specified in the statement because its data type is incompatible with the intended use of its value.
This error can occur as a result of specifying an incorrect host variable or an incorrect SQLTYPE value in a SQLDA on an EXECUTE or OPEN statement.
The statement cannot be processed.
Action: Verify that the data types of all host variables in the statement are compatible with the manner in which they are used.
sqlcode: -301
sqlstate: 07006
Cause: The value of an input host variable was found to be too large for its use in the SELECT, VALUES, or prepared statement. One of the following occurred:
This error occurs as a result of specifying either an incorrect host variable or an incorrect SQLLEN value in an SQLDA on an EXECUTE or OPEN statement.
The statement cannot be processed.
Action: Ensure that the input host variable value is the correct type and length. If the input host variables supply values to parameter markers, match values with the implied data type and length of the parameter marker.
DataJoiner users: for a pass-through session, determine what data source is causing the error (see the Problem Determination Guide for procedures to follow to identify the failing data source). Examine the SQL dialect for that data source to determine which specific restriction has been violated, and adjust the failing statement as needed.
sqlcode: -302
sqlstate: 22001, 22003
Cause: An imbedded SELECT or VALUES statement selects into a host variable, but the data type of the variable is not compatible with the data type of the corresponding SELECT-list or VALUES-list element. Both must be numeric, character, or graphic. For example, if the data type of the column is date or time, the data type of the variable must be character with an appropriate minimum length.
The statement cannot be processed.
Action: Verify that the table definitions are current and that the host variable has the correct data type.
sqlcode: -303
sqlstate: 42806
Cause: A FETCH, VALUES, or SELECT into a host variable list failed because the host variable was not large enough to hold the retrieved value.
The statement cannot be processed. No data was retrieved.
Action: Verify that table definitions are current and that the host variable has the correct data type. For the ranges of SQL data types, refer to the SQL Reference.
DataJoiner users: for the ranges of SQL data types, refer to the IBM DataJoiner Application Programming and SQL Reference Supplement.
sqlcode: -304
sqlstate: 22001, 22003
Cause: A FETCH or embedded SELECT or VALUES operation resulted in the retrieval of a NULL value to be inserted into a host variable for which no indicator variable was provided. An indicator variable must be supplied if a column can return a NULL value.
The statement cannot be processed. No data was retrieved.
Action: Examine the definition of the FETCH or SELECT object table or the elements of the VALUES list. Correct the program to provide indicator variables for all host variables where NULL values from those columns can be retrieved.
sqlcode: -305
sqlstate: 22002
Cause: The host variable "<name>" is not declared in any DECLARE SECTION.
The statement cannot be processed.
Action: Ensure that the host variable is declared and the name spelled correctly.
Cause: The host variable "<name>" has already been declared in a DECLARE SECTION.
The definition is ignored. The previous definition is used.
Action: Ensure that the host variable name is spelled correctly and the name is defined only once for each program.
Cause: The limit on the number of host variables is dependent on how many will fit in the HOST_VARS column of SYSPLAN. This limit has been reached.
The remaining variable declarations are ignored.
Action: Either simplify the program, split the program into smaller, separate programs, or do both.
Cause: The value of an input host variable was found to be NULL but the corresponding use in the SELECT, VALUES, or prepared statement did not specify an indicator variable.
The statement cannot be processed.
Action: Ensure you need a USING clause. Otherwise, ensure an indicator variable is specified only if required.
sqlcode: -309
sqlstate: 07002
Cause: The maximum number of host variables was exceeded in the statement.
The statement cannot be processed.
Action: Ensure the statement has fewer host variables or is less complex.
Cause: When evaluated, the length specification for the string host variable, whose entry in the SQLDA is indicated by <var-number> (based at 1), was negative or greater than the maximum defined for that host variable.
The statement cannot be processed.
Action: Correct the program to ensure that the lengths of all string host variables are not negative or that they are not greater than the maximum allowed length.
sqlcode: -311
sqlstate: 22501
Cause: The host variable "<host-name>" appears in the SQL statement, but host variables are not allowed in dynamic SQL statements, in the SELECT statement of a view definition, or in the triggered action of a trigger definition.
The statement cannot be processed.
Action: Use parameter markers (?) instead of host variables for dynamic SQL statements. Do not use host variables and parameter markers in view or trigger definitions.
sqlcode: -312
sqlstate: 42618
Cause: The number of host variables specified in the EXECUTE or OPEN statement is not the same as the number of host variables or parameter markers (?) appearing in the SQL statement.
The statement cannot be processed.
Action: Correct the application program so the number of host variables specified in the EXECUTE or OPEN statement and the number of host variables or parameter markers in the SQL statement are the same.
sqlcode: -313
sqlstate: 07001, 07004
Cause: The host variable "<name>" is not declared correctly for one of the following reasons:
The variable remains undefined.
Action: Ensure that you correctly specify only the declarations the database manager supports.
Cause: The host variable is not declared correctly for one of the following reasons:
The variable remains undefined.
Action: Ensure that you correctly specify only the declarations the database manager supports.
Cause: The end of input was reached during processing of a DECLARE SECTION.
Precompilation is terminated.
Action: Add an END DECLARE SECTION statement to end a DECLARE SECTION.
Cause: An END DECLARE SECTION statement was found, but there was no previous BEGIN DECLARE SECTION.
The statement cannot be processed.
Action: Enter a BEGIN DECLARE SECTION before an END DECLARE SECTION.
Cause: Either the INDICATOR variable "<name>" is not a small integer or the STATEMENT variable "<name>" is not a character data type.
The statement cannot be processed.
Action: Ensure that the variable is the correct type and is specified correctly.
Cause: No conversion of data is supported from the source code page to the target code page. This error can occur under the following conditions:
The reason codes are as follows:
Action: Possible solutions include:
DataJoiner users: for DataJoiner code page support, see "National Language Support", in the IBM DataJoiner Planning, Installation, and Configuration Guide.
sqlcode: -332
sqlstate: 57017
Cause: During the execution of the SQL statement, a code page conversion operation has resulted in a string that is longer than the maximum size of the target object.
Action: Modify the data to avoid the overflow condition, depending on the circumstances, by:
Note: | Automatic promotion of character or graphic string data types will not occur as part of character conversion. If the resultant string length exceeds the maximum length of the data type of the source string then an overflow has occurred. To correct this situation either change the data type of the source string or use data type casting to allow for an increase in the string length due to conversion. |
sqlcode: -334
sqlstate: 22524
Cause: An ON clause associated with a JOIN operator is not valid for one of the following reasons.
The statement cannot be processed.
Action: Correct the ON clause to reference appropriate columns or delete any subqueries or scalar fullselects.
If using full outer join ensure that all functions in the ON clause are deterministic and have no external action.
sqlcode: -338
sqlstate: 42972
Cause: The common table expression name "<name>" is used in the definition of more than one common table expressions in the statement. The name used to describe a common table expression must be unique within the same statement.
The statement cannot be processed.
Action: Change the name of one of the common table expressions.
sqlcode: -340
sqlstate: 42726
Cause: The common table expression "<name1>" refers to "<name2>" in a FROM clause within its fullselect and "<name2>" refers to "<name1>" in a FROM clause within its fullselects. Such forms of cyclic references are not allowed.
The statement cannot be processed.
Action: Remove the cyclic reference from one of the common table expressions.
sqlcode: -341
sqlstate: 42835
Cause: There are two possible explanations:
The statement cannot be processed.
Action: Remove the keyword DISTINCT from the common table expression, add the keyword ALL following UNION, or remove the recursive reference within the common table expression.
sqlcode: -342
sqlstate: 42925
Cause: The recursive common table expression "<name>" must include the specification of the column names following the identifier of the common table expression.
The statement cannot be processed.
Action: Add column names following the identifier of the common table expression.
sqlcode: -343
sqlstate: 42908
Cause: The recursive common table expression "<name>" has a column "<column-name>" that is referred to in the iterative fullselect of the common table expression. The data type, length and code page are set based on the initialization fullselect for this column. The result of the expression for the column "<column-name>" in the iterative fullselect has a different data type, length or code page that may result in failure to assign the value for the column.
The statement cannot be processed.
Action: Correct the column used in the fullselects of the recursive common table expression so that the initialization column matches the iterative columns.
sqlcode: -344
sqlstate: 42825
Cause: The common table expression "<name>" includes a reference to itself and therefore:
The statement cannot be processed.
Action: Change the common table expression by:
sqlcode: -345
sqlstate: 42836
Cause: The common table expression "<name>" includes an invalid reference to itself as described by one of the following.
The statement cannot be processed.
Action: Change one of the following:
sqlcode: -346
sqlstate: 42836
Cause: The recursive common table expression called "<name>" may not complete. This warning is based on not finding specific syntax as part of the iterative portion of the recursive common table expression. The expected syntax includes:
The absence of this syntax in the recursive common table expression may result in an infinite loop. The data or some other characteristic of the recursive common table expression may allow the successful completion of the statement anyway.
Action: To prevent an infinite loop, include the expected syntax as described.
sqlcode: +347
sqlstate: 01605
Cause: Even in cases where it would not violate the maximum size of an index, key, or constraint, a LOB column, DATALINK column, or structured type column cannot be used in an index, key or constraint. This includes a distinct type column based on a LOB or DATALINK.
The statement cannot be processed.
Action: Remove the LOB, DATALINK or structured type column from the specification of the index, key, or constraint. An index defined on a structured type column may be defined using an index extension.
sqlcode: -350
sqlstate: 42962
Cause: LOB data types are not defined in DRDA. Hence, LOB data or distinct types based on LOB data cannot be flowed using the DRDA protocol. "<position-number>" is the position of the element with a LOB data type in the select-list.
The statement cannot be processed.
Action: Make sure that LOB data is not being retrieved when using DRDA by excluding them in the select-list, or select smaller pieces of the LOB by using CHAR(SUBSTR(CLOB)).
sqlcode: -351
sqlstate: 56084
Cause: LOB data types are not defined in DRDA. Hence, LOB data cannot be flowed using the DRDA protocol. "<position-number>" is the position of the element with a LOB data type in the input-list.
The statement cannot be processed.
Action: Make sure that LOB data is not being sent when using DRDA by excluding them in the input-list.
sqlcode: -352
sqlstate: 56084
Cause: Large Object data types (BLOB, CLOB, and DBCLOB) may be created in sizes up to 2 gigabytes (2147483647 bytes). Logging of data values is allowed only upon objects which are less than or equal to than 1 gigabyte (1073741823 bytes) in size. Therefore, large objects greater than 1 gigabyte in size can not be logged.
Action: Either explicitly indicate logging of data is not required, by using the NOT LOGGED phrase during column creation, or reduce the maximum size of the column to 1 gigabyte or below.
sqlcode: -355
sqlstate: 42993
Cause: A reference to a DATALINK value required access to the file server "<server-name>". This file server is not currently available as indicated by the reason code.
The statement cannot be processed.
Action: The action depends on the reason code as follows.
sqlcode: -357
sqlstate: 57050
Cause: A DATALINK value could not be assigned for one of the following reasons.
The statement cannot be processed.
Action: The action is based on the "<reason-code>" as follows.
sqlcode: -358
sqlstate: 428D1
Cause: DATALINK values in table "<table-name>" may not be valid because the table is either in reconcile pending or reconcile not possible state. While in either of these states control of the files on the file server is not guaranteed.
Statement processing continues.
Action: Use the DATALINK RECONCILE command or API to restore the table to normal state, if possible.
sqlcode: +360
sqlstate: 01627
Cause: A DATALINK value already exists that references the file server "<server-name>" that is not registered to the database.
The statement cannot be processed.
Action: Contact the database administrator to determine why the file server is no longer registered.
sqlcode: -368
sqlstate: 55022
Cause: All parameters for functions defined with LANGUAGE SQL must have a parameter-name for each parameter.
The statement cannot be processed.
Action: Include a parameter name for each parameter of the function.
sqlcode: -370
sqlstate: 42601
Cause: The following situations may be the cause of this error.
NOT DETERMINISTIC must be specified if either of the following conditions apply within the body of the function:
READS SQL DATA must be specified if the body of the function defined with LANGUAGE SQL contains a subselect or if it calls a function that can read sql data.
EXTERNAL ACTION must be specified if the body of the function defined with LANGUAGE SQL calls a function that has the EXTERNAL ACTION property.
The statement cannot be processed.
Action: Either specify the clause or change the function body.
sqlcode: -374
sqlstate: 428C2
Cause: One of the data types must be a user-defined type. The source type and the target type cannot be the same data type.
The statement cannot be processed.
Action: Change the data type of either the source or the target.
sqlcode: -388
sqlstate: 428DF
Cause: A cast function must
The statement cannot be processed.
Action: Either chose a different function instance, change the source data type, or change the target data type.
sqlcode: -389
sqlstate: 428DG
Cause: A function resolved to a specific function that is not valid in the context where it is used. If "<specific-name>" is an empty string, then the function resolved to the built-in function identified by "<function-name>". Some of the possible situations include:
The statement cannot be processed.
Action: Ensure that the correct function name and arguments are specified and that the current path includes the schema where the correct function is defined. You may need to change the function name, the current path (using SET CURRENT FUNCTION PATH or the FUNCPATH bind option), or change the context in which the function is used.
sqlcode: -390
sqlstate: 42887
Cause: The statement uses a row based function "<function_name>" that cannot be used for one of the following reasons:
The statement cannot be processed.
Action: Remove "<function-name>" from the context where it is not allowed.
sqlcode: -391
sqlstate: 42881