|
|
repeat the steps from preprocessing to execution of the
22001
Character or datetime value too large
program.
for host variable.
22003
Numeric overflow or underflow.
-303
The data type of the output host
System Action: Processing of the SQL statement has
variable is not compatible with the data
ended.
type of the fetched column or
expression, or the returned value from
User Response: Correct the output host variable so
an SQL CALL statement.
that it is large enough to contain the source data value.
You must repeat the steps from preprocessing to
Explanation: A SQL CALL, FETCH, or SELECT into
execution of the program.
the output host variable could not be performed. The
data type of an output variable is not compatible with
Note: If the error occurred in the select-list of an outer
the data type of the fetched column, expression, or
SELECT statement, indicator variables can be
returned value from an SQL CALL. The data type of
added to each of the expressions, to allow you to
the output host variable and the data type of the
get values not in error, and retrieve subsequent
fetched column, expression, or returned value must
rows. In that case, the +802 SQLCODE would be
both be numeric, or both be character, or both be
issued and the indicator VARIABLEs associated
DBCS. If the data type of the fetched column,
with the last VARIABLE in error has been
expression, or returned value is date, time, or
assigned a value of -2.
timestamp, the data type of output host variable must
be character, or the same data type as the fetched
column, expression, or returned value from SQL CALL
-305
You did not associate an indicator
statement.
variable with an output host variable.
An error has occurred because a NULL
SQLSTATE 42806.
data value was fetched.
System Action: Processing of the SQL statement has
Explanation: A null value has been fetched but the
ended.
output host variable has provided no indicator variable.
User Response: Check output data type and correct
SQLSTATE 22002.
output variable. If an SQL statement is modified, you
must repeat the steps from preprocessing to execution
System Action: Processing of the SQL statement has
of the program.
ended.
If this error is received on an SQL CALL statement, you
User Response: Declare an indicator variable and
may need to redefine the stored procedure as follows:
connect it to the output host variable. This will allow
1. Issue the STOP PROC operator command with the
null values to be returned. You must repeat the steps
REJECT option for the procedure
from preprocessing to execution of the program.
2. Use the DROP PROCEDURE statement to remove
the existing definition
-306
You did not declare the host variable
3. Use the CREATE PROCEDURE statement to
variable-name.
redefine the procedure
4. Issue the START PROC operator command to
Explanation: The named host variable was not
activate the procedure.
declared between the BEGIN DECLARE SECTION and
the END DECLARE SECTION SQL statements, or an
error occurred in the declaration of the host variable.
-304
A value with data type data-type1 cannot
be assigned to a host variable because
SQLSTATE Spaces.
the value is not within the range of the
host variable in position position-number
System Action: Processing continues, but a new
with data type data-type2.
package will not be produced. If the package existed
previously, it will be restored.
Explanation: An SQL CALL, FETCH, or SELECT into
a host variable, position number position-number, failed
User Response: Add a declaration for the missing
because the host variable with data type data-type2 was
host variable in the host variable declare section. You
not large enough to hold the retrieved value with data
must repeat the steps from preprocessing to execution
type data-type1. In the case of a datetime source data
of the program.
type, the datetime value was too large to fit in the
character or datetime output host variable after
-307
You have already declared host
conversion to character format. The SQL CALL,
identifier ident-name.
FETCH, or SELECT statement is not executed. No data
is returned.
Explanation: The host-identifier ident-name is declared
more than once in a SQL DECLARE section in this
SQLSTATEs:
program or subprogram unit. The host identifier must
270
Messages and Codes
be the name of a host variable or indicator variable. In
-312
An SQL statement containing host
those languages that support host structures, the host
variables cannot be submitted by way of
identifier can be a host structure or a host structure
a PREPARE, EXECUTE IMMEDIATE, or
field. The indicator variable can be an indicator array.
DECLARE CURSOR statement.
SQLSTATE Spaces.
Explanation: Any SQL statement submitted on a
System Action: Processing continues, but a new
PREPARE or EXECUTE IMMEDIATE statement must
package will not be produced. If the package existed
not contain input or output host variables. In addition,
previously, it will be restored.
the SELECT portion of the DECLARE cursor statement
must not contain input or output host variables.
User Response: Remove the duplicate declaration.
Rerun the preprocessor.
SQLSTATE 42618.
System Action: Processing of the SQL statement has
-309
You used a negative indicator variable
ended.
in a predicate in an invalid context.
User Response: Replace the host variables with
Explanation: A predicate uses a negative indicator
parameter markers. You must repeat the steps from
variable. Negative indicator variables are not allowed
preprocessing to execution of the program.
in predicates (except predicates using the "=" operator)
of Dynamic SQL statements. Nor are they allowed in
-313
There is a mismatch between the
predicates (except predicates using the "=" operator) of
number of host variables declared and
Extended Dynamic SQL statements that have no input
the number of host variables required
SQLDA in the PREPARE statement. See the DB2 Server
for the SQL statement.
for VSE & VM Application Programming manual for
information about using negative indicator variables.
Explanation: The user has not supplied exactly as
many input program host variables as needed by the
SQLSTATE 22512.
SQL statement. SQLERRD1 contains further
System Action: Processing of the SQL statement ends.
information about the error. The possible values are:
User Response: Correct the input host variable so that
-100
Input program host variables are required and
is does not have a negative indicator variable or change
either no SQLDA has been provided or the
the SQL statement so that the negative indicator
number of variables is zero.
variable is used in a valid context. You must repeat the
-110
The number of input program host variables is
steps from preprocessing to execution of the program.
negative.
-120
The number of input program host variables
-311
An invalid length was specified for an
does not equal the number required.
input host variable character string.
Explanation: The value contained in the length
SQLSTATEs:
portion of the variable length host variable is either
07001
The number of host variables is not the same
negative or greater than the length of its data portion.
as the number of parameter markers.
SQLSTATE 22501.
07004
The statement contains parameter markers but
System Action: Processing of the SQL statement ends.
the USING clause is not specified.
If this error occurred during an explicit connect, the
System Action: Processing of the SQL statement has
logical unit of work (if any) is rolled back and the
ended.
resource adapter returns to the application with SQLCA
fields SQLWARN0 and SQLWARN6 both set to S,
User Response: Correct the statement or define more
indicating a serious system error.
input host variables. You must repeat the steps from
preprocessing to execution of the program.
User Response: If this SQLCODE was issued in
response to a non-CONNECT statement, correct the
value in the length portion of the host variable so that
-314
You declared a host variable incorrectly.
it is not negative and it is not greater than the length of
Explanation: An error occurred while a DB2 Server for
its data portion. You must repeat the steps from
VSE preprocessor was processing a host-identifier
processing the program through to running the
declaration. The host identifier must be the name of a
program.
host variable or indicator variable. In those languages
If this SQLCODE was issued in response to a
that support host structures, the host identifier can be a
CONNECT statement, only a CONNECT statement will
host structure or host structure field. The indicator
be accepted. Check the length field of the host variable
variable can be an indicator array.
used for your database name. It should be ≥ 1 and ≤ 18.
271
v
For the ASSEMBLER preprocessor, one of the
-407
No closing bracket. Example:
following errors was found:
char var1[123 ;
SQLERRD1:
-408
Length of C NUL-terminated string exceeds
-403
Only reserved names are found in a
32767 EBCDIC characters. Example:
declaration statement and no variable name
char var1[32768];
is supplied.
-409
A VARCHAR variable is declared as more
-404
Constant too long for halfword variable.
than 32767 characters in length. Example:
-405
No length value on character declaration.
struct{
short ll;
-406
A character other than a blank or quote was
char dd[35000];
found after ’F’ or ’D’.
} Var1;
-407
Length value on fixed-length character
-410
Invalid delimiter found in declaration.
string exceeds 254.
Examples:
-408
Length value on character string exceeds
char empno[12]
- missing semi-colon
32767.
short projno actno;
- missing comma
char midinit-’E’;
- dash instead of ’=’
-409
No length value on decimal declaration.
-411
Declaration missing right parenthesis.
-410
Length value on decimal declaration
Example:
exceeds 31.
long (var1;
-411
Constant on decimal declaration exceeds 31
-412
Error in SQLVARCHAR declare.
characters (excluding sign and decimal
point).
Examples:
SQLVARCHAR ABC,35);
/* missing left parenthesis */
-412
A character other than a blank or quote was
SQLVARCHAR(ABC 35);
/* missing comma
*/
found after the precision (p) of a decimal
declaration.
-413
Error in VARCHAR declaration.
-413
Precision of constant on a decimal
Examples:
declaration is greater than the precision (p)
struct{
specified.
short ll
/* missing semicolon
*/
char dd[200];
-414
Unknown operand type.
} Var1;
-415
Length value of 0 specified for character or
struct{
decimal declaration.
short ll = 23; /* improper initialization
*/
char dd[200];
v
For the C preprocessor, one of the following errors
} Var1;
was found:
-414
The declaration contains two consecutive
SQLERRD1:
'struct' keywords.
-402
Use of conflicting data types. Example: long
-415
Invalid structure declaration caused by one
short int Var1;
of the following:
-403
No name or only reserved names are found
- The structure name is missing.
in a declaration statement. No name or only
- The right brace is missing.
reserved names and no tags are found in a
structure declaration.
- There is a semicolon missing after the
structure element or imbedded structure
-404
Incorrect syntax in multiple declaration.
declaration.
Example:
-416
More than one structure tag found.
short aa,bb,,cc;
Example:
-405
Value contains nonnumeric characters.
struct employee auto {
Examples:
short
empno;
SQLVARCHAR (lastname, 10-);
SQLVARCHAR(firstname,12);
projno
char[3e];
SQLVARCHAR(lastname,15);
} acct_emp;
-406
Scale holds more than 5 places or 0.
Example:
-417
Invalid data type in structure element
declaration.
char var1[123456];
char var1[0];
-418
Invalid indicator array declaration caused
by one of the following:
272
Messages and Codes
- The data type is not equivalent to the
PIC X(n)
1 <= n <= 32767
DB2 Server for VSE data type small
PIC G(n)
1 <= n <= 16383
integer.
-406
The repetition factor (parenthesized value) is
- The indicator array is declared as part of
not preceded by 9 or X value that is to be
a structure.
repeated.
- The number of occurrences is greater
Examples:
than 65535.
PIC (4)
should be PIC S9(4)
- The array is declared as a multiple
PIC S9(4)V(3) should be
occurrence structure.
PIC S9(4)V9(3)
-419
Indirection operator '*' being used in a
-407
Something other than 0 through 9 found:
VARCHAR or structure declaration.
- in the parentheses in a PIC clause
- in place of a level number
-420
Indicator array or character string declared
- in the occurrence count of an indicator
with multiple dimensions. Example:
array.
short indarr[5][5];
-421
Precision was not specified for decimal
Examples:
declaration. Example:
01 NAME PIC X(2A0)
decimal Var1;
01 NAME PIC S9(-1)
decimal() Var2;
-408
Found more than one V (implied decimal
-422
Precision specified in decimal declaration is
place) in a PIC clause for a decimal
greater than 2 digits long or has a value
declaration, or found one or more V in a
greater than 31. Example:
PIC clause for an integer declaration.
Examples:
decimal(42) Var1;
decimal(123,3) Var2;
PIC S9(10)V99V99 COMP-3.
PIC S9(4)V9
COMP.
-423
Precision specified in decimal declaration is
PIC S9(9)V99
COMP.
0. Example:
-409
Invalid character in a PIC clause. Examples:
decimal(0) Var1;
PIC X(3)XXIXX
-424
Scale of decimal declaration is greater than
PIC Q(3)
its precision. Example:
-410
Parenthesis left open in a PIC clause
decimal(5,8) Var1;
repetition factor. Examples:
decimal(16,32) Var2;
PIC S9(10 COMP.
-425
Precision and/or scale specified in decimal
PIC S9(8)V9(4 COMPUTATIONAL-3.
declaration cannot be an octal number.
Example:
-411
The declaration is incomplete.
decimal(5,02) Var1;
-412
PIC clause does not start with X, S, G or N.
decimal(05,2) Var2;
Examples:
decimal(08,03) Var3;
PIC Q(3).
-426
A result set locator variable has been
PIC Z(4).
declared incorrectly.
PIC (20).
v
For the COBOL preprocessor, one of the following
-413
A PIC clause beginning with S is required if
errors was found:
COMPUTATIONAL or
SQLERRD1:
COMPUTATIONAL-3 is specified. Similarly,
COMPUTATIONAL or
-402
Both the group or element name and the
COMPUTATIONAL-3 is required if a PIC
data type are missing.
clause beginning with S is specified.
Examples:
-403
Only reserved names are found in a
declaration statement and no variable name
PIC X(4) COMP.
is supplied.
PIC S9(4).
PIC X(4) COMP-3.
-404
VARCHAR or VARGRAPHIC length (first
level 49) is declared as PIC S9(n)COMP.,
-414
A variable with COMP specified is declared
where n>4. The correct declaration is with
as: PIC S9(n) COMP where either n<1 or
1<=n<=4.
n>9. The valid values for n are: 1<=n<=9.
-405
VARCHAR or VARGRAPHIC second level
Examples:
49 is not one of these forms:
273
PIC S9(0) COMP
FILLER, the entire declaration is ignored
PIC S9(10) COMP
and no message is generated.
- A subordinate group or element name is
-415
No length for a DECIMAL PICTURE clause.
missing.
Example:
- New level was found, but the previous
PIC S COMPUTATIONAL-3.
level is not a group level.
- A group level was specified but no
-416
The precision of a DECIMAL variable is
elements are specified for the group.
greater than 31.
- A REDEFINES clause was found within
-417
A variable has a PIC clause with 0 length.
the structure.
Example:
-423
Invalid indicator array declaration caused
PIC X(0).
by one of the following:
-418
The following COBOL DECLARE clauses
- The data type is missing.
are not permitted in host variable
- The data type is not equivalent to the
declarations:
DB2 Server for VSE data type small
integer.
... BLANK WHEN ZERO.
- The indicator array is declared as part of
... SIGN
... JUSTIFIED...
a structure containing other elements.
- The number of occurrences is greater
-419
A VARCHAR variable is declared as more
than 65535.
than 32767 characters in length, or a
- The level number of the array is 01 or 77.
VARGRAPHIC variable is declared as more
An indicator array must be an element of
than 16383 DBCS characters in length.
a level 01 group.
Examples:
- The TIMES is missing from the OCCURS
01 DESCRIPTION.
clause of an indicator array declaration.
49 DESCRIPTION-LEN PIC S9(4) COMP.
-424
A level 77 element is declared within a
49 DESCRIPTION-VAL PIC X(33000).
structure, or as the level number of a major
-420
A CHARACTER variable is declared as
group.
more than 254 characters in length, or a
-425
A level number is outside the range 01 to
GRAPHIC variable is declared as more than
49, 66, 77, and 88. Levels 66 and 88 are
127 DBCS characters in length. Example:
ignored.
01 NAME PIC X(300).
-426
A literal string in the declaration statement
-421
The declaration is not correctly terminated.
contains an invalid DBCS string.
This error usually indicates a missing period
in your DECLARE statement.
-427
A closing quotation mark is missing.
Examples:
-428
The data type is missing from the
declaration of an elementary item.
Example
1.
77 FIRST-NM PIC X(10)
<- missing period
-429
There is an incomplete or invalid attribute
77 LAST-NM
PIC X(10).
<- error reported
specification, an attribute incorrectly placed
after this declaration
in the declaration, or some other unknown
Example 2.
string.
01 DESCRIPTION.
49 DESC-LEN PIC S9(4) COMP <- missing
-430
A result set locator variable has been
period
declared incorrectly.
49 DESC-TXT PIC X(100).
<- error
reported
v
For the PL/I preprocessor, one of the following
after this declaration
errors was found:
SQLERRD1:
-422
Invalid structure declaration caused by one
of the following:
-403
Missing parenthesis or parenthetical phrase
- The structure does not begin with a level
in the value clause of an attribute
01 group.
specification.
- The structure contains more than one
level 01 group.
Examples:
- The name of a subordinate group is
DCL EMPNO
BINARY FIXED(31) INITIAL (2500;
FILLER. FILLER is only allowed as the
DCL EMPNAME
CHAR (25) INITIAL;
name of elementary items within a
-404
Precision or scale specified in decimal
structure. If the name of a level 01 group
declaration is greater than 2 digits long or
or an independent elementary item is
has a value greater than 31.
274
Messages and Codes
-405
Scale of decimal declaration is greater than
-420
Level number missing. Only scalar variables
its precision.
may be declared without a level number.
-406
Value other than 15 or 31 found for binary
-421
Invalid structure declaration caused by one
fixed declarations.
of the following:
- The declaration has a duplicate level 1.
-407
A fixed binary field was declared with a
- The level number is greater than 65535.
number other than zero specified for the
- Data type attributes were found on a
number of places to the right of the binary
structure variable declaration.
point. For example, FIXED BINARY (15,0) is
correct, but FIXED BINARY (15,3) is not
-422
Invalid indicator array declaration caused
correct.
by one of the following:
- The data type is missing.
-408
Length of BINARY FLOAT variable is
- The data type is not equivalent to the
greater than 53 or length of DECIMAL
DB2 Server for VSE data type small
FLOAT variable is greater than 16.
integer.
-409
Length of character string exceeds 32767
- The indicator array is declared as part of
EBCDIC characters or 16383 double-byte
a structure.
character set (DBCS) graphic characters.
- The number of occurrences is greater
than 65535.
-410
Length of fixed-length character string
exceeds 254 EBCDIC characters or 127 DBCS
-423
Factoring of structure names is not
graphic characters.
permitted.
-411
A semicolon or a comma was found, but
-424
Datatype missing from a scalar variable or
neither the variable name nor the attribute
structure element declaration, or the name is
was specified.
missing, which causes the datatype to be
taken as the variable name.
-412
Incorrect syntax in variable list.
-425
A structure declaration does not begin with
-413
FIXED found without corresponding
a level number of 1.
BINARY or DECIMAL.
-426
A result set locator variable has been
-414
BINARY found without corresponding
declared incorrectly.
FIXED or FLOAT.
-415
FLOAT found without corresponding
SQLSTATE Spaces.
BINARY or DECIMAL.
System Action: Processing has ended for this host
-416
DECIMAL found without corresponding
variable.
FIXED or FLOAT.
User Response: Correct the statement. Try again.
-417
There is an incomplete or invalid attribute
specification, an attribute incorrectly placed
-315
The following host variable for user ID
in the declaration, or some other unknown
or password is not preceded by a colon
string.
in the SQL CONNECT statement:
Examples:
variable-name.
DCL EMPNO
BNARY FIXED (15);
Explanation: User ID and password used in the
- invalid attribute
CONNECT SQL statement should be declared as host
DCL AUTOMATIC EMPNAME CHAR(20);
variables. The names of those host variables in the
- incorrect placement
CONNECT SQL statement should be preceded by a
DCL DEPTNAME
CHAR <10);
colon (:).
- unknown string <
DCL 01 EMPLOYEE DEFINED,
SQLSTATE Spaces.
- incomplete attribute specification
System Action: Processing of the SQL statement has
ended.
-418
Value contains non-numeric characters.
User Response: Correct the statement. Try again.
Examples:
DCL IND_ARRAY
(1-) BINARY FIXED (15);
-316
The SQL statement prefix, EXEC SQL,
DCL EMPNAME
CHAR (1A);
was found in COBOL section A
-419
Length value of 0 specified for character or
(columns 8-11). EXEC SQL should not
graphic string or numeric field.
start before column 12.
Explanation: EXEC SQL was coded beginning in
275
Section A of a statement in a COBOL program
User Response: Remove the extra statement. Try
(columns 8-11). EXEC SQL should not start before
again.
column 12.
SQLSTATE Spaces.
-320
The SQL declare section did not end
before the end of the containing
System Action: Processing of the SQL statement has
COBOL section.
ended.
Explanation: A BEGIN DECLARE SECTION statement
User Response: Correct the statement. Try again.
was found, but a matching END DECLARE SECTION
was not found before the containing
-317
Valid SQL statements in the
WORKING-STORAGE SECTION, LINKAGE SECTION,
WORKING-STORAGE SECTION are
or FILE SECTION ended.
BEGIN DECLARE SECTION, END
SQLSTATE Spaces.
DECLARE SECTION, INCLUDE
SQLCA, and INCLUDE.
System Action: Processing of the SQL statement ends.
Explanation: The BEGIN or END DECLARE
User Response: Insert an END DECLARE SECTION
SECTION, the INCLUDE SQLCA or the INCLUDE
statement. Try again.
command has been coded improperly. Following are
probable causes:
-321
An SQL statement other than an
v EXEC SQL not followed by BEGIN, END, or
INCLUDE statement appears in the
INCLUDE when appearing in the LINKAGE, FILE,
declarative section of the COBOL
or WORKING-STORAGE SECTION of COBOL
PROCEDURE DIVISION.
v More than one BEGIN DECLARE SECTION before
Explanation: An SQL statement other than an
an END DECLARE SECTION found
Extended INCLUDE statement cannot appear in the
v An END DECLARE SECTION found before a BEGIN
declarative section of the PROCEDURE DIVISION in
DECLARE SECTION
COBOL.
v Missing END-EXEC terminator or improper SQL
SQLSTATE Spaces.
statement in LINKAGE, FILE, or
WORKING-STORAGE SECTION.
System Action: Processing of the SQL statement ends.
v PROCEDURE DIVISION is missing after the
User Response: Move or remove the statement. Try
WORKING-STORAGE SECTION.
again.
SQLSTATE Spaces.
-322
EXEC SQL was in a section other than
System Action: Processing of the SQL statement has
the FILE, LINKAGE,
ended.
WORKING-STORAGE SECTION, or
PROCEDURE DIVISION sections.
User Response: Correct the statement. Try again.
Explanation: An SQL statement (one beginning with
EXEC SQL) must only appear in the
-318
INCLUDE SQLCA SQL statement is
WORKING-STORAGE, FILE, or LINKAGE sections of
outside the WORKING-STORAGE
the DATA DIVISION or in the PROCEDURE
SECTION.
DIVISION.
Explanation: An INCLUDE SQLCA statement must
SQLSTATE Spaces.
only be coded in the COBOL WORKING-STORAGE
section.
System Action: Processing of the SQL statement ends.
SQLSTATE Spaces.
User Response: Move or remove the statement. Try
again.
System Action: Processing of the SQL statement ends.
User Response: Move the statement. Try again.
-323
A new SQL statement begins before the
previous one properly ended. Both
-319
More than one INCLUDE SQLCA
statements are ignored.
statement was in the COBOL program.
Explanation: Missing END-EXEC following EXEC
Explanation: Only one INCLUDE SQLCA statement
SQL. Another EXEC SQL was found before the
can appear in a COBOL program.
previous END-EXEC was found.
SQLSTATE Spaces.
SQLSTATE Spaces.
System Action: Processing of the SQL statement ends.
System Action: Processing of the SQL statement ends.
276
Messages and Codes
User Response: Correct the statements. Try again.
User Response: Eliminate the failed statement either
by moving it to an Assembler language program for
preprocessing or by changing the statement to the
-324
Host variable variable is declared with an
Dynamic form as opposed to the Extended Dynamic
attribute that is incorrect for its use in
form. Try again.
the SQL statement.
Explanation: The SQL statement requires a host
-326
Indicator variable variable-name must be
variable of a particular data type or length that was not
declared with a data type and length
found. If a variable number is specified, it corresponds
that equates to an SQL data type of
to the variable’s position in the SQL statement. Some
SMALLINT.
specific examples of this error are:
Explanation: The named indicator variable was not
v A locator variable passed in is not declared as integer
declared with a data type and length which equates to
or RESULT SET LOCATOR datatype.
an SQL data type of SMALLINT.
v Statement-id is not an integer in one of the following
extended dynamic commands: DROP STATEMENT,
System Action: Processing of the SQL statement has
PREPARE, DECLARE CURSOR, DESCRIBE, or
ended.
EXECUTE.
User Response: Correct the declaration of the
v Cursor name host variable is not character or is
indicator variable so that it has an SQL data type of
longer than 18.
SMALLINT. This information is in the DB2 Server for
v User ID, password, or package name host variable is
VSE & VM Application Programming manual.
not a fixed character string, or, in C, is not a
SQLSTATE Spaces.
NUL-terminated character string.
v User ID, password, or package name host variable is
not 8 in length, or, in C, is not 9 in length.
-330
A string value cannot be used because
at least one of its characters cannot be
v Options host variable on a CREATE
converted.
PROGRAM/PACKAGE statement is not defined in
varchar format or is longer than 8192.
Explanation: An error occurred when converting an
v The server-name host variable is not a fixed or
application input string variable to the application
varying length character string with a length in the
server’s representation. The value of the string host
range of 1-18 or, in C, a C-NUL terminated character
variable is incompatible with its use because of a
string with a length in the range of 2-19.
mismatch in data representation. The value cannot be
used as specified.
v The structure is not a valid host structure.
v Use of a host structure is not permitted.
SQLSTATE 22021.
v An indicator array is used in place of a host variable
System Action: Processing of the SQL statement has
or main variable.
ended.
User Response: Correct the statement.
SQLSTATE Spaces.
System Action: Processing continues, but a new
-331
A string value cannot be assigned to a
package will not be produced. If the package existed
non-nullable host variable because at
previously, it will be restored.
least one of the characters in the source
User Response: Change the host variable declaration
value cannot be converted.
to conform to the required type/length specification.
Explanation: An error occurred when converting a
Try again.
string value returned by the application server to the
application requester. The string value cannot be
-325
This preprocessor does not support the
assigned to a host variable that does not have an
SQL statement.
indicator variable within a SELECT statement of an
application program. The value is incompatible with
Explanation: The SQL statement used is only
the host variable because of a mismatch in data
supported by the Assembler preprocessor of the
representation. The FETCH or SELECT statement is not
database manager. The SQL statement was probably of
executed. No data is returned.
the Extended Dynamic type.
SQLSTATE 22021.
SQLSTATE Spaces.
System Action: Processing of the SQL statement has
System Action: Processing continues, but a new
ended.
package will not be produced. If the package existed
previously, it will be restored.
User Response: None.
277
string to be too large for the target.
-332
A source string with a CCSID of
source-ccsid cannot be assigned to its
SQLSTATE 22524.
target with a CCSID of target-ccsid
System Action: Processing of the statement ends.
because of incompatible CCSIDs.
Reason Code= reason-code.
User Response: Correct the statement or increase the
length of the EBCDIC target and try again.
Explanation: No conversion supported for the
specified pair of CCSIDs. The reason codes for this
message are:
-401
Incompatible data types were in an
v
1 - Conversion of the input statement.
expression or compare operation.
v
2 - Conversion of the data, which is either a constant
Explanation: The expression or compare operation
or a host variable.
violated one of the following rules:
v
3 - Conversion of internal data during a
v An arithmetic expression which does not involve
column-to-column move.
datetime data types can only have operands with
v
4 - Conversion of internal data during a
numeric data types.
column-to-column compare.
v A datetime arithmetic expression cannot contain
v
5 - Conversion of internal data during a scalar
elements with graphic data types.
function computation.
v Comparison operations can only be performed on
v
6 - Conversion of internal data during datetime
compatible data types. The data types must both be
arithmetic with a character operand.
numeric, character, graphic, date, time, or timestamp,
or one must be a datetime data type and the other a
v
7 - Conversion of output data to host variable.
character data type.
v
9 - Invalid source, or target CCSID of zero. This will
occur if graphic or mixed data is used when the
SQLSTATE 42818.
CCSIDMIXED or CCSIDGRAPHIC value is set to
zero for the application server or the application
System Action: Processing of the SQL statement has
requester. It will also occur if an input or output
ended.
SQLDA is used to override the CCSID value, and
User Response: Correct the statement. Try again.
this override CCSID value is zero. The CCSID values
are set using the CHARNAME parameter. See the
DB2 Server for VSE System Administration manual for
-402
You cannot use nonnumeric data in the
details.
AVG or SUM column functions or as
v
10 - Invalid source, or target CCSID of zero. This will
part of an arithmetic operation.
occur when a character column was created previous
Explanation: One of the following has occurred:
to SQL/DS Version 3 Release 3 with the FOR MIXED
v Character or DBCS data was specified as the
DATA clause and the MCCSIDMIXED value in
argument for AVG or SUM column functions such as
SYSTEM.SYSOPTIONS is zero (or does not exist), or
AVG(CHARCOL) where CHARCOL is a column of
a graphic column was created previous to SQL/DS
CHAR data type.
Version 3 Release 3 and the MCCSIDGRAPHIC value
in SYSTEM.SYSOPTIONS is zero (or does not exist).
Refer to the DB2 Server for VSE & VM SQL Reference
See the DB2 Server for VSE System Administration
manual for a complete list and description of column
manual for information on how to insert or update
and scalar functions.
the MCCSIDMIXED and MCCSIDGRAPHIC rows.
v Character or DBCS data was used in an arithmetic
expression such -CHARCOL or CHARCOL+5 where
SQLSTATE 57017.
CHARCOL is defined as in the first example.
Numeric data (INTEGER, SMALLINT, DECIMAL, or
System Action: Processing of the SQL statement has
FLOAT) may only be used in non-datetime
ended.
arithmetic operations.
User Response: Either correct the statement so that it
v The SQL statement contains an arithmetic expression
does not move or compare data between incompatible
with the special register USER. For example, USER +
CCSIDs, or add support for the specified conversion.
100 is not permitted.
-334
An ASCII Mixed string could not be
SQLSTATE 42819.
converted because it would exceed the
System Action: Processing of the SQL statement has
length attribute of its EBCDIC target.
ended.
Explanation: The insertion of shift-out (X’0E’) and
User Response: Correct the statement. Try again.
shift-in (X’0F’) characters to indicate the DBCS portion
of a mixed string in EBCDIC has caused the converted
278
Messages and Codes
-404
A character string specified in an
-408
An UPDATE or INSERT of a data value
INSERT or UPDATE statement is too
is incompatible with the data type of
large for the target column.
the associated target column.
Explanation: A character string in the data items-list
Explanation: A source value was incompatible with
of an INSERT statement or one of the character strings
the associated target column. This can happen when
in the SET clause of an UPDATE statement is longer
the source value:
than the associated target column in the database.
v Was derived from a subquery used in an UPDATE or
INSERT statement.
SQLSTATE 22001.
v Was derived from a VALUES clause in an INSERT
System Action: Processing of the SQL statement has
statement.
ended.
User Response: Correct the statement. Try again.
Typical cases are:
v The source value has a numeric data type, and the
target column has a character, DBCS, or datetime
-405
The numeric value, value, is not within
data type.
the range of the data type.
v The source value has a character data type, and the
Explanation: A numeric value specified in the
target column has a numeric or DBCS data type.
statement exceeds the value allowed for the associated
v The source value has a DBCS data type, and the
target column in the database. Following are the
target column has a numeric, character, or datetime
limitations:
data type.
v SMALLINT: -32768 to +32767
v The source value has a character data type that is too
v INTEGER: -2147483648 to +2147483647
short for the target datetime column.
v FLOAT: -7.2E75 to -5.4E-79, 0, +5.4E-79 to +7.2E75
v The source value has a datetime data type, and the
v DECIMAL: precision larger than that of the target
target column has a numeric, DBCS, or different
column.
datetime data type.
SQLSTATE 42820.
SQLSTATE 42821.
System Action: Processing of the SQL statement has
System Action: Processing of the SQL statement has
ended.
ended.
User Response: Correct the statement. Try again.
User Response: Correct the statement. Try again.
-407
Either an UPDATE statement or an
-409
An incorrect specification was used with
INSERT statement with a null value for
the column function COUNT. Only * or
a column defined as NOT NULL is not
DISTINCT with a column name is
allowed, or a null host variable value is
allowed.
not allowed in a SELECT list.
Explanation: The column function COUNT may only
Explanation: An attempt was made to update a
be used with * or with the keyword DISTINCT and a
column with a null value and the column does not
column name. Examples of its use are: COUNT(*) or
allow nulls. The null value may be from a constant
COUNT (DISTINCT PARTNO), where PARTNO is a
value, host variable, an expression, or from a value
column name.
returned on a subquery.
Refer to the DB2 Server for VSE & VM SQL Reference
This SQLCODE will also be issued if you made an
manual for a complete list and description of column
attempt to SELECT a host variable in a select-list, and
and scalar functions.
the select-list had an indicator variable value of <0,
SQLSTATE 42607.
indicating a NULL host variable value. A NULL host
variable value is not allowed in a select-list. For more
System Action: Processing of the SQL statement has
information about host indicator variables definition,
ended.
refer to the DB2 Server for VSE & VM Application
Programming manual.
User Response: Correct the statement. Try again.
SQLSTATE 23502.
-412
You cannot specify more than one item
System Action: Processing of the SQL statement has
in the SELECT clause of a subquery.
ended.
Explanation: A subquery may only contain one item
User Response: Correct the statement. Try again.
in its SELECT clause. For example, the following
subquery is incorrect:
279
SELECT * FROM EMP_ACT
Note the following default data types for literal
WHERE EMPNO IN
constants in a SELECT list:
(SELECT EMPNO, JOB FROM EMPLOYEE
v Alphanumeric literal constant: default data type is
WHERE WORKDEPT = ’E11’)
varying character
v All numeric literal constant (no E or decimal point):
SQLSTATE 42823.
default data type is integer.
System Action: Processing of the SQL statement has
ended.
SQLSTATE 42825.
User Response: Correct the statement. Try again.
System Action: Processing of the SQL statement has
ended.
-413
An overflow occurred while the
User Response: Correct the statement. Try again.
database manager was converting a data
type internally.
-416
You cannot specify a long string column
Explanation: A data value being converted by the
in the SELECT clause of a UNION.
database manager is too large for the data type to
which it is being converted. For example, large floating
Explanation: The SQL statement contained a SELECT
point numbers will not convert to integers. This
clause item whose data type is a long string. This is not
overflow is possible when using DECIMAL and
valid.
INTEGER scalar functions.
A long string column is either a LONG VARCHAR,
SQLSTATE 22003.
LONG VARGRAPHIC, VARCHAR(n) where n is
greater than 254 but less than or equal to 32767, or
System Action: Processing of the SQL statement has
VARGRAPHIC(n) where n is greater than 127 but less
ended.
than or equal to 16383.
User Response: Correct the statement. Try again.
SQLSTATE 42907.
System Action: Processing of the SQL statement has
-414
The LIKE predicate was used for a
ended.
numeric or date/time column type. LIKE
must only be used with graphic or
User Response: Correct the statement. Try again.
character columns.
Explanation: The SQL statement uses LIKE against a
-417
Not all the operands of an arithmetic
numeric or datetime column. It can only be used
operator or predicate can be parameter
against columns that have a data type that is
markers.
compatible with the graphic data type or that have
Explanation: The SQL PREPARE command contains
character data type.
an arithmetic operator or predicate with parameter
SQLSTATE 42824.
markers used for all the operands. At least one of the
operands must not be a parameter marker. Thus, the
System Action: Processing of the SQL statement has
following are invalid:
ended.
?+?
?<?
User Response: Correct the statement. Try again.
? BETWEEN ? AND ?
? IN (?,?,?)
-415
The corresponding columns,
column-number, of the operands of a
SQLSTATE 42609.
UNION or a UNION ALL do not have
comparable column descriptions.
System Action: Processing of the SQL statement has
ended.
Explanation: The SQL statement contains SELECT
clauses connected by a UNION or UNION ALL, and
User Response: Correct the statement. Try again.
the corresponding columns in each SELECT clause
cannot be compared. Specifically, columns of ordinality
-418
You cannot specify a parameter marker
column-number of the operands in this UNION or
in the SELECT clause of a SELECT
UNION ALL cannot be compared. For columns to be
statement.
comparable, corresponding columns must be numeric,
character, graphic, date, time, or timestamp. Do not mix
Explanation: The SQL PREPARE statement contains a
these data types. If corresponding columns have field
parameter in its SELECT clause.
procedures, both must have the same field procedure
SQLSTATE 42610.
and the same column CCSID value.
280
Messages and Codes
System Action: Processing of the SQL statement has
-424
You specified an invalid sign digit in a
ended.
decimal number.
User Response: Correct the statement. Try again.
Explanation: Decimal numbers are stored with the
sign indicator in the lower half byte of the final byte.
-419
The precision of the numerator and/or
For example, +300 is stored as 300C. 300 is the digit
the scale of the denominator are too
and the C is the sign digit. The sign digit can be from
large for decimal division.
hexadecimal A to hexadecimal F. The digit must be in
the range from hexadecimal 0 to hexadecimal 9.
Explanation: The internal formula used to calculate
SQLCODE -424 is issued if the decimal data passed to
the resulting scale of decimal division is:
the database manager has an invalid sign or digit.
Scale of result = 31 - np + ns - ds
For zoned decimal or numeric data, SQLCODE -424
where np = precision of numerator,
indicates that at least one digit contains invalid zone
ns = scale of numerator,
bits or numeric bits.
ds = scale of denominator.
SQLSTATE 22502.
A negative resulting scale will cause incorrect results
System Action: Processing of the SQL statement ends.
because of internal decimal constraints. This may also
User Response: Correct the data to have a valid sign
happen when using the AVG() function.
and decimal digit. Try again.
SQLSTATE 42911.
-425
The final result of a SUM is too large
System Action: Processing of the SQL statement has
for the associated target column.
ended.
Explanation: The database manager encountered a
User Response: Correct the statement. Try again.
query similar to this:
-422
The operands of a UNION or UNION
SELECT SUM(column1) FROM table1
ALL do not have the same number of
columns.
To process the sum, the database manager maintains an
internal accumulator. This SQLCODE is issued when
Explanation: The operands of a UNION or UNION
the value in the internal accumulator is greater than the
ALL must have the same number of columns.
final result value can be. For example, accumulating the
SQLSTATE 42826.
sum of an integer column is done in a double word
accumulator but the result can only be the length of a
System Action: Processing of the SQL statement ends.
single word.
User Response: Correct the SQL statement by putting
the same number of columns in each operand.
SQLSTATE 22003.
System Action: Processing of the SQL statement has
-423
Invalid result set locator value.
ended.
Explanation: The value specified in a result set locator
User Response: If you need to work with the data
host variable does not identify a valid result set locator.
values involved, break the calculation down into
smaller segments, so you do not exceed the capacity of
SQLSTATE: 0F001.
the final result field.
System Action: Processing of the SQL statement has
ended.
-440
FORMAT 1
User Response: There are two common causes for this
The number of parameters in the
error:
parameter list does not match the
number of parameters expected for
v The host variable used as a result set locator was
stored procedure proc-name.
never assigned a valid result set locator value. Result
n parameters were expected.
set locator values are returned by the DESCRIBE
FORMAT 2
PROCEDURE and ALLOCATE LOCATOR
The number of parameters in the
statements. Make sure the value in your host
parameter list does not match the
variable is obtained from one of these statements.
number of parameters expected for
v Result set locator values are only valid as long as the
stored procedure proc-name,
underlying SQL cursor is open. If a commit or
AUTHID authid. n parameters
rollback operation closes an SQL cursor, the result set
were expected.
locator associated with the cursor is no longer valid.
281
Explanation: The database manager received an SQL
System Action: Processing of the SQL statement has
CALL statement for a stored procedure. The number of
ended.
parameters supplied on the CALL statement does not
User Response: If the LOADMOD value in
match the number of parameters defined in
SYSTEM.SYSROUTINES is specified incorrectly, do the
SYSTEM.SYSPARMS.
following:
proc-name
1. Issue the STOP PROC operator command with the
is the name of the stored procedure from the
REJECT option to disallow access to the procedure
PROCEDURE field in SYSTEM.SYSROUTINES
2. Use the ALTER PROCEDURE command to correct
the value
authid is the authorization id from the AUTHID field
3. Issue the START PROC operator command to allow
in SYSTEM.SYSROUTINES
access to the procedure
n
is the expected number of parameters for the
stored procedure with the NAME and
If the LOADMOD value is correct, ensure that the load
AUTHID described above.
module or phase exists and can be accessed by the
stored procedure server.
SQLSTATE: 42884
System Action: The statement cannot be executed.
-449
CREATE PROCEDURE for name
contains an invalid format of the
User Response: If the SQL CALL statement is coded
external name clause or is missing the
incorrectly, modify the SQL application to provide the
external name clause.
correct number of parameters on the SQL CALL
statement.
Explanation: An error was found in the EXTERNAL
NAME clause of the CREATE PROCEDURE statement
If SYSTEM.SYSPARMS contains incorrect information,
for name, or the clause is needed but was not specified.
you must redefine the stored procedure. You must do
the following:
The external name must be a short identifier with
1. Use the STOP PROC operator command with the
letters or digits. A possible cause for this error is the
REJECT option to to disallow access to the
inclusion of a blank in the name.
procedure
If the clause is omitted, the external name defaults to
2. Use the DROP PROCEDURE statement to remove
the name of the stored procedure. However, if the
the definition of the procedure
procedure name is longer than 8 characters then
3. Use the CREATE PROCEDURE statement to
EXTERNAL NAME must be explicitly specified and a
redefine the procedure
valid short identifier must be provided as the external
4. Issue the START PROC command to allow access to
name.
the procedure
SQLSTATE: 42878
-444
FORMAT 1
System Action: The statement cannot be executed.
User program load-module-name
User Response: Correct the syntax of the SQL
could not be found for stored
statement. Refer to the DB2 Server for VSE & VM SQL
procedure proc-name.
Reference manual for information on the EXTERNAL
FORMAT 2
NAME clause.
User program load-module-name
could not be found for stored
procedure proc-name,
-450
FORMAT 1
AUTHID authid.
Stored procedure proc-name,
parameter number par-number,
Explanation: DB2 received an SQL CALL statement
overlapped storage beyond its
for a stored procedure and found the row in the
declared length.
SYSTEM.SYSROUTINES catalog table associated with
FORMAT 2
the requested procedure name. However, the load
Stored procedure proc-name
module or phase load-module-name identified in the
with AUTHID authid,
LOADMOD column of the SYSTEM.SYSROUTINES
parameter number par-number,
row could not be found.
overlapped storage beyond its
load-module-name
declared length.
The name of the load module or phase that
Explanation: While returning parameters from a
was not found.
stored procedure to an application, DB2 detected an
overlay of one of the parameters. A stored procedure
SQLSTATE: 42724
overwrote storage beyond a parameter’s declared
length.
282
Messages and Codes
proc-name
3. Issue the CREATE PROCEDURE statement to
The name of the stored procedure from the
redefine the procedure with the correct parameter
PROCEDURE field in the
definition
SYSTEM.SYSROUTINES catalog table.
4. Issue the START PROC operator command to
enable access to the stored procedure
authid The authorization ID from the AUTHID
column in SYSTEM.SYSROUTINES
-470
SQL CALL statement specified a NULL
par-number
value for input parameter par-number,
The parameter position number. The
but the stored procedure does not
parameter in error is the one for which the
support NULL values.
value of the column ORDINAL in
SYSTEM.SYSPARMS matches the parameter
Explanation: DB2 received an SQL CALL statement
position number provided in the error
for a stored procedure and found a null value in the
message.
incoming parameter list. The DB2 stored procedure was
defined in the SYSTEM.SYSROUTINES catalog table
SQLSTATE: 39501
with PARAMETERSTYLE = ’ ’, which specifies that the
DB2 stored procedure does not accept null values.
System Action: The results of the stored procedure
cannot be returned.
par-number
The parameter position number. The
User Response: Examine the stored procedure to
parameter in error is the one for which the
determine the cause of the overlay. Ensure that all
value of the column ORDINAL in
parameters are declared correctly and that they match
SYSTEM.SYSPARMS matches the parameter
the corresponding definitions in SYSTEM.SYSPARMS.
position number provided in the error
message.
-469
SQL CALL statement must specify an
output host variable for parameter
SQLSTATE: 39002
par-number.
System Action: Processing of the SQL statement has
Explanation: DB2 received an SQL CALL statement
ended.
for a stored procedure. DB2 found the row in the
User Response: If the stored procedure should not
SYSTEM.SYSROUTINES catalog table with the
accept null values, change the calling application to
requested procedure name. However, parameter
provide a nonnull value.
par-number was identified in SYSTEM.SYSPARMS as an
OUT or INOUT parameter. A host variable must be
If the stored procedure should accept null values, then:
supplied on the SQL CALL statement for parameters
1. Issue the STOP PROC operator command with the
defined as OUT or INOUT.
REJECT option to disallow access to the stored
procedure
par-number
2. Use the ALTER PROCEDURE statement to change
The parameter position number. The
the value of PARAMETERSTYLE to ’N’
parameter in error is the one for which the
3. Issue the START PROC operator command to
value of the column ORDINAL in
reactivate the procedure
SYSTEM.SYSPARMS matches the parameter
position number provided in the error
message.
-471
FORMAT 1
SQL CALL for stored procedure
SQLSTATE: 42886
proc-name failed due to
reason reason-code.
System Action: Processing of the SQL statement has
FORMAT 2
ended.
SQL CALL for stored procedure
User Response: If the SQL CALL statement is coded
proc-name with AUTHID
incorrectly, modify the SQL application to provide an
authid failed due to reason
output host variable on the SQL CALL statement.
reason-code.
If the parameter is defined incorrectly, you must change
Explanation: DB2 received an SQL CALL statement
the procedure definition as follows:
for a stored procedure. The CALL statement did not
1. Issue the STOP PROC operator command to
execute successfully.
disallow access to the stored procedure
Proc-name
2. Issue the DROP PROCEDURE statement to remove
The name of the stored procedure specified on
the procedure definition
the SQL CALL statement.
Authid The authorization ID associated with the
stored procedure.
283
Reason code
-480
The procedure procedure-name has not yet
The reason for the failure.
been called.
Possible reason codes are :
Explanation: The procedure identified in a DESCRIBE
PROCEDURE or an ASSOCIATE LOCATORS statement
1
The load module or phase for the procedure
has not yet been called within the application process
was not found.
or the procedure has been called, but an explicit or
2
The procedure is STOPPED and calls to it are
implicit commit occurred before the statement.
not being accepted.
SQLSTATE: 51030
3
No stored procedure server that can be used to
System Action: Processing of the SQL statement has
run the stored procedure is available.
ended.
4
A Language Environment error occurred.
User Response: Correct the order of the statements
5
An SQL error occurred in the stored
and rerun the application.
procedure.
6
The stored procedure server terminated
-482
The procedure procedure-name returned
abnormally.
no locators.
7
The stored procedure handler was not able to
Explanation: The procedure identified in a
load the load module or phase associated with
ASSOCIATE LOCATORS statement returned no result
the stored procedure.
set locators.
8
An internal error has occurred.
SQLSTATE: 51030
System Action: Processing of the SQL statement has
SQLSTATE: 55023
ended.
System Action: Processing of the SQL statement has
User Response: Determine if result set locators are
ended. A message describing the error may be
returned from the identified procedure by using the
displayed on the VM system console.
DESCRIBE PROCEDURE statement.
User Response: Correct the condition indicated by the
reason code.
-499
Cursor cursor-name has already been
assigned to this or another result set
from procedure procedure-name.
-478
The stored procedure server pserver
cannot be dropped because group-name, a
Explanation: An attempt was made to assign a cursor
new object-type, depends on it.
to a result set using the SQL statement ALLOCATE
CURSOR. One of the following applies:
Explanation: The stored procedure server cannot be
dropped because it is the only stored procedure server
v The result set locator variable specified in the
in stored procedure group group-name, and stored
ALLOCATE CURSOR statement has been previously
procedures exist that must run in group-name.
assigned to cursor cursor-name.
v Cursor cursor-name specified in the ALLOCATE
SQLSTATE: 42893
CURSOR statement has been previously assigned to
System Action: Processing of the SQL statement ends.
a result set from stored procedure procedure-name.
User Response: Either define another stored
SQLSTATE: 24516
procedure server in the stored procedure server group
group-name, or modify the definition of any stored
System Action: Processing of the SQL statement has
procedure that can run only in group-name. To modify
ended.
the definition of a stored procedure, issue the ALTER
PROCEDURE statement and specify the SERVER
User Response: Determine if the target result set
GROUP option, as follows:
named in the ALLOCATE CURSOR statement has been
previously assigned to a cursor.
1. If a default stored procedure server group exists
and you want the stored procedure to run in it, do
If the result set has been previously assigned to cursor
not specify a stored procedure server group name
cursor-name, then either choose another target result set
on the SERVER GROUP clause.
or call stored procedure procedure-name again and
2. If you want the stored procedure to run in a
reissue the ASSOCIATE LOCATOR and ALLOCATE
different stored procedure server group, specify the
CURSOR statements.
name of that group on the SERVER GROUP clause.
If the result set has not been previously assigned to a
cursor, the cursor cursor-name specified in the
ALLOCATE CURSOR statement has been previously
284
Messages and Codes
assigned to some result set from stored procedure
v Cursor name was referenced in a positioned UPDATE
procedure-name. You cannot assign cursor cursor-name to
or DELETE statement which is not a supported
another result set, so you must specify a different
operation for an allocated cursor.
cursor name in the ALLOCATE CURSOR statement.
v Cursor name was allocated, but a CLOSE cursor
statement naming cursor name was issued and
deallocated the cursory before this cursor reference.
-501
The cursor referenced in a FETCH, PUT,
or CLOSE statement is not open.
v Cursor name was allocated, but a ROLLBACK
operator occurred and deallocated the cursor before
Explanation: The cursor referenced in a CLOSE, PUT,
this cursor reference.
or FETCH is not open now.
v Cursor name was allocated, but its associated stored
SQLSTATE 24501.
procedure was called again since the cursor was
allocated, new result sets were returned, and cursor
System Action: Processing has ended.
name was deallocated.
User Response: Correct the cause of the problem. Try
v The statement name has not been defined with a
again.
PREPARE statement.
v An attempt was made to define the statement name
-502
The cursor referenced in an OPEN or
with a PREPARE statement, but an error was
ALLOCATE CURSOR statement is
encountered on the PREPARE SQL statement.
already open.
SQLSTATEs:
Explanation: You cannot open or allocate a cursor that
is already in an open state.
34000
Cursor reference
SQLSTATE 24502.
07003
Statement reference
System Action: Processing of the SQL statement has
26505
An Extended EXECUTE, Extended DECLARE
ended.
CURSOR, or Extended PREPARE against a
NULL section.
User Response: Correct the cause of the problem. Try
again.
System Action: Processing of the SQL statement has
ended.
-503
A column used in the SET clause of an
User Response: Define the name properly. Try again.
UPDATE statement containing a
For an allocated cursor, if an implicit or explicit
WHERE CURRENT OF clause was not
COMMIT, ROLLBACK, or CLOSE occurred after the
identified in the FOR UPDATE OF
clause of the DECLARE CURSOR
cursor was successfully allocated, modify the
application program logic so that after the COMMIT,
statement.
ROLLBACK, or CLOSE operation, it calls the associated
Explanation: One or more columns named in the SET
stored procedure again, and reissue the ASSOCIATE
clause were not declared in the FOR UPDATE OF
LOCATORS and ALLOCATE CURSOR statements.
clause of the query which defined the cursor.
For an allocated cursor, if the associated stored
SQLSTATE 42912.
procedure was called again and new result sets were
returned after the cursor was allocated, reissue the
System Action: Processing of the SQL statement has
ASSOCIATE LOCATORS and ALLOCATE CURSOR
ended.
statements.
User Response: Correct the statement. Try again.
If this error was encountered while preprocessing of a
FETCH statement that references a cursor allocated by
-504
The cursor name or statement name,
a dynamic ALLOCATE CURSOR statement, the
name, has not been properly declared or
DYNALC preprocessor option must be used to allow
prepared.
the FETCH to be processed. For more information, refer
to the DB2 Server for VSE & VM Application
Explanation: One of the following has occurred:
Programming manual.
v The cursor name has not been defined with a
DECLARE CURSOR statement or allocated with an
ALLOCATE CURSOR statement.
-505
A cursor has been declared or a
statement has been prepared more than
v An attempt was made to define the cursor name
once.
with a DECLARE CURSOR statement or an
ALLOCATE CURSOR statement, but an error was
Explanation: The name used in a DECLARE CURSOR
encountered on the DECLARE CURSOR or
or PREPARE statement was incorrect. A cursor has
ALLOCATE CURSOR statement.
been declared more than once or a statement name has
285
been used in more than one PREPARE statement.
-509
An UPDATE or DELETE statement with
SQLSTATE Spaces.
a WHERE CURRENT OF clause
specifies a table for which no cursor
System Action: Processing of the SQL statement has
exists.
ended.
Explanation: A reference was made to CURRENT OF
User Response: Correct the SQL statement using a
CURSOR when a cursor is not defined on the current
different cursor or statement name. Try again.
table.
SQLSTATE 42827.
-506
More than one cursor is declared for
statement statement.
System Action: Processing of the SQL statement has
ended.
Explanation: You can only declare one cursor for
statement shown in this message.
User Response: Either correct the UPDATE or
DELETE statement by removing the WHERE
SQLSTATE Spaces.
CURRENT OF clause or declare the necessary cursor.
System Action: Preprocessing of the statement ends.
Try again.
User Response: Ensure that you have defined only
one cursor per statement in your application program.
-510
You cannot use a WHERE CURRENT
Try again.
OF clause in this UPDATE or DELETE
statement.
-507
An UPDATE or DELETE statement uses
Explanation: You can not use a DELETE WHERE
a WHERE CURRENT OF clause, but no
CURRENT OF clause if the query is not deleteable. You
cursor is open.
can not use an UPDATE WHERE CURRENT OF clause
if the query is not updateable.
Explanation: A reference to CURRENT OF CURSOR
1. The following are cases of nondeleteable queries:
was made but cursor was not opened.
v Multiple tables are involved.
Note: If blocking is used on the cursor, you may get a
v You can not use DISTINCT, GROUP BY, ORDER
-507 even though you may not have explicitly
BY, UNION, or a column function.
closed the cursor in DRDA protocol. This is
v Subqueries cannot reference the same table.
because the application server has implicitly
v Isolation level UR is used.
closed the cursor.
|
v This is a read-only cursor since it has been
|
preprocessed with the FOR FETCH ONLY clause
SQLSTATE 24501.
|
or the FOR READ ONLY clause in the SELECT
System Action: Processing of the SQL statement has
|
statement.
ended.
2. The following are cases of nonupdateable queries:
User Response: Ensure the cursor defined on the
v Multiple tables are involved.
SELECT statement is OPENED.
v You can not use DISTINCT, GROUP BY, ORDER
BY, UNION, or a column function.
-508
An UPDATE or DELETE statement uses
v Subqueries cannot reference the same table.
a WHERE CURRENT OF clause, but the
v The FOR UPDATE OF clause must specify the
cursor is not properly positioned on a
column to be updated in the UPDATE statement.
row.
|
v This is a read-only cursor since it has been
Explanation: A reference to a CURRENT OF CURSOR
|
preprocessed with the FOR FETCH ONLY clause
was made when the cursor was not positioned on a
|
or the FOR READ ONLY clause in the SELECT
row or no row has been fetched.
|
statement.
SQLSTATE 24504.
SQLSTATE 42828.
System Action: Processing of the SQL statement has
System Action: Processing of the SQL statement has
ended.
ended.
User Response: Verify that the value in the SQL
User Response: Correct the statement. Try again.
statement matches the row in the table. Try again.
286
Messages and Codes
statements; PREPARE, EXECUTE, or EXECUTE
-511
You cannot declare a cursor with a FOR
IMMEDIATE.
UPDATE OF clause that involves a
query that is not updateable.
SQLSTATEs:
Explanation: Following are some examples of queries
2D528
Dynamic COMMIT is invalid.
that are not updateable:
2D529
Dynamic ROLLBACK is invalid.
v Multiple tables are being used.
System Action: Processing of the SQL statement has
v Subqueries cannot reference the same table.
ended.
v May not use DISTINCT, GROUP BY, ORDER BY,
UNION, or a column. function
User Response: Correct the statement. Try again.
v The NOFOR option was specified during
preprocessing and the database manager appended
-516
The current statement references a
the FOR UPDATE OF clause to the statement.
statement-name which has not been
properly prepared.
SQLSTATE 42829.
Explanation: The current statement refers to a
System Action: Processing of the SQL statement has
statement name that has not been properly prepared.
ended.
The current statement is an EXECUTE, a DESCRIBE, or
a dynamic cursor operation.
User Response: Correct the statement. Try again.
SQLSTATEs:
-512
You cannot open or close a cursor that
07003
EXECUTE
has been prepared with an SQL
26501
DESCRIBE or Dynamic cursor operation.
statement other than SELECT or
INSERT.
System Action: Processing of the statement has ended.
Explanation: An OPEN or CLOSE has been attempted
User Response: Correct the logic of the application
on a cursor that is not associated with a SELECT or
program to ensure that the referenced statement is
INSERT statement.
properly prepared prior to the current statement, and
in the same logical unit of work. Try again.
SQLSTATE 07005.
System Action: Processing of the SQL statement has
-517
The cursor name cursor-name has already
ended.
been declared for package package-name.
User Response: Correct the statement. Try again.
Explanation: The cursor name specified in a
DECLARE CURSOR statement has already been
-513
More than 512 disjoint DECLARE
declared for the named package in the current logical
CURSOR and PREPARE statements
unit of work.
have been used in the program.
SQLSTATE 3C000.
Explanation: If a PREPARE statement uses a cursor,
System Action: Processing of the SQL statement ends.
the preprocessor matches it to the appropriate
DECLARE CURSOR statement. The total number of
User Response: Two cursors of identical names cannot
such pairs plus any unmatched DECLARE CURSOR
be declared in the same logical unit of work. Move this
and PREPARE statements cannot exceed 512.
statement outside the current logical unit of work, or
end the current logical unit of work with a COMMIT or
SQLSTATE Spaces.
ROLLBACK command before executing this statement.
System Action: Processing of this SQL statement has
Correct the error and rerun the program.
ended.
User Response: Rewrite the program to contain fewer
-518
The application program references the
disjoint DECLARE CURSOR and PREPARE statements.
cursor cursor-name, but the cursor is not
Try again.
declared in the current logical unit of
work.
-515
You cannot use the SQL EXECUTE
Explanation: The cursor name used in an Extended
statement to perform a COMMIT or
OPEN, FETCH, PUT, or CLOSE was not declared
ROLLBACK.
(using an Extended DECLARE cursor) in the current
logical unit of work.
Explanation: The statements that control logical units
of work cannot be the object of dynamic SQL
SQLSTATE 42719.
System Action: Processing of the SQL statement ends.
287
User Response: Roll back the logical unit of work,
-521
The database manager is blocking
then correct the error. Try again.
FETCHs or PUTs. The data type or
length has changed for a host variable
-519
The database manager is blocking
whose ordinal position is position-number
INSERTs. The application has issued a
in the host variable list or descriptor
COMMIT, and there is at least one
SQLDA.
INSERT cursor which the program has
Explanation: The database manager is blocking
not yet closed.
FETCHs or PUTs. A discrepancy has been found
Explanation: The application, in which the database
concerning the use of host variables in the FETCH or
manager is blocking INSERTs, has executed a COMMIT
PUT. The reason code is in SQLERRD1. The ordinal
statement, but there is still at least one opened INSERT
position of the host variable is in SQLERRD2. The
cursor (which has been blocked) in the current logical
meaning of the SQLERRD1 codes are as follows:
unit of work that has not been closed. Note that the
152,
156
application may have run successfully on previous
The number of elements in the SQLDA or in
occasions because the database manager chose not to
the host variable list of the current statement
block because of storage limitations or was executing
does not match that of the original PUT or
the program in single user mode.
FETCH.
SQLSTATE 24505.
160
The nulls allowed setting of a host variable in
System Action: The COMMIT has not been executed
the SQLDA or host variable list for the current
and the current logical unit of work has been rolled
statement does not match that of its
back.
counterpart in the original FETCH or PUT for
the cursor. SQLERRD2 contains the ordinal
User Response: Modify the program to ensure that all
position of the incorrect host variable.
OPEN cursors have a corresponding CLOSE for the
same cursor. Also ensure that all opened cursors will be
164
The length of a host variable in the SQLDA or
closed prior to executing a COMMIT statement. After
host variable list does not match the length of
these two conditions are met, preprocess, compile, and
its counterpart in the first FETCH or PUT of
execute the program again.
this cursor. SQLERRD2 is the ordinal number
of the incorrect host variable.
-520
The database manager is blocking
168
The data type of a host variable in the SQLDA
FETCHs for cursor cursor-name.
or host variable list implies that nulls are
Therefore, a DELETE... WHERE
allowed but no indicator variable is supplied.
CURRENT OF CURSOR statement
SQLERRD2 is the ordinal position of the
cannot be executed against that cursor.
incorrect host variable.
Explanation: Because the database manager is
172
The length associated with a host variable is
blocking FETCHs for the mentioned cursor, any
negative or zero. SQLERRD2 is the ordinal
dynamic or extended dynamic PREPAREs, or
position of the incorrect host variable.
EXECUTE IMMEDIATEs of DELETE... WHERE
This reason code can also be generated by a
CURRENT OF CURSOR statements against that cursor
NUMERIC or DECIMAL type with a length
are considered errors and will not be executed.
greater than 31.
SQLSTATE 42828.
176
The data type of a host variable in the SQLDA
System Action: Processing of the PREPARE or
or host variable list does not match its
EXECUTE IMMEDIATE statement is terminated.
counterpart in the original PUT or FETCH
statement for this cursor. SQLERRD2 is the
User Response: Blocking applications cannot use
ordinal position of the incorrect host variable.
DELETE... WHERE CURRENT OF CURSOR statements
in conjunction with SELECT cursors that are qualified
180
The SQLDATA or SQLIND pointer to a host
for blocking. Such DELETE statements should be
variable is zero. SQLERRD2 is the ordinal
removed from blocking applications. If the application
position of the incorrect host variable.
continues execution after receiving this SQLCODE, any
subsequent EXECUTEs, which are dependent upon the
Note: This error can also occur when the
PREPARE of the DELETE, also will not be executed
database manager is not blocking
successfully by the database manager.
FETCHs or PUTs.
SQLSTATE 55021.
System Action: Processing of the PUT or FETCH
statement is terminated.
288
Messages and Codes
For PUTs, the inserted data is not included in the block
number of open cursors in the current logical unit of
buffer.
work and the nature of the SQL SELECT statements
associated with those cursors and contact your
For FETCHs, the row is not returned to the application
database administrator. The database administrator
and is skipped as part of the output answer set. The
may have to change the DB2 Server for VSE
next FETCH of the cursor would return the next row, if
initialization parameter NCSCANS, or the application
there is one, of the answer set.
may need more SQL COMMIT statements to reduce the
User Response: Check the application. If the host
number of opened scans in a logical unit of work.
variable associated with an ordinal position in the host
variable list or DESCRIPTOR SQLDA changes, make
-523
Section section-number of package
sure its data type and length are identical to the host
package-name was not created as the
variable in that position for the previous FETCH or
result of executing the NULL form of an
PUT. Also check that the code does not alter the data
extended dynamic PREPARE or of
type or length of elements in the DESCRIPTOR SQLDA
preprocessing a dynamic PREPARE
from on FETCH or PUT to the next. The data types and
statement.
lengths may be altered after the subject cursor is closed,
but once the cursor is opened, each ordinal position is
Explanation: The user’s application is executing a
bound to the data types and lengths specified on the
dynamic PREPARE or the FOR form of an Extended
first FETCH or PUT after the OPEN.
Dynamic PREPARE for the package named
package-name. The database manager does not allow
You may wish to continue processing even though the
such execution because the section number
row of information was not included in the input or
section-number was not created by the execution of
output set. Or you may issue a ROLLBACK and
either the NULL form of an Extended Dynamic
terminate the program, make the correction, and then
PREPARE, or the previous preprocessing of a dynamic
preprocess, compile, link edit, and run the application
PREPARE statement.
again.
SQLSTATE 54015.
-522
NCSCANS, the initialization parameter
System Action: Processing of the SQL statement has
that defines the number of cursors
ended.
which you may open concurrently in a
User Response: The program and the package are
logical unit of work, has been exceeded.
probably out of synchronization. Preprocess the
Explanation: The current logical unit of work in the
program again; then compile and link-edit the program
user application has too many cursors opened
to ensure that the package matches the application. If
concurrently. Each opened cursor usually corresponds
you are executing the FOR form of the Extended
to one internal scan, but when joins and subqueries are
Dynamic PREPARE, make sure that the statement-id
used, the database manager implicitly opens its own
specified was generated using the NULL form of the
cursors. As a guideline, the database manager will open
Extended Dynamic PREPARE.
as many cursors as there are subqueries or tables joined
in an SQL SELECT statement (or DECLARE CURSOR
-524
You used an ORDER BY clause in a
SELECT statement). Additional cursors may be opened,
query with no cursor.
however, if the access path chosen requires sorts for
ordering. The database manager also implicitly uses
Explanation: The system assumes that a statement
internal cursors to execute Searched DELETE, Searched
involving an ORDER BY clause will refer to more than
INSERT via SELECT statement, Searched UPDATE, and
one row. Therefore, queries using an ORDER BY clause
CREATE INDEX statements and to access its catalog
should use a cursor.
and packages.
SQLSTATE 42601.
One of the following limitations occurred for the
System Action: Processing of the SQL statement has
current logical unit of work:
ended.
v The storage reserved for scans made by the
NCSCANS DB2 Server for VSE initialization
User Response: Remove the ORDER BY clause, or
parameter is exceeded, or
define a cursor. Try again.
v The number of concurrently opened scans exceeded
255. 255 is the maximum allowed for an DB2 Server
-525
Section section-number of package
for VSE user.
package-name cannot be executed because
of an error that was detected at
SQLSTATE 54014.
preprocessing time.
System Action: Processing of the SQL statement has
Explanation: At preprocessing time, the ERROR
ended.
parameter was specified, and the package was stored in
User Response: Acquire information about the
the database with incorrect sections. At execution time,
289
an attempt was made to execute the section that
System Action: Processing of the SQL statement has
contained the error.
ended.
SQLSTATE 51015.
User Response: Correct the statement. Try again.
System Action: Execution of the statement has ended.
-535
Invalid UPDATE WHERE CURRENT
User Response: Correct the statement. Preprocess,
OF clause.
compile, link edit, and run the program again.
Explanation: The UPDATE WHERE CURRENT OF
clause cannot be used when the column to be updated
-530
The INSERT or UPDATE value of a
is part of a PRIMARY KEY column.
foreign key constraint-name owned by
owner is invalid.
SQLSTATE 42913.
Explanation: There is an attempted violation of the
System Action: Processing of the SQL statement has
referential constraint owner.foreign-key during the
ended.
execution of an insert or update operation on a
User Response: Correct the statement. Try again.
dependent table. The value is invalid because it does
not also appear as a value of the PRIMARY KEY of the
parent table of the relationship.
-536
The DELETE or UPDATE statement is
invalid because table owner.table-name
SQLSTATE 23503.
can be affected by the operation.
System Action: Processing of the SQL statement has
Explanation: The DELETE or UPDATE statement is
ended.
invalid because the indicated table is referenced in a
User Response: Correct the statement. Try again.
subquery of the statement. The indicated table is either:
v A dependent of the object table in a relationship with
a delete rule of SET NULL or CASCADE, or
-532
The DELETE or UPDATE operation is
prevented by a rule of RESTRICT
v A dependent of another table, call it T, in a
associated with the foreign key
relationship with a delete rule of SET NULL or
constraint-name owned by owner.
CASCADE, and table T is delete-connected to the
object table.
Explanation: There is an attempted violation of the
referential constraint owner.constraint-name during the
SQLSTATE 42914.
execution of a DELETE or UPDATE operation on a
parent table. A row in the table cannot be deleted or
System Action: Processing of the SQL statement has
updated because of either of the following:
ended.
v It has a dependent relationship with a rule of
User Response: Correct the statement. Try again.
RESTRICT, or
v Its deletion deletes a row of another table that has a
-537
The key-type identifies column
dependent in a relationship with a delete rule of
column-name more than once.
RESTRICT.
Explanation: The indicated column-name appears
SQLSTATE 23504.
more than once in a key. Key-type could be PRIMARY
KEY, FOREIGN KEY, or UNIQUE CONSTRAINT.
System Action: Processing of the SQL statement has
ended.
SQLSTATE 42709.
User Response: Examine the constraint rule for all
System Action: Processing of the SQL statement has
descendent tables to determine the cause of the
ended.
problem. The specific tables involved can be
User Response: Correct the statement. Try again.
determined from the relationship constraint-name.
-538
Foreign key constraint-name does not
-534
Invalid multiple row update.
conform to the description of the
Explanation: An UPDATE statement cannot be
primary key of table owner.table-name.
processed because the table is in a nonrecoverable
Explanation: The definition of the indicated FOREIGN
storage pool and a PRIMARY KEY column is an object
KEY does not conform to the description of the
of the SET clause, and more than one row is selected
PRIMARY KEY of the indicated table. Either the keys
for updating.
do not have the same number of columns, or the
SQLSTATE 21502.
description of the corresponding columns of the
FOREIGN KEY is not identical to the PRIMARY KEY.
290
Messages and Codes
The requirement for identical descriptions includes data
-551
User user-id does not have the privilege
type, field procedure, and length, but not the null
to perform action on object-name.
attributes. If a field procedure is defined for the
corresponding columns, their column CCSID values
Explanation: An attempt was made to reference an
must be identical. The name is the FOREIGN KEY
object that the user is not authorized to use, or the SQL
name specified in the FOREIGN KEY clause or, if a
statement needs specific authority that the user does
constraint-name was not specified, the generated name.
not have (for example, RUN authority). This can occur
if a user with DBA authority preprocesses a program
SQLSTATE 42830.
but because of the nature of the SQL statements in the
System Action: Processing of the SQL statement has
program, the DBA does not have the authority to grant
ended.
RUN authority to another user. Refer to the DB2 Server
for VSE & VM Application Programming manual for
User Response: Correct the statement. Try again.
information on defining privileges on packages.
This error might also occur if the object is a read-only
-539
Table owner.table-name does not have a
view (for GRANT DELETE/INSERT/UPDATE).
primary key.
When this SQLCODE results from GRANT ALL, the
Explanation: The indicated table, which is specified as
grantor has no privilege on the object table/view upon
a parent in a FOREIGN KEY clause, cannot be defined
which he/she can grant privileges.
as a parent because it does not have a PRIMARY KEY.
No error message is issued for GRANT ALL on a view
SQLSTATE 42888.
if the grantor has at least one grant privilege on the
System Action: Processing of the SQL statement has
view.
ended.
No error message are issued for GRANT ALL on a
User Response: Correct the statement. Try again.
table if the grantor has less than all possible privileges
on the table as long as he/she has at least one
privilege.
-542
column-name cannot be a column of a
key-type because it can contain NULL
This code is returned either when, a statement is being
values.
executed, or a program is being preprocessed with the
EXIST option.
Explanation: A column identified in a key is defined
to allow null values. Key-type can be a PRIMARY KEY
Formats of this code include:
or UNIQUE CONSTRAINT. You cannot allow null
Format 1:
values in a PRIMARY KEY or UNIQUE CONSTRAINT
v User &1. does not have the privilege to perform &2.
column.
on &3..
SQLSTATE 42831.
Format 2
System Action: Processing of the SQL statement has
ended.
v User &1. does not have the &2. privilege to affect
keys on &3..&4..
User Response: Correct the statement. Try again.
Format 3
-550
You cannot create or acquire the
v User &1. does not have the privilege to perform &2..
object-type. The owner SYSTEM is
reserved for internal use.
SQLSTATE 42501.
Explanation: The owner SYSTEM is reserved for
System Action: Processing of the SQL statement has
internal use and therefore cannot be used as specified.
ended.
SQLSTATE 42939.
User Response: Check that the user ID, owner, and
object name are correct and acquire the required
System Action: Processing of the SQL statement has
authorization for the object.
ended.
User Response: Change owner to a valid name. Try
-552
userid is not authorized to action.
again.
Explanation:
Format 2:
v User ID is not authorized to CREATE a package for
another user.
291
Format 3:
System Action: Processing of the SQL statement has
ended.
v User ID is not authorized to unload a package.
User Response: Correct the statement. Try again.
Format 4:
v User ID is not authorized to reload a package.
-555
You cannot revoke an authority or a
privilege from yourself.
Format 5:
Explanation: The authorization subsystem does not
v User ID is not authorized to revoke special
allow you to revoke your own authority or privilege.
privileges.
SQLSTATE 42502.
Format 6
System Action: Processing of the SQL statement has
v User ID is not authorized to insert or delete rows
ended.
from the system catalog.
User Response: Correct the statement. Try again.
Format 7
v User ID is not authorized to drop the catalog table
-556
An attempt to revoke a privilege from
SYSDBSPACES.
revokee was denied. Either revokee does
not have this privilege, or revoker does
Format 8
not have the authority to revoke this
privilege.
v User ID is not authorized to alter the catalog table
action.
Explanation: The authorization subsystem neither
allows you to revoke a privilege which has not been
Format 9
granted nor to exceed your authority.
v User ID is not authorized to grant an authority.
SQLSTATEs:
Format 10
42502
Revoker does not have authority.
v User ID is not authorized to revoke an authority.
42504
Revokee does not have privilege.
System Action: Processing of the SQL statement has
Format 11
ended.
v User ID is not authorized to REBIND a package for
another user.
User Response: Correct the statement. Try again.
This code is returned when either a statement is being
-557
You cannot grant or revoke this
executed, or a program is being preprocessed with the
combination of privileges.
EXIST option.
Explanation: User granted a privilege which conflicted
SQLSTATEs:
with the granting of another privilege in the same
statement.
Spaces action is to unload or reload a package
SQLSTATE 42852.
42502
action is anything else
System Action: Processing of the SQL statement has
System Action: Processing of the SQL statement has
ended.
ended.
User Response: Refer to the "Statements" section in
User Response: Create the required object or provide
the DB2 Server for VSE & VM SQL Reference manual.
the proper name of the object. Try again.
Correct the SQL statement and resubmit it.
-554
You cannot grant a privilege to yourself.
-558
You cannot revoke an authority from
user-id because user-id has DBA
Explanation: The database manager does not allow
authority.
you to grant your own privileges or set your password
even though you have been granted CONNECT
Explanation: If user has DBA authority, only this
authority implicitly through the command "GRANT
authority can be revoked by another user with DBA
CONNECT TO ALLUSERS". You can only change your
authority. All other authority (RESOURCE, CONNECT,
password after the DBA has granted CONNECT
SCHEDULE) cannot be revoked without revoking DBA
authority to you explicitly and set your initial
authority first.
password.
SQLSTATE 42504.
SQLSTATE 42502.
292
Messages and Codes
System Action: Processing of the SQL statement has
-563
A user ID has not been established
ended.
prior to this statement.
User Response: Correct the statement. Try again.
Explanation: Every batch program must issue a
CONNECT statement with the user ID clause to
-560
A CONNECT statement contains an
establish the proper authority before any other SQL
incorrect password for user-id.
statements.
Explanation: The password you submitted to access
SQLSTATE 51007.
the database manager is incorrect for your user ID.
System Action: Processing of the SQL statement has
SQLSTATE 42505.
ended.
System Action: Processing of the SQL statement has
User Response: Use a CONNECT statement before
ended. If password encryption is currently being used
you use any other SQL statement.
(i.e., the DBNAME directory contains the PWDENC=Y
tag). SQLERRD2 is set to 1 to indicate decryption was
-564
Either the statement contains an
attempted by the server.
incorrect authorization name or
User Response: Correct the statement. Try again. If
password, or the password is missing.
password encryption is being used, the server may be
Explanation: Authorization name or password must
unable to decrypt the password successfully. Remove
begin with an alphabetic character and contain up to
the PWDENC tag from the DBNAME directory entry,
eight alphabetic or numeric characters. It cannot
or set it to N. Rebuild the DBNAME directory and try
contain embedded blanks or special characters. A user
again.
ID of SYSTEM, PUBLIC, ALLUSERS, or $TOTAL% is
not valid. This error also occurs if a password is not
-561
User user-id does not have CONNECT
supplied.
authority.
If SECTYPE=ESM, SQLERRD1 provides extra
Explanation: The specified user is not authorized to
information about error:
access the database manager because CONNECT
SQLERRD1
Meaning
authority has not been granted.
09
External Security
Or, when using CIRB or CIRA, the APPLID of the CICS
Manager - retryable error
subsystem has not been granted SCHEDULE authority.
10
External Security
Manager - non-tryable error
SQLSTATE 42505.
14
Password Expired
System Action: Processing of the SQL statement has
15
Password Invalid
ended. If you are attempting to switch databases,
16
Password Missing
17
Password Too Long
SQLWARN0 and SQLWARN6 are set to ’S’ to signal
18
Userid Missing
that a severe error has occurred.
19
Userid Invalid
User Response: See your database administrator to
20
Userid Revoked
obtain the authorization you require. If a severe error
has occurred, only a CONNECT statement will be
SQLSTATE 28000.
accepted.
System Action: Processing of the SQL statement has
ended. If password encryption is currently being used
-562
ALLUSERS is a reserved user ID.
(i.e., the DBNAME directory contains the PWDENC=Y
ALLUSERS can only be used in a
tag). SQLERRD2 is set to 1 to indicate decryption was
GRANT CONNECT statement without a
attempted by the server.
password.
User Response: Correct the statement. Try again. If
Explanation: You cannot grant DBA, SCHEDULE, or
password encryption is being used, the server may be
RESOURCE authority to the reserved user ID
unable to decrypt the password successfully. Remove
ALLUSERS. You can only grant ALLUSERS CONNECT
the PWDENC tag from the DBNAME directory entry,
authority without a password.
or set it to N. Rebuild the DBNAME directory and try
again.
SQLSTATE 56034.
System Action: Processing of the SQL statement has
ended.
User Response: Correct the statement. Try again.
293
-110
ARIXI06 Index already exists.
-565
Package package-name1 was specified but
another package, package-name2, is the
-110
ARIXI08 Name already exists as a
subject of the current logical unit of
table.
work. You must end the logical unit of
-120
ARIXI07 Name already exists for this
work before changing packages.
user as a table.
Explanation: You established a package as the target
-130
ARIXI09 View name already exists for
of all activity in the current logical unit of work. The
this user.
package in the SQL statement now being processed is
not the same as the target for the logical unit of work.
-130
ARIXI08 Name already exists for this
user as a synonym.
SQLSTATE 56042.
-140
ARIXI01 DBSPACE already exists.
System Action: Processing of the SQL statement has
ended.
-140
ARIXI07 Name already exists for this
user as a synonym.
User Response: Roll back the logical unit of work and
correct the error that is giving the incorrect package.
-150
ARIXI09 Name already exists for this
Try again.
user as a synonym.
SQLSTATE 42710.
-566
User ID user-id does not have
authorization to modify package
System Action: Processing of the SQL statement has
package-name.
ended.
Explanation: Only the owner or a user who has DBA
User Response: Correct the statement. Try again.
authority can modify a package.
SQLSTATE 42501.
-602
You can neither create nor alter a table
or a view to establish more than 255
System Action: Processing of the SQL statement has
columns.
ended.
Explanation: The maximum number of columns for a
User Response: Rollback the logical unit of work, and
table or view is 255. The statement contains more than
correct the error. Try again.
255 columns for the table or view.
SQLSTATE 54011.
-568
INFILE contents invalid.
System Action: Processing of the SQL statement has
Explanation: An error has been detected in the
ended.
RELOAD PACKAGE input data file. The format or
content of the input file is incorrect.
User Response: Correct the SQL statement so no more
than 255 columns will be established for table or view.
SQLSTATE Spaces.
System Action: The command is not processed. See
-603
A key-type cannot be created because the
“Common Error Action” on page 191 for more
table contains rows that are duplicates
information.
with respect to the values of the
Programmer response: Contact the system
identified columns.
programmer. The system programmer should perform
Explanation: The following are invalid:
problem determination. If a DB2 Server for VSE system
error occurred, make a record of what went wrong and
v Creating a unique index, primary key, or unique
contact the designated support group for your
constraint on columns that contain equal values.
installation.
v Reorganizing an index that contains equal values.
v Activating a primary key or unique constraint with a
-601
The name used in the CREATE
unique index that contains equal values.
statement or the ACQUIRE DBSPACE
statement already exists.
The token key-type can be UNIQUE INDEX, PRIMARY
KEY, or UNIQUE CONSTRAINT. (If a column has a
Explanation: An attempt was made to create a table,
type of VARCHAR or VARGRAPHIC, two columns
create an index, create a view, create a synonym, or
that differ only in the number of trailing blanks might
acquire a dbspace using a name that already exists.
cause duplication.)
SQLERRD1, module names, and descriptions are
shown below:
SQLSTATE 23515.
SQLERRD1
Module Name and Description
System Action: Processing of the SQL statement ends.
294
Messages and Codes
User Response: If you are creating a unique index,
User Response: Drop an index that you do not need
primary key, or unique constraint, correct the
from the table. Try again.
statement. Try again.
If you are reorganizing a unique index or activating a
-606
The COMMENT ON or LABEL ON
primary key or unique constraint, then the unique
statement failed because the specified
index or supporting unique index is marked invalid
table or column is not owned by owner.
with Duplicates Exist in UNIQUE INDEX. You can use
Explanation: An attempt was made to comment or
the SHOW INVALID operator command to display
label on a table or column which does not exist or is
invalid indexes.
not owned by the owner specified in the message text.
Either drop the index, remove the duplicates, and
SQLSTATE 42502.
recreate the index, or deactivate the primary key or
unique constraint, remove the duplicates, and activate
System Action: Processing of the SQL statement has
the primary key or unique constraint again. For more
ended.
information about invalid indexes, see the SHOW
User Response: Correct the statement. Try again.
INVALID operator command in the DB2 Server for VSE
& VM Operation manual.
-607
The CREATE TABLE statement failed
because adding a table would cause
-604
An incorrect length, precision, or scale
more than 255 tables in dbspace
was specified for a column.
owner.dbspace-name.
Explanation: You cannot create or expand the table to
Explanation: The dbspace specified in the CREATE
establish the precision, scale (decimal type), or field
TABLE statement exists, but it has 255 tables, which is
length specified because it is beyond the design limits
the maximum number of tables allowed in a dbspace.
of the column type.
v Decimal precision must be greater than or equal to 0
The number 255 includes both tables in the dbspace
and less than or equal to 31. Scale must be less than
and any internal tables created because of long fields
or equal to precision.
defined in the tables. Each table with one or more long
fields requires an internal table to be created in the
v CHAR type must have a length less than or equal to
dbspace.
254.
v FLOAT must have a length greater than 0 and less
If the dbspace specified is PUBLIC.SYSnnnn, where
than or equal to 53.
nnnn >= 0002 and nnnn <= 9999, the dbspace has 255
tables created for packages. Information about these
v GRAPHIC type must have a length less than or
tables is in catalog table SYSACCESS.
equal to 127.
v VARCHAR type must have a length less than or
SQLSTATE 54016.
equal to 32767.
System Action: Processing of the SQL statement has
v VARGRAPHIC type must have a length less than or
ended.
equal to 16383.
User Response: There are the following options:
SQLSTATE 42611.
1. Create the table in a different dbspace.
2. Drop a table in the current dbspace to free up an
System Action: Processing of the SQL statement has
entry.
ended.
3. Acquire a new dbspace for the table to be created.
User Response: Correct the statement. Try again.
This may require assistance from your database
administrator.
-605
The creation of an index failed because
Database Administrator Response: If appropriate,
you exceeded the limit for indexes on a
acquire a private dbspace for the user.
table.
Explanation: The maximum number of indexes that
-608
The CREATE TABLE statement failed
can be created for a table is 255. The target table for an
because the dbspace dbspace-name was
index already has 255 indexes. Adding an index to a
not found for the table owner.table-name.
table can occur from a CREATE INDEX statement or by
adding a PRIMARY KEY or UNIQUE CONSTRAINT to
Explanation: The dbspace specified in the CREATE
the table.
TABLE statement was not found. The search order is:
1. The database manager first searches for a dbspace
SQLSTATE 54020.
with a qualifier of dbspaceowner.dbspace-name.
System Action: Processing of the SQL statement ends.
295
2. If the dbspace owner is not specified in the
SQLSTATE 42601.
CREATE TABLE statement, then the database
System Action: Processing of the SQL statement has
manager looks for a private dbspace qualified as
ended.
owner.dbspace-name.
3. Finally, the database manager searches for a public
User Response: Correct the statement. Try again.
dbspace qualified as public.dbspace-name.
-612
The statement failed because the
SQLSTATE 42704.
column column-name was specified more
than once in the CREATE TABLE or
System Action: Processing of the SQL statement has
CREATE VIEW or CREATE INDEX, or
ended.
the column column-name specified in the
User Response: These are the options:
ALTER statement already exists in the
1. Create the table in a different dbspace.
table.
2. Acquire a new dbspace for the table to be created.
Explanation: All columns within a specific table, view
This may require assistance from your database
or index must be unique. The user tried to create a
administrator.
column with name as specified in the message, but it
already exists in the table.
Then rerun the CREATE TABLE statement.
SQLSTATE 42711.
Database Administrator Response: If appropriate,
System Action: Processing of the SQL statement has
acquire a dbspace for the user.
ended.
User Response: Correct the statement. Try again.
-609
The ALTER statement cannot be applied
to a system DBSPACE dbspace-name.
-614
You cannot create a(n) key-type1 on a
Explanation: An attempt was made to change a public
long string column or on a table where
system dbspace.
the length of the encoded key derived
v For SYS001, you tried to change the level of the
from the key-type2 column(s) is greater
lockmode to DBSPACE or PAGE.
than 255 bytes.
v For other than SYS001, you tried to change the
lockmode or freepct of the DBSPACE.
Explanation: Either:
v Creating an index, primary key or unique constraint
SQLSTATE 42832.
on a column defined as a long string is not
System Action: Processing of the SQL statement has
permitted. A long string column is either a LONG
ended.
VARCHAR, LONG VARGRAPHIC, VARCHAR(n)
where n is greater than 254 but less than or equal to
User Response: Correct the statement. Try again.
32767, or VARGRAPHIC(n) where n is greater than
127 but less than or equal to 16383.
-610
The statement failed because a user
v Creating an index, primary key or unique constraint
without DBA authority attempted to
on a table, where the encoded key created for the
create a table in a dbspace owned by
indexed columns is greater than 255 bytes, exceeds
another user or by the system.
an internal limitation of the database manager. The
maximum length for a non-unique index is 251 bytes.
Explanation: Only users with DBA authority can
create a table in another user’s dbspace or a system
SQLSTATE 54008.
dbspace.
System Action: Processing of the SQL statement has
SQLSTATE 42502.
ended.
System Action: Processing of the SQL statement has
User Response: For a multiple column key, use fewer
ended.
columns. If only one column is involved and its data
User Response: Correct the statement. Try again.
type is VARCHAR or VARGRAPHIC, the length of the
encoded value used as the key must not exceed 255. To
prevent the encoded key from exceeding the limit, the
-611
The ALTER statement failed because the
length of a VARCHAR column must be less than or
NOT NULL option was specified for the
equal to 204; the length of a VARGRAPHIC column
new column.
must be less than or equal to 102.
Explanation: The new column specified in an ALTER
TABLE statement must allow null values. The NOT
NULL option cannot be used.
296
Messages and Codes
-615
Package name owner.package-name not
-618
You cannot use the NEW option because
found in application server server-name.
the package already exists.
Explanation: The database manager did not find the
Explanation: You specified the NEW option on a
identified package in the SYSTEM.SYSACCESS catalog
CREATE PACKAGE statement to create a new package,
table for this application server.
but the named package already exists.
SQLSTATE Spaces.
SQLSTATE 42710.
System Action: The command is not processed. See
System Action: Processing of the SQL statement has
“Common Error Action” on page 191 for more
ended.
information.
User Response: Unless you used the NEW option
Programmer response: Ensure the package-name
intentionally to determine whether a package already
specified in the command is correct. If it is incorrect,
exists, roll back the logical unit of work, correct the
correct the command and reprocess it. (See “Rerunning
statement, and try again.
DBS Utility” on page 191.) If the package-name is
correct, create the package before processing it with the
-619
An error was encountered while
UNLOAD PACKAGE command, or specify the NEW
inserting data into the explain-table-name
parameter in the RELOAD PACKAGE command.
on behalf of the EXPLAIN statement.
This may be caused by using the old
-616
The RELOAD PACKAGE command
EXPLAIN tables created in a release
with the NEW option cannot be used
prior to SQL/DS Version 3 Release 4.
because the package already exists in
Explanation: Explanation tables for the EXPLAIN
server server-name.
statement may have been created improperly. Check for
Explanation: The Database Services Utility cannot
an incorrect column type, length, or nulls specification.
create a package because one with the same
If there are no errors in the explanation tables, a system
package-name already exists in this application server.
error has occurred. If this is the situation, apply the
SQLSTATE Spaces.
explanation and actions given for SQLCODE -901.
System Action: Command processing on this
SQLSTATE 55002.
application server is ended. If the TO clause was used
System Action: Processing of the SQL statement has
in command, processing continues on subsequent
ended.
application servers.
User Response: Drop and recreate the required tables
Programmer response: Correct the command by
before using EXPLAIN. You can use a supplied A-type
specifying a different package-name or the REPLACE
source member ARISEXP to create the EXPLAIN tables.
parameter. Reprocess the command for the failed cases.
See the DB2 Server for VSE & VM SQL Reference manual
(See “Rerunning DBS Utility” on page 191.)
for details about the ARISEXP source member.
-617
You cannot create a(n) key-type on more
-620
The CREATE TABLE statement failed
than 16 columns.
because user-id has no private,
Explanation: The maximum number of columns for a
recoverable dbspaces with less than 255
key-type is 16. key-type can be an INDEX, a PRIMARY
tables.
KEY, or a UNIQUE CONSTRAINT. The statement
Explanation: The dbspace name was not specified in
contains more than 16 columns for the INDEX,
the CREATE TABLE statement, so the database
PRIMARY KEY, or UNIQUE CONSTRAINT.
manager tried to find a private dbspace owned by
SQLSTATE 54008.
user-id. This message will appear under one of the
following conditions:
System Action: Processing of the SQL statement has
1. There were no private dbspaces found in the DB2
ended.
Server for VSE database for the user-id.
User Response: Correct the SQL statement so that no
2. There were one or more private dbspaces found for
more than 16 columns are established for the index,
the user-id, but each contained 255 tables.
key, or constraint.
3. The private dbspaces were located in
nonrecoverable storage pools. Only private
dbspaces that exist in recoverable storage pools will
be available when the CREATE TABLE statement
does not specify the dbspace name.
297
SQLSTATE 57022.
subsequent inserts into the table. If this message is
received while the Database Services Utility is
System Action: Processing of the SQL statement has
executing a DATALOAD or RELOAD command,
ended.
DATALOAD or RELOAD processing is discontinued.
User Response: Suggestions for the three conditions
User Response: If you received this message while
above are:
using the Database Services Utility, reissue the
For (1): Acquire a private dbspace in a recoverable
DATALOAD or RELOAD command to continue
storage pool. You may require a database
loading the table. To collect statistics for the specified
administrator’s assistance.
table, issue an UPDATE STATISTICS command for the
For (2): Drop a table in a private dbspace residing in
table.
a recoverable storage pool to free up an entry, or
take the action indicated in (1) above.
For (3): If you want to create the table in a dbspace
-623
You cannot collect statistics while
existing in a non-recoverable storage pool, then
loading table owner.table-name. Reason
specify the dbspace name on the CREATE TABLE
Code = reason-code.
command. Otherwise, take the action indicated in
Explanation: The Database Services Utility requested
(1) above.
statistics collection to begin for table owner.table-name
while the utility added rows to the table. owner is the
Then rerun the CREATE TABLE statement.
owner of the table. table-name is the name of the table.
Database Administrator Response: If appropriate,
The database manager does not support this form of
acquire a private dbspace for the user.
statistics collection for this table, as explained by the
reason code:
-621
You have attempted to use invalid index
01
The table has one or more indexes defined on
index-id in dbspace dbspace-number.
it. This form of statistics collection does not
support tables with indexes.
Explanation: A statement made by the user attempted
to use an index which has been marked invalid.
02
The ROWCOUNT column in the
SYSCATALOG entry for this table does not
SQLSTATE 51013.
have value 0 or -1, which indicates that the
System Action: Processing of the SQL statement has
table is not empty. This reason can occur only
ended.
when you have indicated that the value of
ROWCOUNT should be respected.
User Response: If you are the owner of the invalid
index then drop and recreate the index. The index-id
SQLSTATE Spaces.
can be found in the SYSINDEXES catalog table as
follows:
System Action: Statistics are not collected during
subsequent inserts into the table. If you receive this
SELECT A.DBSPACENO, B.IID, B.INAME,B.ICREATOR, A.TNAME
message while executing a Database Services Utility
FROM SYSTEM.SYSCATALOG A, SYSTEM.SYSINDEXES B
WHERE A.TNAME = B.TNAME AND A.CREATOR = B.CREATOR
DATALOAD command, the database manager
AND A.DBSPACENO = dbspace_number
generates table statistics by issuing an UPDATE
AND B.IID = index_id
STATISTICS statement after the Database Services
ORDER BY A.DBSPACENO, B.IID
;
Utility has loaded all the rows.
User Response: To use this form of statistics
Otherwise, notify your database administrator.
collection, you must first correct the indicated problem.
Database Administrator Response: Contact the owner
Alternatively, you can issue an UPDATE STATISTICS
of the invalid index and have the owner drop and
statement for the table after all rows have been loaded
recreate the index.
into it.
-622
A request to continue collecting
-624
Completion of statistics for table
statistics while loading table
owner.table-name has failed. Reason Code
owner.table-name has failed.
= reason-code.
Explanation: The Database Services Utility made a
Explanation: The Database Services Utility requested
request to continue collecting statistics while loading
the termination of statistics collection for table
table owner.table-name. This request failed because the
owner.table-name during the addition of rows to the
database manager provided statistics as input, but the
table. owner is the owner of the table. table-name is
statistics are not for the table being loaded.
the name of the table. The reason code could be either
of the following:
SQLSTATE Spaces.
01
Collected statistics did exist, but for a table
System Action: Statistics are not collected during
other than the specified table. This can occur if
298
Messages and Codes
a previous request to begin collecting statistics
KEY constraint-name was not specified, it is the
had specified a different table.
generated name.
02
No collected statistics existed for any table.
SQLSTATE 42834.
This can occur if no previous request had been
System Action: Processing of the SQL statement has
made to begin collecting statistics for a table,
ended.
or if statistics collection had begun but had
been discontinued. In the latter case, an
User Response: Correct the statement. Try again.
appropriate SQLCODE would have been
issued to inform you that statistics collection
-630
Duplicate keyword keyword.
had been discontinued.
Explanation: The SQL statement contains a duplicate
SQLSTATE Spaces.
specification for the keyword keyword.
System Action: The database manager did not modify
SQLSTATE 42614.
any table statistics. It discarded any statistics that it had
System Action: Processing of the SQL statement has
collected.
ended.
User Response: To get statistics for the specified table,
User Response: Correct the statement. Try again.
issue an UPDATE STATISTICS statement for the table.
-632
The table owner1.table-name1 cannot be
-625
A request to collect statistics while
defined as a dependent of table
loading table owner.table-name has failed.
owner2.table-name2 because of rule
Statistics collection is in progress for
restrictions. Reason Code = reason-code.
some table.
Explanation: The object table specified in the CREATE
Explanation: The Database Services Utility made a
TABLE or ALTER TABLE statement cannot be defined
request to begin collecting statistics for table
as a dependent of the indicated table because one of
owner.table-name during the addition of rows to the
the following reason codes = reason-code.
table. owner is the owner of the table. table-name is
the name of the table. This request has failed because
03
You were attempting to define the indicated
statistics are already being collected for some table (this
table as its own dependent. Self-referencing
might be the same table). The database manager does
constraints are not allowed.
not support concurrent collecting of statistics for more
06
The relationship forms a referential cycle that
than one table by a user. This error occurs only if a
delete-connects a table to itself.
previous request to begin collecting statistics did not
have a matching request to terminate the collecting of
statistics.
SQLSTATE 42915.
SQLSTATE Spaces.
System Action: Processing of the SQL statement has
ended.
System Action: Statistics are not collected during
subsequent inserts into the specified table. The statistics
User Response: Correct the statement. Try again.
that the database manager has already collected are not
affected. If this message is received while you are
-640
The clause or scalar function name is
executing a DATALOAD or RELOAD command, the
invalid because mixed and graphic data
Database Services Utility stops the DATALOAD or
are not supported on this system.
RELOAD processing.
Explanation: One of the following has occurred:
User Response: To collect statistics for the specified
v A FOR MIXED DATA clause was specified in an
table, you must first terminate the statistics collection
ALTER or CREATE TABLE statement when the
that is currently underway. If you are using the
package default mixed CCSID was zero.
Database Services Utility, reissue the DATALOAD or
RELOAD command.
v A GRAPHIC data type was specified in an ALTER or
CREATE TABLE statement when the package default
graphic CCSID was zero.
-629
SET NULL cannot be specified because
v The VARGRAPHIC scalar function was used when
foreign key constraint-name cannot
the application server default graphic CCSID,
contain null values.
CCSIDGRAPHIC, was zero.
Explanation: The SET NULL option of the indicated
SQLSTATE 56031.
FOREIGN KEY clause is invalid because no column of
the key allows null values. The constraint-name was
System Action: Processing of the SQL statement has
specified in the FOREIGN KEY clause or, if a FOREIGN
ended.
299
User Response: Specify the appropriate CCSID for the
-649
The EXPLAIN table
package, or try the statement on an application server
owner.explain-table-name was not found in
which supports mixed and graphic data.
the system catalog.
Explanation: The EXPLAIN table (owner.explain-table-
-641
You cannot reorganize a key index with
name) does not exist, so the EXPLAIN statement cannot
a DBSU REORGANIZE INDEX
be performed.
command.
SQLSTATE 42704.
Explanation: Using the DBSU REORGANIZE INDEX
command to reorganize an index that the database
System Action: Processing of the SQL statement has
manager created to enforce the uniqueness of a primary
ended, and the statement is not recorded in the
or unique key is invalid.
package.
SQLSTATE Spaces.
User Response: Create the EXPLAIN tables, and then
resubmit the application to the preprocessor. You can
System Action: The Database Services Utility ignores
use the IBM-supplied A-type source member ARISEXP
the command.
to create the EXPLAIN tables. See the DB2 Server for
VSE & VM SQL Reference manual for details about the
-644
name is a duplicate name for the same
ARISEXP source member. The explicit EXPLAIN
keytype.
versions of this SQLCODE are +204 or -204.
Explanation: name cannot be defined as a new
key-name for the same keytype because the name has
-656
Table owner.table-name already has a
already been defined on the current table.
primary key.
The duplication can occur if the specified name already
Explanation: A PRIMARY KEY cannot be defined in
exists for the same FOREIGN KEY, PRIMARY KEY, or
an ALTER TABLE statement because the indicated table
UNIQUE CONSTRAINT on the current table.
already has a PRIMARY KEY.
SQLSTATE 42710.
SQLSTATE 42889.
System Action: Processing of the SQL statement has
System Action: Processing of the SQL statement has
ended.
ended.
User Response: Specify a different name on the
User Response: Correct the statement. Try again.
statement. Try again.
-657
You cannot issue the UPDATE
-648
The foreign key cannot be defined
STATISTICS statement for a view.
because it will cause table
Explanation: An attempt was made to update
owner1.table-name1 to be delete-connected
statistics on a view rather than the base table of the
to table owner2.table-name2 through
view.
multiple paths. Reason
Code = reason-code.
SQLSTATE 42809.
Explanation: The foreign key cannot be defined
System Action: Processing of the SQL statement has
because one of the following reason codes = reason-code:
ended.
v
01 - The relationship will cause table
User Response: Correct the statement. Try again.
owner1.table-name1 to be delete-connected to table
owner2.table-name2 through multiple paths with the
same delete rule of SET NULL.
-666
The LABEL ON statement failed
because the row describing the
v
02 - The relationship will cause table
column-name column does not exist in
owner1.table-name1 to be delete-connected to table
SYSTEM.SYSCOLUMNS or
owner2.table-name2 through multiple paths with
SYSTEM.SYSCATALOG.
different delete rules.
Explanation: The row for the label column (TLABEL
SQLSTATE 42915.
or CLABEL) was not found in SYSTEM.SYSCOLUMNS.
System Action: Processing of the SQL statement has
column-name is either TLABEL or CLABEL. The
ended.
TLABEL column resides in SYSTEM.SYSCATALOG and
contains correlation names. The CLABEL column
User Response: Correct the statement. Try again.
resides in SYSTEM.SYSCOLUMNS and contains
column labels.
SQLSTATE 42703.
300
Messages and Codes
System Action: Processing of the SQL statement has
to the DB2 Server for VSE & VM Database Administration
ended.
manual.
User Response: Verify that your SQL statement is
valid. If you cannot determine the cause of the error,
-668
Table owner.table-name is inactive and
contact your system programmer.
you cannot access it.
Database Administrator Response: Use SQLERRP
Explanation: No operation can be performed on this
and SQLERRD1 in message ARI0504I to determine
table because at least one inactive key participates in a
more information about the error. Verify that the DB2
relationship with this table.
Server for VSE catalog has not been destroyed. If this is
This may be a PRIMARY KEY, a FOREIGN KEY, or a
a system error, make a record of what went wrong and
dependent FOREIGN KEY which references the
contact the designated support group for your
PRIMARY KEY.
installation.
While an inactive key exists, only the table owner and
a DBA can issue DML statements against the table. In
-667
The database manager cannot activate
addition, no one can issue DML statements against an
the key constraint-name defined for table
active table which results in a reference to an inactive
owner.table-name. Reason Code =
table in order to enforce Referential Constraints.
reason-code.
SQLSTATE 57016.
Explanation: The key-type could be PRIMARY KEY,
FOREIGN KEY, or UNIQUE CONSTRAINT. For a
System Action: Processing of the SQL statement has
PRIMARY KEY, constraint-name would be omitted. For
ended.
a FOREIGN KEY, constraint-name would be the name
User Response: Before using the indicated table you
of the first key that causes the failure. For a UNIQUE
must make sure that all the keys in which the table
CONSTRAINT, constraint-name would be omitted.
participates are active. Once the keys are active try the
The reason code could be one of the following:
statement again.
v
1 - Your attempt to activate a PRIMARY KEY or
UNIQUE CONSTRAINT has failed because the
-669
You cannot drop a key index explicitly.
PRIMARY KEY or UNIQUE CONSTRAINT contains
duplicate values.
Explanation: The database manager does not allow
you to drop a primary key index or unique constraint
You have to update or remove the erroneous rows
index explicitly with the DROP INDEX statement. A
before the PRIMARY KEY or UNIQUE
key can be a PRIMARY KEY or a UNIQUE
CONSTRAINT can be activated.
CONSTRAINT.
v
2 - Your attempt to activate a FOREIGN KEY has
failed because the FOREIGN KEY references a parent
SQLSTATE 42917.
table that has an inactive PRIMARY KEY.
System Action: Processing of the SQL statement has
You must activate the PRIMARY KEY of the parent
ended.
table before you can activate the dependent
User Response: If you want to reorganize the primary
FOREIGN KEY.
key or unique constraint index, you can drop and
v
3 - The operation failed because not every value in
recreate the unique constraint, or deactivate and
the given FOREIGN KEY can be found in the
activate the unique constraint.
PRIMARY KEY of its parent.
If you do not want to keep the unique constraint, you
You have to update or remove the erroneous rows
can use the DROP UNIQUE clause of the ALTER
before the key can be activated. The failure could
TABLE statement to remove the constraint and
occur when you attempt to activate a FOREIGN KEY,
implicitly remove its index.
or when you attempt to activate a PRIMARY KEY
which implicitly activates other FOREIGN KEYs that
reference it.
-670
You cannot create the foreign key
For more information see the DB2 Server for VSE &
constraint-name for table owner.table-name.
VM Database Administration manual.
Reason Code = reason-code.
Explanation: The reason code could be one of the
SQLSTATE 22519.
following:
System Action: Processing of the SQL statement has
1
Your attempt to create a foreign key has failed
ended. No keys were added or activated.
because the foreign key references a parent
User Response: See Explanation for the reason of
table that has an inactive primary key.
failure and recovery action. For more information, refer
2
Your attempt to create a foreign key has failed
301
because not every value in the given foreign
Reason Code Action
key can be found in the primary key of its
1
Verify whether the conversion routine
parent.
name in SYSTEM.SYSSTRINGS is
correct, and that the routine has been
For more information, refer to the DB2 Server for VSE &
set up properly according to the DB2
VM Database Administration manual.
Server for VSE System Administration
manual.
SQLSTATEs:
5, 6, or 7
Check your installation storage and
23520
Reason code = 2
other system requirements and take
22521
Reason code = 1
the appropriate action.
System Action: Processing of the SQL statement has
ended. A foreign key is not created.
-681
Column column-name is in violation of
installation defined field procedure
User Response: The next step depends on the reason
fieldproc-name Return Code=nn, Reason
code you received:
Code=cccc, Message= string.
Reason Code
Explanation: The installation field procedure
Action
fieldproc-name has returned an error for column
column-name. Use the return code nn to determine the
1
Activate the primary key of the parent table.
problem.
Then create the dependent foreign key.
The following return codes are reserved:
2
Update or remove the erroneous rows in the
parent table. Then create the dependent
4
Invalid value passed for encoding or decoding,
foreign key.
or invalid column description during field
procedure definition function.
-674
The database manager cannot load the
8
Invalid parameter value.
DBCS data conversion routine
transproc-name. Reason
12
Field procedure error on any function.
Code = reason-code(sub-code).
Use the nn and string, which the field procedure
Explanation: The DBCS data conversion routine
returned, for further information.
transproc_name cannot be loaded. The reason-code has
one of the following values:
SQLSTATE 23507.
1
The conversion routine is not available on this
System Action: Processing of the SQL statement ends.
installation.
User Response: If a field procedure did not cause the
5
Insufficient storage to set up conversion
error, determine the requirements imposed by the field
control block.
procedure; verify the data type and length of the values
6
Insufficient storage to load the conversion
to encode (return code 4), or verify the contents of the
routine.
Field Procedure Parameter Value List (return code 8). If
a field procedure caused the error, examine the field
7
Other system load error.
procedure (return code 12).
The sub-code is a one-byte hexadecimal value
represented as a hexadecimal string constant. It has one
-682
The database manager cannot load the
of the following meanings:
field procedure fieldproc-name. Reason
Code = reason-code.
X'01' - The error was discovered at the application
Explanation: The field procedure fieldproc-name
requester.
cannot be loaded. The reason code can have one of the
following values:
X'02' - The error was discovered at the application
4
The number of field procedures already
server.
loaded on this installation has reached its limit
of 16.
SQLSTATE 57011
8
The field procedure is not available on this
System Action: Processing of the SQL statement has
installation.
ended.
10
The field procedure was loaded above 16MB
User Response: Report to your system programmer.
when the DB2 Server for VSE application
Database Administrator Response:
server was running AMODE 24.
302
Messages and Codes
12
Insufficient storage.
v Specifying the CCSID integer option on column
column-name whose data type is other than CHAR,
16
Other system load error.
VARCHAR, LONG VARCHAR, GRAPHIC,
VARGRAPHIC, or LONG VARGRAPHIC.
SQLSTATE 57010.
System Action: Processing of the SQL statement has
SQLSTATE 42842.
ended. The application either commits or rolls back to
System Action: Processing of the SQL statement has
the previous COMMIT; then the application terminates.
ended.
User Response: If you get a reason code of 8 check
User Response: Correct the statement. Try again.
your application, correct it if necessary and try again. If
the application is correct and your problem persists,
contact your systems programmer. For all other reason
-684
The length of literal list beginning string
codes, contact your systems programmer immediately.
is too long.
System Programmer Response:
Explanation: The length of literal list beginning with
string, excluding insignificant blanks and delimiting
Reason Code
parentheses, is greater than 254.
Action
SQLSTATE 54012.
4
Consider replacing multiple field procedures
with a single multi-function field procedure
System Action: Processing of the SQL statement has
containing a procedure list that identifies
ended.
various functions that may be requested.
User Response: Correct the statement. Try again.
8
Verify whether the field procedure requested
should be loaded and take the appropriate
-685
Invalid field type. Column: column-name
action.
in table owner.table-name.
10
NUCXDROP the field procedure fieldproc-name.
Explanation: The field description returned by the
Ensure that the field procedure has RMODE
field procedure field-definition function is invalid. The
24. One way to ensure this is to use the CMS
data type code denotes a long string or the data type
command GENMOD with the RMODE 24
has an invalid value.
option.
SQLSTATE 58002.
If there is no longer any need for the DB2
Server for VSE application server to run
System Action: Processing of the SQL statement has
AMODE 24, (that is, all your user exits and
ended.
single-user-mode applications support 31-bit
User Response: Correct the statement. Try again.
addressing), then you can use the AMODE(31)
parameter when running SQLSTART. AMODE
31 will then become the default addressing
-686
Column defined with a field procedure
mode for the DB2 Server for VSE application
cannot be compared to another column
server, and your field procedure can be loaded
with a different field procedure.
above the 16MB line.
Explanation: The columns specified are not
12
or
16
compatible. Each column has a different field
Check your installation storage and other
procedure, or only one column has a field procedure. If
system requirements and take the appropriate
the columns have the same field procedure, their
action.
column CCSID values are different.
SQLSTATE 53043.
-683
Column type of column name
System Action: Processing of the SQL statement has
column-name is invalid for string option.
ended.
Explanation: The string option can either be
User Response: Correct the statement. Refer to the
FIELDPROC, FOR subtype DATA, or CCSID integer.
DB2 Server for VSE & VM SQL Reference manual for
The following actions are invalid:
restrictions on comparing columns defined with a field
v Specifying the FIELDPROC option on column
procedure. Try again.
column-name whose data type is other than CHAR,
VARCHAR, GRAPHIC, or VARGRAPHIC.
v Specifying the FOR subtype DATA option on column
column-name whose data type is other than CHAR,
VARCHAR, or LONG VARCHAR.
303
internal limit. The statement can be CREATE INDEX,
-687
Field types incompatible.
REORGANIZE INDEX, or searched UPDATE. These
Explanation: Comparing a column defined with a
statements mark indexes transient or invalid during
field procedure to the value of a constant or host
processing and therefore require room in the invalid
variable that has an incompatible type is invalid.
entities table.
SQLSTATE 53044.
SQLSTATE 56004.
System Action: Processing of the SQL statement has
System Action: Processing of the SQL statement has
ended.
ended.
User Response: Correct the statement. Refer to
User Response: Try the statement again later. If the
information on predicates definition in the DB2 Server
error persists then contact your database administrator.
for VSE & VM SQL Reference manual for restrictions on
Database Administrator Response: Use the SHOW
comparing columns defined with field procedures. Try
INVALID operator command to display the invalid
again.
entities table. Notify the owners of the invalid indexes
and have them drop and recreate or reorganize the
-688
Incorrect data returned from field
invalid indexes to free entries in the table.
procedure. Column = column-name. Table
If there are no invalid indexes, the error was caused by
owner.table-name. Reason Code =
too many concurrent CREATE INDEX, REORGANIZE
reason-code.
INDEX, and searched UPDATE statements. Try the
Explanation: A field procedure for column
statement again later.
column-name in table owner.table-name returned
If the problem persists, do one of the following:
unexpected data.
v Reduce the number of internal dbspaces. Refer to the
The reason code can have the following values:
DB2 Server for VSE System Administration manual for
more information.
1
Invalid data type returned from field
procedure
v Increase the size of the directory. Refer to the DB2
Server for VSE System Administration manual for more
2
Invalid precision returned from field
information.
procedure
3
String returned from field procedure is too
-699
The ACQUIRE DBSPACE statement
long
failed because all storage pools for
4
Invalid length returned from field procedure
available dbspaces are full.
5
Invalid length of storage returned by field
Explanation: Dbspaces are available, but the storage
procedure
pools in which they reside do not have enough space
for you to acquire dbspaces. The shortage can occur if
6
Invalid length of FPPVL returned by field
someone deleted all dbextents from a storage pool, and
procedure.
other storage pools do not have available dbspaces.
SQLSTATE 58002.
SQLSTATE 57037.
System Action: Processing of the SQL statement has
System Action: Processing of the SQL statement ends.
ended.
User Response: Inform your database administrator.
User Response: Correct the field procedure according
Database Administrator Response: Use the SHOW
to the following reason codes, and try again:
POOL command to find the full storage pools. Increase
v For reason codes 1, 2, 3, and 4: ensure that the field
the size of your storage pools.
procedure returns values that are consistent with
their descriptions.
v For reason code 5: ensure that the storage size is a
-700
No available space in storage pool
positive integer.
pool-number.
v For reason code 6: ensure that the length of FPPVL is
Explanation: An SQL request requires a physical page
positive.
(a new page or a shadow page) but the storage pool
does not have enough space. If a REORGANIZE
-698
The statement failed because the invalid
INDEX command returned this SQLCODE, the
entities table could overflow.
command processing may have marked the index
invalid. Use the SHOW INVALID operator command to
Explanation: The statement requires an available entry
determine if the index is now invalid.
in the invalid entities table and the total number of
invalid and transient indexes is greater than the
SQLSTATE 57038.
304
Messages and Codes
System Action: Processing of the SQL statement ends.
System Programmer Response: You may use the
DROP INDEX statement to make room for the new
User Response: Inform your database administrator.
index. If this is not desirable, a new dbspace will have
If an index that you are reorganizing is now invalid,
to be created with a larger number of index pages. This
either drop and recreate the index or reorganize it
is determined by the PCTINDEX value on the
again after the database administrator has corrected the
ACQUIRE DBSPACE statement. You may specify a
storage pool problem.
larger PCTINDEX value with the same number of
pages as the current dbspace or increase the PAGES
Database Administrator Response: Increase the size
value to acquire a larger dbspace. Then use the DBS
of the storage pool.
Utility UNLOAD and RELOAD commands to transfer
the information to the new dbspace. Then the original
-701
No available space in the dbspace
statement may be resubmitted.
number dbspace-number for data.
For more information, refer to the DB2 Server for VSE &
Explanation: The space allocated for data in the
VM Database Administration manual.
dbspace is full. No more pages are available now.
Notes:
dbspace-number is the dbspace number which has run
1. If the dbspace referenced in the text is the catalog
out of space.
dbspace (SYS0001), you can try reorganizing the
SQLSTATE 57011.
indexes for the catalog tables by running the catalog
reorganization utility. For more information, refer to
System Action: Processing of the SQL statement has
the DB2 Server for VSE & VM Database
ended.
Administration manual.
2. If the catalog index reorganization does not solve
User Response: Notify your system programmer.
the problem, you must do another database
System Programmer Response: Check the PCTFREE
generation specifying a larger size for the first
value for the dbspace (the value in the FREEPCT
dbspace. Then use the DBS Utility UNLOAD and
column in SYSTEM.SYSDBSPACES). If this value is
RELOAD commands to transfer the information to
greater than 0, it can be reduced to 0 by the ALTER
the new database.
DBSPACE statement. This reduction allows for more
insertions of data. If PCTFREE is currently 0, you must
-703
No available space in the dbspace for
delete some data from the dbspace to make room for
header information.
the new data. You can delete space using the DROP
TABLE statement. You can also, create a new dbspace
Explanation: The space allocated for the database
and use the DBS Utility UNLOAD and RELOAD
manager to record information about the contents of
statements to transfer the information to the new larger
the dbspace is full. No more header pages are available.
dbspace.
SQLSTATE 57011.
Note: If the dbspace referenced in the text is the
System Action: Processing of the SQL statement has
catalog dbspace (SYS0001), you must do another
ended.
database generation specifying a larger size for
the first dbspace. Then use the DBS Utility
User Response: Notify your system programmer.
UNLOAD and RELOAD commands to transfer
System Programmer Response: Check the NHEADER
the information to the new database.
value for the dbspace in the catalog table
SYSTEM.SYSDBSPACES. If the value is less than 8,
For more information, refer to the DB2 Server for VSE &
issue an ACQUIRE DBSPACE statement with a larger
VM Database Administration and the DB2 Server for VSE
NHEADER value (less than or equal to 8). Then use the
System Administration manuals.
DBS Utility UNLOAD and RELOAD commands to
transfer the information to the new larger dbspace. If
the NHEADER value is already 8, the dbspace is full.
-702
No available space in the dbspace
You may either acquire a new dbspace or delete some
number dbspace-number for indexes.
objects in the current dbspace by using the DROP
Explanation: The space allocated in the dbspace for
TABLE or DROP INDEX statements which will free
indexes is full. No more pages are available.
space in the current dbspace. Then the original
dbspace-number is the dbspace number which has run
statement may be resubmitted.
out of space.
For more information, refer to the DB2 Server for VSE &
SQLSTATE 57011.
VM Database Administration manual.
System Action: Processing of the SQL statement has
Note: If the indicated action does not eliminate the
ended.
problem, the dbspace referenced in the text is
User Response: Notify your system programmer.
probably the catalog dbspace(SYS0001). You
305
must do another database generation specifying
System Action: Processing of the SQL statement has
a larger size for the first dbspace. Then use the
ended.
DBS Utility UNLOAD and RELOAD commands
User Response: Correct the statement. Try again.
to transfer the information to the new database.
-706
The ACQUIRE PUBLIC DBSPACE
-704
The ACQUIRE DBSPACE statement
statement failed because you cannot
failed because no dbspaces are
acquire SYSxxxx from a nonrecoverable
available.
storage pool.
Explanation: Either:
Explanation: Public dbspace names beginning with
1. There are no dbspaces available of the requested
SYS are system dbspaces and cannot be acquired from
type and size in the specified storage pool.
a nonrecoverable storage pool. The STORPOOL
2. If the STORPOOL parameter was not specified, then
parameter value is for a nonrecoverable storage pool.
there are no recoverable storage pools having any
SQLSTATE 53060.
free dbspaces.
3. The specified storage pool does not exist.
System Action: Processing of the SQL statement has
ended.
SQLSTATE 57011.
User Response: Resubmit the request with a
recoverable storage pool specified on the ACQUIRE
System Action: Processing of the SQL statement has
DBSPACE STORPOOL parameter or omit the
ended.
STORPOOL parameter.
User Response: For reason 3, enter the SHOW POOL
System Programmer Response: Same as user action.
operator command to determine the existing storage
pools. Otherwise, notify your system programmer.
-707
The ACQUIRE DBSPACE statement
System Programmer Response: Determine what type
failed because the name you specified
dbspace is needed and perform an ADD DBSPACE
was incorrect.
operation. For details on ADD DBSPACE, refer to the
DB2 Server for VSE System Administration manual. The
Explanation: The DBSPACE name you specified starts
ACQUIRE DBSPACE statement may be resubmitted
with SYS, but is not in the range SYS0002 to SYS9999.
when a dbspace has been added.
SQLSTATE 42939.
-705
You specified an incorrect value for the
System Action: Processing of the SQL statement has
parameter, parameter.
ended.
Explanation: An incorrect value was provided for the
User Response: Correct the statement. Try again.
parameter specified in the message.
Format 2:
-708
You cannot ALTER, LOCK, or DROP a
public dbspace because you do not have
v An incorrect value was specified for the parameter,
DBA authority.
PCTINDEX or NHEADER.
Explanation: DBA authority is required to DROP,
Format 3:
LOCK, or ALTER a public dbspace.
v An incorrect value was specified for the parameter,
SQLSTATE 42502.
PCTFREE or LOCK.
System Action: Processing of the SQL statement has
ended.
parameter can refer to the parameters associated with
the following statements:
User Response: Notify your database administrator.
ACQUIRE DBSPACE
ALTER DBSPACE
CREATE INDEX
-709
You cannot drop a system dbspace.
CREATE TABLE PRIMARY KEY
Explanation: You tried to drop a dbspace which has a
ALTER TABLE ADD PRIMARY KEY.
owner of SYSTEM. This is not allowed.
ALTER TABLE UNIQUE
SQLSTATE 42832.
SQLSTATEs:
System Action: Processing of the SQL statement has
37515
ended.
42615
User Response: Correct the statement. Try again.
306
Messages and Codes
System Action: Processing of the SQL statement has
-710
An attempt to access a private dbspace
ended.
failed because it is in use.
User Response: If SQLERRD2 = -74, internal dbspaces
Explanation: The private dbspace you tried to access
are returned to the system by a COMMIT or
is now in use.
ROLLBACK statement. If you have issued previous
SQLSTATE 40503.
SELECT statements without doing a COMMIT
statement, you could alleviate the problem by issuing
System Action: Processing of the SQL statement has
COMMIT statements interspersed with your other SQL
ended.
statements. Also, notify your system programmer to
User Response: Try again later.
increase the number of internal dbspaces in the system.
If SQLERRD2 = -77, -78 or -136 notify your system
-711
An attempt to access a dbspace failed
programmer to increase the size of the internal
because it is disabled.
dbspaces.
Explanation: You tried to access an object in a
System Programmer Response: If SQLERRD2 = -74,
disabled dbspace. The dbspace cannot be accessed until
allocate additional internal dbspaces using the ADD
it is enabled by the system programmer.
DBSPACE operation
This error condition can occur when accessing a view.
If SQLERRD2 = -77, -78 and -136, perform an ADD
When a view is accessed, the package generated at
DBSPACE operation for internal dbspaces with a larger
CREATE VIEW time must be retrieved. If the package
size parameter than previously specified and resubmit
dbspace (SYS000n) is disabled, the statement will fail.
the original command.
In this case, the SQLCA SQLERRP value is ARIXOVC.
Note that if SQLERRP is not ARIXOVC (or ARIXELX),
-713
Incorrect isolation level value value
then the error occurred because an underlying table is
specified.
in a disabled dbspace.
Explanation: During execution of an application
If this error condition also returns the SQLERRP value
program, an incorrect value for isolation level was
of ARIXELX, this indicates that the program’s package
found. The only values recognized for this option are:
resides in a disabled dbspace and cannot be accessed.
SQLERRP is displayed in message ARI0504I. In this
C
For concurrency at the cursor stability level.
case, SQLCA fields SQLWARN0 and SQLWARN6 are
R
For concurrency at the repeatable read level.
both set to S to indicate a severe error. This condition
will cause ISQL, the DBS Utility, and the FORTRAN
U
For concurrency at the uncommitted read
preprocessor to terminate.
level.
This error condition can occur during preprocessing or
Note: If the package was created prior to Version 5
during execution of CREATE VIEW if a package
Release 1, you must explicitly repreprocess it
dbspace (SYS000n) is disabled.
before you can specify U for isolation level
System Action: Processing of the SQL statement has
Uncommitted Read.
ended.
SQLSTATE 42815.
SQLSTATE 57011.
System Action: Processing of the SQL statement has
User Response: If you must access the disabled
ended.
dbspace, you must request your system programmer to
enable the dbspace. You can continue to access other
User Response: Assign a correct value to the SQL
dbspaces, unless your DB2 Server for VSE application’s
isolation level variable in the application program. In
package is in a disabled dbspace.
COBOL, it is SQL-ISL. In other languages, it is SQLISL.
Try again.
-712
The SQL statement failed because
internal dbspaces were not available or
-714
Referential constraints cannot span
were too small.
dbspaces in different types of storage
pools.
Explanation: The system may require internal
dbspaces to process SQL statements involving ORDER
Explanation: Both the parent and dependent tables of
BY, GROUP BY, or joins. Either it was unable to acquire
a referential constraint must be in the same type of
enough internal dbspaces, or the internal dbspaces
storage pool; that is, both are in a recoverable or
were not large enough to process the command.
nonrecoverable storage pool.
SQLSTATE 57011.
SQLSTATE 56035.
307
System Action: Processing of the SQL statement has
could not be found for a CICS LOAD
ended.
(ISQL statement) or LOAD (operator
command).
User Response: Make sure both tables are in the same
type of storage pool. Correct the statement. Try again.
4
The SET LANGUAGE argument
could not be found in the
SQLDBA.SYSLANGUAGE table as a
-720
The initial subcomponent message
LANGUAGE or LANGID entry or if
repository could not be accessed.
the entry was found in the preceding
Explanation: During NLS sub-component
table, then the argument’s
initialization, code -720 will be returned by the resource
corresponding language id could not
adapter if all of the following conditions have been
be found in the link-edited
met:
LANGBLK table.
v The repository phase corresponding to the default
SQLSTATE 57024.
language, defined as the first entry in the link-edited
LANGBLK table, could not be CICS LOADed.
System Action: Processing of the command or
v The phase corresponding to the American English
statement has ended with the message ARI2900E.
(LANGID: AMENG, LANKEY: S001) repository
User Response: Ensure that the SET LANGUAGE
could not be CICS LOADed.
argument is valid. For example, you require a language
string (LANGUAGE) or language id (LANGID) that is
SQLERRMT(1:40) has the following meaning:
less than or equal to 40 characters in length. The
language string or ID is present in the
It contains the language id associated with the last
SQLDBA.SYSLANGUAGE catalog and the
language that failed.
corresponding PHASE is accessible.
SQLERRD1 has the following meaning:
-751
A stored procedure has been placed in
Code Number Explanation
MUST_ROLLBACK state due to SQL
operation op-name.
1
The initial message file’s
corresponding default (or American
Explanation: A stored procedure issued an SQL
English) phase could not be
operation that forced the DB2 server to roll back the
successfully CICS LOADed.
unit of work.
4
The LANGBLK information
op-name
corresponding to the American
The SQL operation that caused the DB2 server
English language is incomplete.
to be placed in the MUST_ROLLBACK state is
one of the following:
SQLSTATE 57024.
CALL
System Action: Initialization is aborted with the
COMMIT
message ARI2902E.
CONNECT
User Response: Ensure that the phase corresponding
ROLLBACK
to the default language is available, or alternatively that
the phase corresponding to AMENG is available (Phase
SQLSTATE: 38003
name :ARIMS001).
System Action: The statement cannot be executed. All
further SQL statements are rejected until the SQL
-721
The message file associated with the
application that issued the SQL CALL statement rolls
string or ID specified as an argument to
back the unit of work.
a SET LANGUAGE command cannot be
accessed.
User Response: If this message is received by a stored
procedure, the stored procedure must terminate. When
Explanation: While issuing the SET LANGUAGE
control returns to the SQL application that issued the
command (ISQL and operator), code -721 will be
SQL CALL statement, the application must roll back the
returned if the repository associated with the SET
unit of work. No other SQL statement will be accepted.
LANGUAGE command argument cannot be accessed.
The stored procedure should be deactivated by issuing
SQLERRD1 has the following meaning:
STOP PROC with the REJECT option, so that the
disallowed statement can be removed from the
Code Number Explanation
procedure. After the statement has been removed, issue
1
The SET LANGUAGE argument’s
the START PROC command to activate the stored
corresponding message file module
procedure.
308
Messages and Codes
with a COMMIT or ROLLBACK statement. Remove the
-752
You cannot specify an SQL CONNECT
excess CREATE PACKAGE statements. Try again.
statement within a logical unit of work.
Explanation: You attempted to issue a CONNECT
-757
A CREATE PACKAGE statement is not
statement before issuing a COMMIT or ROLLBACK
permitted following a statement that
statement.
modifies a package in the same logical
SQLSTATE 0A001.
unit of work.
System Action: Processing of the SQL statement has
Explanation: The program contains a CREATE
ended.
PACKAGE statement in a logical unit of work. In the
same logical unit of work, extended dynamic PREPARE
User Response: Submit a COMMIT or ROLLBACK
or DROP STATEMENT statements have been processed
statement before the CONNECT statement.
to modify an existing package.
SQLSTATE 56042.
-753
Internal system error starting a logical
unit of work.
System Action: Processing of the SQL statement ends.
Explanation: While attempting to start a logical unit
User Response: Roll back the logical unit of work,
of work an internal processing error was encountered.
then correct the placement of the CREATE PACKAGE
statement. Try again.
SQLSTATE 58004.
System Action: Processing of the SQL statement has
-758
You cannot use the current statement if
ended.
a program has been created or changed
User Response: Notify your system programmer.
in the same logical unit of work.
System Programmer Response: Make a record of
Explanation: The current statement may not follow in
what went wrong and contact the designated support
the same logical unit of work, if a DROP STATEMENT
group for your installation.
statement or Extended PREPARE statement is used.
SQLSTATE 56042.
-754
Database manager internal error while
System Action: Terminate processing of the statement.
attempting to log user data.
User Response: Commit or ROLLBACK the current
Explanation: While attempting to log user data, a
logical unit of work before trying to execute the current
database error occurred. An internal field contained an
statement.
incorrect value on the log request.
SQLSTATEs:
-759
The database manager has not
58008
DRDA protocal error
committed package package-name because
it is not a modifiable package and it
58029
internal error while logging user data error
contains no statements.
System Action: Processing of the SQL statement has
Explanation: The current logical unit of work contains
ended.
a CREATE PACKAGE. No statements were added to
User Response: Notify your system programmer.
this package so that the COMMIT did not cause the
package to be created. This will occur for any CREATE
System Programmer Response: Make a record of
PACKAGE if the NOMODIFY option was specified
what went wrong and contact the designated support
with the CREATE PACKAGE statement.
group for your installation.
SQLSTATE 42943.
-756
You are permitted only one CREATE
System Action: The current logical unit of work was
PACKAGE statement in a logical unit of
rolled back.
work.
User Response: The package created by the CREATE
Explanation: The program contains more than one
PACKAGE must have statements added to it by
CREATE PACKAGE statement in the same logical unit
executing Extended PREPARE statements.
of work.
SQLSTATE 56042.
System Action: Processing of the SQL statement has
ended.
User Response: Conclude this logical unit of work
309
|
||
|
|
|