|
|
CICS/VSE Transaction Abend Codes
missing. This is probably due to a
which is executed by the ISQL
CISQ transaction abnormal
transaction to start the second
termination, such as an ASP7
transaction.
abend.
WELC
An error has occurred on the
GCBP
The ISQL transaction abended
EXEC CICS RECEIVE command,
because the CISQ transaction was
which is executed to read the
unable to get automatic storage
input entered on the welcome
for the global control block.
screen.
INFO
The ISQL transaction has abended
WRTQ
An error has occurred on the
and the ISQL Abend Routine has
EXEC CICS WRITEQ command,
been entered.
which is executed by the ISQL
transaction to write the global
ISQL
The ISQL transaction has abended
control block pointer to a
and the ISQL abend routine has
temporary storage queue.
been entered.
PMRP
The CBND transaction abended
ITRX
An error has occurred on the exec
because the Message Repository
CICS link command, which is
cannot be found.
executed by the ISQL transaction
to link phase ARIITRX. ARIITRX
PASG
The CBND transaction abended
may not have been defined to the
because an error has occurred
CICS/VSE or it may not be in the
executing the EXEC CICS ASSIGN
libraries that are available to
command.
CICS.
PRET
The CBND transaction abended
NOGV
The transaction has abended
because an error has occurred
because an attempt to acquire
executing the EXEC CICS
virtual storage (by GETVIS
RETRIEVE command.
macro) failed.
PMSG
The CBND transaction abended
NSTG
The ISQL transaction abended
because an error has occurred
because the CISQ transaction was
trying to write out the message to
unable to get automatic storage.
either the user terminal or the
message queue specified.
RECV
An error has occurred on the
EXEC CICS RECEIVE command,
PBND
The CBND transaction has
which is executed by the ISQL
abended due to an error.
transaction to read input from the
PB2D
The CB2D transaction (started by
terminal.
CBND internally) has abended
SCRP
The ISQL transaction abended
due to a CICS RETRIEVE error.
because the CISQ transaction was
This is probably due to a CB2D
unable to get automatic storage
transaction not started by CBND.
for the message screen buffer.
xxxx
Where xxxx is the user-defined
(The pointer to the storage
transaction ID for the ISQL
obtained by the second
transaction. An ABEND condition
transaction for the ISQL
has occurred, but the ABEND
transaction for 3270 data streams
code field is blank. The ISQL
is zero.)
transaction-id in the IGCTRNID
STCD
The CICS start code is something
field of the global control block is
other than TD or S. ISQL is only
used as the ABEND code.
started either from the
terminal(TD) or from a CICS
START command(S).
STRT
An error has occurred on the
EXEC CICS START command,
230
Messages and Codes
Chapter 17. DBSS Return Codes
DBSS return codes are generally found in
lower than the current key as
SQLERRD2 (displayed by message ARI0504I). A
indicated by SCAN and QUALF.
very few error messages will also directly display
Scan is positioned ‘on’ first
the DBSS return codes (for example, ARI0523E).
offending row.
16
NFORMSEG
Note: Many of the DBSS return codes will not be
DBSPACE requested by CFETCH,
of interest or value to the end user, system
CNEXT exists but has no SCR
programmer, etc. These will be of most use
record or was not opened
to the IBM support personnel.
64
FORCEND
The return codes are in three groups:
Automatic commit work is
generated on deletion of
0
Successful. Operation executed.
DBSPACE, master or link control
No unusual conditions occurred.
records
Positive
Warning. Operation executed, but
128
BADSARG
one or more unusual conditions
Record does not satisfy the search
occurred.
arguments
Negative
Error. Operation not executed,
4096
INCONSEG
database not changed, database
NSEG or SEGMS(*) is inconsistent
only partially updated, or the
with the REL(*) supplied to
logical unit of work has been
STARTUS call.
backed up.
Bad Return Codes
Warning Return Codes
Bad DBSS Call Parameters
Return Code Name
Meaning
-1 ILOPCODE Illegal OPCODE on DBSS call
1
DIRTSCAN
-2 ILLEGALP Illegal parameter (PARAMS)
Used in read call. For Fetch Row,
pointer on DBSS call (0, or not
Open Scan, or Get Parent, scan is
word/doubleword aligned).
‘on’ a row but flagged dirty. For
Get Next Row, scan is flagged
Illegal parameters for BASE. Some codes also used
dirty and may or may not be ‘on’
by CBASE, SBASE.
a row. Get Next Row resets the
-3 ISEGMENT
scan to ‘clean’ and resets the scan
Illegal DBSPACE number, missing
to ‘on’ (or ‘EOF’).
SCR, or type conflict with
2
DOMTRUNC
operator
Field truncation. On a read
-4 ILLRID
Illegal table ID or illegal operation
request, a requested domain is
for list
longer than the domain FREQLTH
value and thus the returned
-5 NFTID
TID not found or open of an
domain has low order truncation.
empty table or list
4
EOF
End of file on a scanned set
-6 ILLPSEGM Illegal parent DBSPACE number
4
TOF
Top of file on a scanned set. No
-7 ILLPRID Illegal PRID or illegal operation
operation currently sets this code.
for list
8
KEYVIOL
-8 NFPTID
PTID not found
Key violation on Get Next Row
-9 ILSCANID Illegal scan ID
for an index scan. Submitted key
231
DBSS Return Codes
-10 INKEYDOM
-29 EMPSCAN
Illegal number of key fields
Empty scan in SCANID
-11 ILLKPTR Illegal address of KDOMAINS
-30 SCANOW Too many scans are opened by
RDS
-12 INREQDOM
Illegal number of DOMAINS
-31 UPDIRTY Write call using a dirty scan
fields
-32 NOTON Call different from NEXT, CLOSE
-13 ILLDPTR Illegal address of DOMAINS
using a scan which is not ‘on’
-14 INSARGS Illegal number of search
Exceptional Conditions on an Index or on a Row
arguments
-33 NFKEY
Submitted key not found
-15 ILLSPTR Illegal address of search
arguments
-34 UNIQKEY Violation of index key-uniqueness
-16 ILLEGLID Illegal link ID
-35 LONGKEY
Submitted key is too long
-17 ILLEGIID Illegal index ID
-36 LONGTPLE
-18 ILLICOMP
Submitted row is too long
Illegal comparison operator
(ICOMP)
-37 ILLTYPE2
Illegal call for a Type 2 table.
(Should never occur because the
-19 ILLQUALF
database manager does not have
Illegal call qualifier in BASE
Type 2 tables)
(QUALF); illegal call qualifier in
CBASE (CQUALF)
Exceptional Conditions on a Link
Illegal Parameters in KDOMAINS
-38 CLINKED Delete of a row illegally
disconnecting some link; also
-20 IKDOMPTR
connection of a row in a link in
Illegal key-field address
which it is already connected
-21 IKDOMLTH
-39 CNLINKED
Illegal key-field length
Disconnect, or delete and
disconnect of a non-linked child;
Illegal Parameters in DOMAINS
link open on a non-linked child in
-22 IFLDPTR Illegal field address
a binary link; connect, insert and
connect to a non-linked child in a
-23 IFACLTH Illegal submitted field length
binary link
Illegal Parameters in Search Arguments
-40 NOPARENT
Parent does not exist (in PARENT
-24 ISNUMBER
call)
Illegal field number in search
arguments
-41 NOCHILD
Child does not exist (in OPEN
-25 ISPOINT Illegal field address in search
call)
arguments
-26 ISLENGTH
Invalid Index Conditions
Illegal field length in search
-42 INVENTU Attempt made to use an index
arguments
that has been marked invalid
-27 ISCOMP Illegal comparison operator in
-43 INVENTM
search arguments
An index has been marked
-28 ISBOP
Illegal boolean operator in search
invalid during ROLLBACK or
arguments
UNDO
-44 NOINVALD
Exceptional Conditions on a Scan
The limit of invalid entities has
232
Messages and Codes
DBSS Return Codes
been reached when combining the
-62 NOLOG Operation requires a log, but none
current invalid indexes with the
exists (should not occur on
potentially invalid indexes due to
BEGIN WORK or COMMIT as
active CREATE INDEX and
RDS does not support user log
REORGANIZE INDEX operations.
data)
-63 INVSCHED
Illegal Parameters in CBASE and Auxiliary Control
SCHEDULE opcode issued for
Structures
active logical unit of work
-45
IQUALFSG
-64 SYABORT System either requested logical
Illegal QUALFSEG
unit of work abort, has run out of
-46
IAUXPTR Illegal auxiliary pointer
log space, or transaction reached
save point limit of 2147483647.
-47
INPAGES Illegal NIPAGES or NHPAGES
Breaking up the LUW into
-48
ILLFREE Illegal percentage of free space in
smaller LUWs with the COMMIT
SCR or ICR
WORK statement will prevent
reaching the save point limit.
-49
ILOCKPRT
Illegal lock protocol in SCR or
-65 INLUW Operation not valid while agent
ICR
has active logical unit of work
-50
ILLNDOM
-66 OPABORT Logical unit of work rolled back
Illegal number of field entries in
due to operator FORCE command
MCR or ICR
Illegal Parameters in SBASE
-51
ILLDOMS Illegal field entries (lengths in
MCR, field numbers in ICR)
-70 ILLEGALL
Illegal length of the DBSPACE list
-52
ILUNIQUE
Illegal unique key specification
-71 ILISTPTR Illegal pointer to DBSPACE list
-53
TOOMANYC
Exceptional Conditions on a DBSPACE
Too many control objects as a
result of a CINSERT
-72
SGISOPEN
At least one DBSPACE already
-54
LISTSEGM
open
Operation illegal on a list
DBSPACE. Only scan operations,
-73
SEMPTIED
Insert Row, and Sort are legal.
Cannot be reopened until a
synchronous save because
Illegal Parameter in BASE or SBASE
CDELETE was issued
-58 ILIXSARG
-74
NOAVAILS
Illegal index page search
No available temporary DBSPACE
argument specified. Index is not
-75
NOTAVSEG
being used.
DBSPACE not available or write
-59 ILLHOLD Illegal HOLDIND or SHOLDIND
operation with DBSPACE opened
value from RDS, bad Isolation
for read
level/Hold value.
-76
NOROOMH
No header room in DBSPACE in
Illegal Conditions Related to Logical Unit of Work
write call
Management
-77
NOROOME
-60 NOSTART Begin Work was not issued prior
No entity room in DBSPACE in
to a Save Work call.
write call
-61 NOTEND COMMIT or ROLLBACK not
-78
NOROOMI
issued prior to Begin Work call
No index room in DBSPACE in
(logical unit of work active)
write call
Chapter 17. DBSS Return Codes
233
DBSS Return Codes
-79 NOROOMSP
Illegal Parameters Related to Locking
No available space in storage pool
-94 BADCLVL Consistency level not 1, 2, or 3
nnn
(should not occur as RDS always
uses consistency level 3)
DBSS Errors and Version Limitations
-95 ILCKMODE
-80 RSSERROR
Lock mode not in
Error in DBSS code. Error ID in
(SHAR,SIX,EXCL)
feedback area (Should not occur
since DBSS terminates the
Exceptional Conditions Due to Locking
application server on any detected
DBSS code error)
-97 LOCKLIM Too many locks held by this LUW
-81 IOERROR DASD I/O error. DBSS always
-98 PRIVSEGM
abends the application server on
Requested private DBSPACE is
I/O error. (Should not occur)
locked
-82 NOTIMPL Feature not yet implemented.
LUW Backout Due to Locking; (Reached Save Point in
(Should not occur)
FEEDBACK(1))
-83 NOMEMORY
-99 DEADLOCK
Unable to allocate needed main
LUW backout due to deadlock
storage
-100 OVERLOAD
RETURN CODES USED ONLY IN SYSTEM
LUW backout due to too many
WITH LOG
locks being held system-wide
-101 DEADATSI
Illegal Parameters in LUW Operators
Deadlock backout to a DBSI
-85 OUTSIDE Pointer to user save data that is
boundary...internal retry failed
bad. (Should never occur because
RDS does not support user log
RETURN CODES USED ONLY IN SINGLE-USER
data)
SYSTEM
-86 TOOLONG
-120 NOTMUL
User wants to log more than 64K.
Operation not allowed in
(Should never occur because RDS
single-user system issued by
does not support user log data)
operator command OPCODE
(OPCMMD)
-87 BADSAVNO
Tried to back over non-existent
MORE RETURN CODES RELATED TO LUW
save point
MANAGEMENT
-89 OKBUTMOR
-123 ATTNBACK
Read user log data but there was
OPCODE terminated due to
more. (Should never occur since
asynchronous request to terminate
RDS does not support user log
LUW; caller should issue
data)
ROLLBACK. Can occur only if
-90 INVIDLST
YTABLE1 flag ATTNATTN set to
Output area too small for
Y. The database manager does not
INDOUBT list
set ATTNATTN flag to Y. Should
not occur.
-91 SYBACKUP
System requested LUW backup
RETURN CODES USED BY THE SORT
SUBSYSTEM
RETURN CODES USED ONLY IN MULTI-USER
SYSTEM
-130 ILLSOPTR
Illegal address of SORTSPEC
-92 CHECKING
Checkpoint in progress, try later
234
Messages and Codes
DBSS Return Codes
-131
INORDSPC
-400
ILGMODE
Illegal number of sort order
Illegal update statistics mode
specifications
-401
ILNUMREL
-132
ISORTSPC
Illegal number of specified tables
Illegal sort order specification
-402
DUPRELID
-133
NOEXDOMN
Duplicate table-id in input list
Field number does not exist for
-403
IPATHTYP
input table-id
Illegal path type
-134
IDUPELIM
-404
ILPATHID
Illegal duplicate elimination
Illegal path ID
option
-405
MISMATCH
-135
INSLDOMS
RELID and PATHID do not
Illegal number of SORTLIST fields
correspond
-136
NORMTPSG
-406
NOTAROOT
No space in temporary DBSPACE
First table-id on input list is not a
for write call
root
-137
DUPFOUND
-407
NOPARNT
Duplicate found during
No parent specified for binary
sort/merge; stop due to user
link
option
-409
UNCLUSTI
-138
ILLSLPTR
Unclustered indexes exist
Illegal pointer to SORTLIST
specification
-410
INCONREL
NREL or RELS(*) inconsistent
-139
EMPTYSRT
with that previously specified
Empty set of rows to sort: sort
with STARTUS call.
DBSPACE is unchanged
-140
ILTIDSPC
Illegal TID specification: input list
has no TIDs
-141
ILDOMREP
Illegal domain repetition: output
list domain in SORTSPEC
specified more than once
-142
ENCTPTLG
Encoded row too long: does not
fit in an intermediate page
-143
ISORTERR
Internal sort error: number of
rows sorted and merged different
RETURN CODES SET BY RDS FOR DBSPACE
ACCESS
-200 DISABDB
Attempt to access a disabled
DBSPACE
RETURN CODES USED BY THE UPDATE
STATISTICS COMMANDS
Chapter 17. DBSS Return Codes
235
DBSS Return Codes
236
Messages and Codes
Chapter 18. SQLCODEs
The SQLCODEs are associated with the SQL
has been processed successfully.
messages (ARI0500I - ARI0513E). The SQLCODEs
User Response: Take action based on message
provide specific information about the condition
ARI0502I.
of the system. For more information, refer to the
descriptions of the SQL messages issued with the
+12
An unqualified column name has been
SQLCODE.
interpreted as a correlated reference.
An SQLSTATE field as well as an SQLCODE, is
Explanation: An unqualified column name has been
returned in the SQLCA. Each SQLSTATE
interpreted as a correlated reference.
corresponds to an SQLCODE. See Chapter 19,
SQLSTATE 01545.
“SQLSTATEs,” on page 335 for more information.
System Action: Normal completion.
User Response: Take suitable action based on the
SQLCODEs 0, and +12 through
SQLCODE descriptive text.
+863
The SQLCODE descriptive text identified for
+100
There are no (or no more) rows that
these SQLCODEs is displayed as continuation
satisfy the condition.
lines for message ARI0501I.
Explanation: For a query that uses a cursor, the cursor
is empty or all rows have been selected. For a query
SQLCODEs 0 and 100 are associated with normal
that does not use a cursor, no row was found that
conditions.
satisfied the WHERE condition. An INSERT via
SELECT statement may return this SQLCODE if the
SELECT statement does not retrieve any rows.
0
Database manager processing is
completed. Warning may indicate a
SQLSTATE 02000.
problem.
System Action: Normal completion.
Explanation: Execution of the SQL statement has
User Response: Take suitable action based on the
completed. Message ARI0502I should follow this text
SQLCODE descriptive text.
and indicate the specific warning conditions.
SQLSTATEs:
+114
The server name part of the
server-name1.creator.object does not match
00000
With no warnings
the name of the connected application
server server-name2.
01004
SQLWARN1=W
Explanation: The code is used to report that the server
01555
SQLWARN1=Z
name (standalone or qualifying a column) does not
01003
SQLWARN2=W
match the name of the connected application server.
This code is returned only when the program is being
01503
SQLWARN3=W
preprocessed with the NOEXIST option.
01504
SQLWARN4=W
SQLSTATE 01536.
01511
SQLWARN5=W
System Action: Processing of the SQL statement is
ended. The statement is recorded in the package, and it
01506
SQLWARN7=W
will be rechecked when the program is executed.
01507
SQLWARN7=Z
Preprocessing continues.
01508
SQLWARN8=W
User Response: If this statement is not intended to be
executed on the application server that returned the
01509
SQLWARN9=W
warning, the warning can be ignored. Otherwise,
01510
SQLWARNA=W
modify the statement and preprocess the program
again. If the condition is corrected before the statement
01517
SQLWARN8=Z
is executed, execution occurs normally. If the condition
System Action: Normal processing; the SQL statement
persists at execution time, the execution is unsuccessful.
237
SQLCODEs
In either situation, the statement is dynamically
Note: This code is returned only when a statement is
rebound each time the program is run. This dynamic
being preprocessed.
rebinding can be avoided by preprocessing the
program again, after the statement is corrected. If this
SQLSTATE 01582.
section is not executed at the application server
System Action: Processing of the SQL statement has
specified by server-name2, the negative version of this
ended. However, the statement has been recorded in
code will be returned.
the package and it will be rechecked when the package
is executed. Preprocessing of the statement continues.
+117
The number of data values to be
User Response: If this statement is not intended to be
inserted does not equal the number of
executed on the application server that returned the
columns specified or implied.
warning, the warning can be ignored. Otherwise, check
Explanation: The number of values on an INSERT
the use of the long string column before the statement
statement must equal the number of columns to be
is executed, or modify the statement and preprocess the
updated. Either too many or too few data items were
program over again. If the condition is corrected before
listed for the columns specified or implied. This code is
the statement is executed, execution occurs normally.
returned only when the program is being preprocessed
However, if the condition persists at execution time, the
with the NOEXIST option.
execution fails. In either case, the statement is
dynamically rebound each time the program is run.
SQLSTATE 01525.
This dynamic rebinding can be avoided by
System Action: Processing of the SQL statement has
preprocessing the program again, once the long string
ended. However, the statement has been recorded in
column has been checked. Refer also to the DB2 Server
the package and it will be rechecked when the package
for VSE & VM Application Programming manual for
is executed. Preprocessing of the statement continues.
details on using long strings.
User Response: If this statement is not intended to be
executed on the application server that returned the
+135
The input for a long string column in an
warning, the warning can be ignored. Otherwise, either
INSERT statement or UPDATE
create or delete data items to equal the number of
statement must be from a host variable
columns specified, before the statement is executed, or
or be the keyword NULL.
modify the statement and preprocess the program over
Explanation: The UPDATE or INSERT is using
again. If the condition is corrected before the statement
constants, column names, or subqueries where it
is executed, execution occurs normally. However, if the
should be using NULL or a host variable.
condition persists at execution time, the execution fails.
In either case, the statement is dynamically rebound
A long string column is either a LONG VARCHAR,
each time the program is run. This dynamic rebinding
LONG VARGRAPHIC, VARCHAR(n) where n is
can be avoided by preprocessing the program again,
greater than 254 but less than or equal to 32767, or
once the correct number of data items exist.
VARGRAPHIC(n) where n is greater than 127 but less
than or equal to 16383.
+134
Improper use of long string.
Note: This code is returned only when a statement is
Explanation: The SQL statement improperly references
being preprocessed.
a long string column. Long strings cannot be used to
represent datetime values and cannot be referenced in:
SQLSTATE 01584.
v A CREATE INDEX statement
System Action: Processing of the SQL statement has
v A function other than SUBSTR or LENGTH
ended. However, the statement has been recorded in
v A GROUP BY clause
the package and it will be rechecked when the package
v A PRIMARY KEY, FOREIGN KEY, or UNIQUE
is executed. Preprocessing of the statement continues.
clause
v A SELECT DISTINCT statement
User Response: If this statement is not intended to be
v A subselect of an INSERT
executed on the application server that returned the
v A subselect of a UNION or UNION ALL
warning, the warning can be ignored. Otherwise, check
v An expression in a SET clause of an UPDATE
the use of the long string column before the statement
v An ORDER BY clause
is executed, or modify the statement and preprocess the
v By itself in a predicate other than LIKE
program over again. If the condition is corrected before
the statement is executed, execution occurs normally.
A long string column is either a LONG VARCHAR,
However, if the condition persists at execution time, the
LONG VARGRAPHIC, VARCHAR(n) where n is
execution fails. In either case, the statement is
greater than 254 but less than or equal to 32767, or
dynamically rebound each time the program is run.
VARGRAPHIC(n) where n is greater than 127 but less
This dynamic rebinding can be avoided by
than or equal to 16383.
238
Messages and Codes
SQLCODEs
preprocessing the program again, once the long string
+150
Connect authority is still active for user
column has been checked.
IDs.
Refer also to the DB2 Server for VSE & VM Application
Explanation: This message is a reminder that revoking
Programming manual for details on using long strings.
a user ID’s DBA, SCHEDULE, or RESOURCE authority
Correct the statement. Try again.
does not remove the user ID’s CONNECT authority.
SQLSTATE 01512.
+142
statement-type is not supported.
System Action: Normal completion.
Explanation: The database manager does not support
the SQL statement shown (statement-type). Examples
User Response: None required. If you want to remove
of statement-type are DECLARE TABLE, or DECLARE
the CONNECT authority from the user IDs, enter a
STATEMENT. In other IBM SQL products, these
REVOKE CONNECT statement for the user IDs.
statements cause code expansions to occur. Because the
database manager does not support these statements,
+151
A column of a view cannot be updated
the preprocessors have not performed these code
since it is derived from an expression.
expansions. Your program is preprocessed successfully
unless other errors occur, and you did not specify the
Explanation: A column of a view may be updated
ERROR option as a preprocessing parameter.
only if it is derived directly from a column of a base
table. This code is returned only when a statement is
SQLSTATE Spaces.
being preprocessed.
System Action: Preprocessing continues.
SQLSTATE 01575.
User Response: If your program depends on the code
System Action: Processing of the SQL statement has
expansion, you should change your application. It
ended. However, the statement has been recorded in
should not depend on any of the above statements if
the package and it will be rechecked when the package
you want to preprocess your application using the
is executed. Preprocessing of the statement continues.
database manager.
User Response: If this statement is not intended to be
executed on the application server that returned the
+149
The view cannot be used to modify data
warning, the warning can be ignored. Otherwise, check
because it is based on more than one
the origin of the column of a view before the statement
table.
is executed, or modify the statement and preprocess the
Explanation: INSERT, DELETE, or UPDATE of a view
program over again. If the condition is corrected before
is not permitted if the VIEW is based on more than one
the statement is executed, execution occurs normally.
table. This code is returned only when a statement is
However, if the condition persists at execution time, the
being preprocessed.
execution fails. In either case, the statement is
dynamically rebound each time the program is run.
SQLSTATE 01574.
This dynamic rebinding can be avoided by
System Action: Processing of the SQL statement has
preprocessing the program again, once the origin of the
ended. However, the statement has been recorded in
column of a view has been checked.
the package and it will be rechecked when the package
is executed. Preprocessing of the statement continues.
+154
View limitations do not allow one of the
User Response: If this statement is not intended to be
operations.
executed on the application server that returned the
Explanation: Certain limitations exist when creating
warning, the warning can be ignored. Otherwise, check
views:
how many tables the VIEW is based on before the
v INSERT, UPDATE, or DELETE of a view is not
statement is executed, or modify the statement and
permitted if the view involves a GROUP-BY
preprocess the program over again. If the condition is
CLAUSE or the keyword DISTINCT.
corrected before the statement is executed, execution
occurs normally. However, if the condition persists at
v The DELETE statement is not permitted in views
execution time, the execution fails. In either case, the
defined with column functions.
statement is dynamically rebound each time the
v An index cannot be created on a view.
program is run. This dynamic rebinding can be avoided
v ALTER TABLE is not permitted on a view.
by preprocessing the program again, once the tables
that the VIEW is based on have been checked.
v No host input variables are allowed for views.
v No cursor references are allowed in views.
v Inserts are not permitted in views whose columns
are derived from expressions and not directly from a
column of a stored table.
Chapter 18. SQLCODEs
239
SQLCODEs
v The UNION operator is not allowed in a view.
warning, the warning can be ignored. Otherwise, check
that the date or time value conforms to the syntax of a
Note: This code is returned only when a statement is
supported format such as ISO, JIS, EUR, USA, or
being preprocessed.
LOCAL before the statement is executed, or modify the
statement and preprocess the program over again. If
SQLSTATEs:
the condition is corrected before the statement is
executed, execution occurs normally. However, if the
01576
The bind process detected a CREATE
condition persists at execution time, the execution fails.
INDEX statement for a view.
In either case, the statement is dynamically rebound
each time the program is run. This dynamic rebinding
01577
The bind process detected a CREATE
can be avoided by preprocessing the program again,
VIEW statement that includes an
once the date or time value conforms to the syntax of a
operator or operand that is not valid
supported format such as ISO, JIS, EUR, USA, or
for views.
LOCAL.
System Action: Processing of the SQL statement has
ended. However, the statement has been recorded in
+200
Committing the current logical unit of
the package and it will be rechecked when the package
work revokes all existing run authority,
is executed. Preprocessing of the statement continues.
except the creator’s, for package
User Response: If this statement is not intended to be
package-name.
executed on the application server that returned the
Explanation: You used the Extended Dynamic
warning, the warning can be ignored. Otherwise,
PREPARE statement against a package that was created
modify the statement and preprocess the program over
by using the CREATE PACKAGE statement with the
again. If the condition is corrected before the statement
MODIFY option. The current SQL statement has been
is executed, execution occurs normally. However, if the
added to the named package. When the logical unit of
condition persists at execution time, the execution fails.
work is committed, all existing RUN authority for the
In either case, the statement is dynamically rebound
named package, except its owner, is revoked. This
each time the program is run. This dynamic rebinding
occurs because the authorization required for the
can be avoided by preprocessing the program again,
statement that has just been added is not sufficient to
once the correct number of data items exist.
maintain the existing RUN authority with the GRANT
option as it applies to the modified package.
+179
INCLUDE SQLCA is not permitted
SQLSTATE 01513.
when you request NOSQLCA support.
System Action: Processing of the SQL statement was
Explanation: When preprocessing an application
successfully ended.
program with the NOSQLCA support, you cannot
include the SQLCA structure in the source program.
User Response: If you do not want existing RUN
authority to be revoked, roll back the current logical
SQLSTATE Spaces.
unit of work. To prevent this situation from occurring
System Action: Processing of the SQL statement has
again, you must acquire the authority needed to
ended. The SQLCA code is not generated into your
execute the current SQL statement.
program.
User Response: Remove the INCLUDE SQLCA
+202
Column column-name was not found in
statement.
any table referenced by the statement.
Explanation: Since the column name was unqualified,
+180
The string representation of a datetime
all the columns associated with the tables or views in
value has invalid syntax.
the SQL statement were searched and column-name
was not among them.
Explanation: The string representation of a date or
time value does not conform to the syntax of any
This SQLCODE may result if:
supported format. This code is returned only when a
v You use the single quotation character (') to mark the
statement is being preprocessed.
beginning and ending of a character string constant,
SQLSTATE 01572.
instead of using the double quotation character (")
required by SQL. For example, the following query
System Action: Processing of the SQL statement has
generates SQLCODE +202 because the system
ended. However, the statement has been recorded in
attempts to use “STORED QUERIES” as a column
the package and it will be rechecked when the package
name, not a character string constant:
is executed. Preprocessing of the statement continues.
SELECT * FROM SYSTEM.SYSCATALOG
User Response: If this statement is not intended to be
WHERE TNAME=’STORED QUERIES’
executed on the application server that returned the
240
Messages and Codes
SQLCODEs
This query should be:
ARISEXP source member. The implicit EXPLAIN
version of this SQLCODE is -649.
SELECT * FROM SYSTEM.SYSCATALOG
WHERE TNAME="STORED QUERIES"
v NOFOR support was invoked and the column-name
+205
Column column-name was not found in
in the appended FOR UPDATE OF clause was not
table owner.table-name.
found in the associated tables or views.
Explanation: The PRIMARY KEY, FOREIGN KEY, or
v The program is being preprocessed with the
UNIQUE CONSTRAINT contained an invalid column
NOEXIST option.
name column-name. This code is only returned when
the program is being preprocessed with the NOEXIST
SQLSTATE 01533.
option.
System Action: Processing of the SQL statement has
SQLSTATE 01533.
ended. However, the statement has been recorded in
the package and it will be rechecked when the program
System Action: Processing of the SQL statement has
is executed. Preprocessing of the statement continues.
ended. However, the statement has been recorded in
the package and it will be rechecked when the program
User Response: If this statement is not intended to be
is executed. Preprocessing of the statement continues.
executed on the application server that returned the
warning, the warning can be ignored. Otherwise, either
User Response: If this statement is not intended to be
create the column-name before the statement is
executed on the application server that returned the
executed, or modify the statement and preprocess the
warning, the warning can be ignored. Otherwise, either
program over again. If the condition is corrected before
create the column before the statement is executed, or
the statement is executed, execution occurs normally.
modify the statement and preprocess the program over
However, if the condition persists at execution time, the
again. If the condition is corrected before the statement
execution fails. In either case, the statement is
is executed, execution occurs normally. However, if the
dynamically rebound each time the program is run.
condition persists at execution time, the execution fails.
This dynamic rebinding can be avoided by
In either case, the statement is dynamically rebound
preprocessing the program again, once the
each time the program is run. This dynamic rebinding
column-name is created.
can be avoided by preprocessing the program again,
once the column is created.
+204
owner.object-name was not found in the
system catalog.
+206
The key-type constraint-name on
owner.table-name was not found.
Explanation: The name (owner.object-name) specified
in the message text is incorrect. This code is only
Explanation: Key-type can be a PRIMARY KEY,
returned when the program is being preprocessed with
FOREIGN KEY, or UNIQUE CONSTRAINT. For a
the NOEXIST option.
primary key, constraint-name is omitted.
SQLSTATE 01532.
The SQL statement containing a primary key, foreign
key constraint, or unique constraint was not found for
System Action: Processing of the SQL statement has
the named table. Either you typed the constraint-name
ended. However, the statement has been recorded in
incorrectly, or the key or constraint does not exist for
the package and it will be rechecked when the program
the specified table. This code is only returned when the
is executed. Preprocessing of the statement continues.
program is being preprocessed with the NOEXIST
option.
User Response: If this statement is not intended to be
executed on the application server that returned the
SQLSTATE 01533.
warning, the warning can be ignored. Otherwise, either
create the required object before the statement is
System Action: Processing of the SQL statement has
executed, or modify the statement and preprocess the
ended. However, the statement has been recorded in
program over again. If the condition is corrected before
the package, and it will be rechecked when the
the statement is executed, execution occurs normally.
program is executed. Preprocessing of the statement
However, if the condition persists at execution time, the
continues.
execution fails. In either case, the statement is
User Response: If this statement is not intended to be
dynamically rebound each time the program is run.
executed on the application server that returned the
This dynamic rebinding can be avoided by
warning, the warning can be ignored. Otherwise, either
preprocessing the program again, once the required
create the required key or constraint before the
object is created.
statement is executed, or modify the statement and
If the object-name is one of the EXPLAIN tables, you can
preprocess the program over again. If the condition is
use the IBM-supplied type-A source member ARISEXP
corrected before the statement is executed, execution
to create the EXPLAIN tables. See the DB2 Server for
occurs normally. However, if the condition persists at
VSE & VM SQL Reference manual for details about the
execution time, the execution fails. In either case, the
241
Chapter 18. SQLCODEs
SQLCODEs
statement is dynamically rebound each time the
numeric, character, graphic, date, time, or timestamp,
program is run. This dynamic rebinding can be avoided
or one must be a datetime data type and the other a
by preprocessing the program again, once the required
character.
key or constraint is created.
Note: This code is returned only when a statement is
being preprocessed.
+304
You cannot assign a value with a data
type of data-type1 to a host variable
SQLSTATE 01578.
because the value is not within the
range of the host variable in position
System Action: Processing of the SQL statement has
position-number with data type data-type2.
ended. However, the statement has been recorded in
the package and it will be rechecked when the package
Explanation: A FETCH or SELECT into a host variable
is executed. Preprocessing of the statement continues.
list or structure, position number position-number
failed because the host variable having data type
User Response: If this statement is not intended to be
data-type2 was not large enough to hold the retrieved
executed on the application server that returned the
value having data type data-type1. The FETCH or
warning, the warning can be ignored. Otherwise,
SELECT does not return the data for the indicated
correct the data types used before the statement is
SELECT item. The indicator variable associated with
executed, or modify the statement and preprocess the
the host variable in error has been assigned a value of
program over again. If the condition is corrected before
-2 to indicate the return of a NULL value.
the statement is executed, execution occurs normally.
However, if the condition persists at execution time, the
SQLSTATE 01515.
execution fails. In either case, the statement is
System Action: Processing of the SQL statement
dynamically rebound each time the program is run.
continues.
This dynamic rebinding can be avoided by
preprocessing the program again, once the data types
User Response: Correct the output host variable so
have been corrected.
that it is large enough to contain the source data value.
You must repeat the steps from preprocessing to
execution of the program.
+404
A character string specified in an
INSERT or UPDATE statement is too
large for the target column.
+331
A null value has been assigned to a
nullable host variable because at least
Explanation: A character string in the data items-list
one of the characters in the source value
of an INSERT statement or one of the character strings
cannot be converted.
in the SET clause of an UPDATE statement is longer
than the associated target column in the database.
Explanation: A warning occurred while converting a
string value returned by the application server to the
Note: This code is returned only when a statement is
application requester. The value is incompatible with
being preprocessed.
the nullable host variable because of a mismatch in
data representation. The FETCH or SELECT does not
SQLSTATE 01570.
return the data for the indicated SELECT-list item, the
indicator variable is set to -2 to indicate the return of a
System Action: Processing of the SQL statement has
NULL value, and processing continues.
ended. However, the statement has been recorded in
the package and it will be rechecked when the package
SQLSTATE 01520.
is executed. Preprocessing of the statement continues.
System Action: Processing of the SQL statement
User Response: If this statement is not intended to be
continues.
executed on the application server that returned the
warning, the warning can be ignored. Otherwise,
+401
Incompatible data types were found in
correct the character string used before the statement is
an expression or compare operation.
executed, or modify the statement and preprocess the
program over again. If the condition is corrected before
Explanation: The expression or compare operation
the statement is executed, execution occurs normally.
violated one of the following rules:
However, if the condition persists at execution time, the
v An arithmetic expression that does not involve
execution fails. In either case, the statement is
datetime data types can only have operands with
dynamically rebound each time the program is run.
numeric data types.
This dynamic rebinding can be avoided by
v A datetime arithmetic expression cannot contain
preprocessing the program again, once the character
elements with graphic data types.
string has been corrected.
v Comparison operations can only be performed on
compatible data types. The data types must both be
242
Messages and Codes
SQLCODEs
SQLSTATE 01573.
+405
The numeric value, value, is not within
the range of the data type.
System Action: Processing of the SQL statement has
ended. However, the statement has been recorded in
Explanation: A numeric value specified in the
the package and it will be rechecked when the package
statement exceeds the value allowed for the associated
is executed. Preprocessing of the statement continues.
target column in the database. Following are the
limitations:
User Response: If this statement is not intended to be
v SMALLINT: -32768 to +32767
executed on the application server that returned the
warning, the warning can be ignored. Otherwise,
v INTEGER: -2147483648 to +2147483647
modify the statement and preprocess the program over
v FLOAT: -7.2E75 to -5.4E-79, 0, +5.4E-79 to +7.2E75
again. If the condition is corrected before the statement
v DECIMAL: precision larger than that of the target
is executed, execution occurs normally. However, if the
column.
condition persists at execution time, the execution fails.
In either case, the statement is dynamically rebound
Note: This code is returned only when a statement is
each time the program is run. This dynamic rebinding
being preprocessed.
can be avoided by preprocessing the program again,
once the statement has been modified.
SQLSTATE 01579.
System Action: Processing of the SQL statement has
+408
An UPDATE or INSERT of a data value
ended. However, the statement has been recorded in
is incompatible with the data type of
the package and it will be rechecked when the package
the associated target column.
is executed. Preprocessing of the statement continues.
Explanation: A source value was incompatible with
User Response: If this statement is not intended to be
the associated target column. This can happen when
executed on the application server that returned the
the source value was derived from:
warning, the warning can be ignored. Otherwise,
v A subquery used in an UPDATE or INSERT
correct the numeric value used before the statement is
statement.
executed, or modify the statement and preprocess the
v A VALUES clause in an INSERT statement.
program over again. If the condition is corrected before
the statement is executed, execution occurs normally.
Typical situations are:
However, if the condition persists at execution time, the
v The source value has a numeric data type, and the
execution fails. In either case, the statement is
target column has a character, DBCS, or datetime
dynamically rebound each time the program is run.
data type.
This dynamic rebinding can be avoided by
v The source value has a character data type, and the
preprocessing the program again, once the numeric
target column has a numeric or DBCS data type.
values have been corrected.
v The source value has a DBCS data type, and the
target column has a numeric, character, or datetime
+407
Either an UPDATE statement or an
data type.
INSERT statement with a null value for
v The source value has a character data type that is too
a column defined as NOT NULL is not
short for the target datetime column.
allowed, or a null host variable value is
v The source value has a datetime data type, and the
not allowed in a SELECT list.
target column has a numeric, DBCS, or different
Explanation: An attempt was made to update a
datetime data type.
column with a null value and the column does not
allow nulls. The null value may be from a constant
Note: This code is returned only when a statement is
value, a host variable, an expression, or a value
being preprocessed.
returned on a subquery.
This SQLCODE will also be issued if you made an
SQLSTATE 01580.
attempt to SELECT a host variable in a select-list, and
System Action: Processing of the SQL statement has
the select-list had an indicator variable value of <0,
ended. However, the statement has been recorded in
indicating a NULL host variable value. A NULL host
the package and it will be rechecked when the package
variable value is not allowed in a select-list. For more
is executed. Preprocessing of the statement continues.
information about using host indicator variables, refer
to the DB2 Server for VSE & VM Application
User Response: If this statement is not intended to be
Programming manual.
executed on the application server that returned the
warning, the warning can be ignored. Otherwise,
Note: This code is returned only when a statement is
correct the command before the statement is executed,
being preprocessed.
or modify the statement and preprocess the program
over again. If the condition is corrected before the
Chapter 18. SQLCODEs
243
SQLCODEs
statement is executed, execution occurs normally.
v All numeric constant (no E or decimal point): default
However, if the condition persists at execution time, the
data type is integer.
execution fails. In either case, the statement is
dynamically rebound each time the program is run.
Note: This code is returned only when a statement is
This dynamic rebinding can be avoided by
being preprocessed.
preprocessing the program again, once the command
has been corrected.
SQLSTATE 01581.
System Action: Processing of the SQL statement has
+414
The LIKE predicate was used for a
ended. However, the statement has been recorded in
numeric or datetime column type. LIKE
the package and it will be rechecked when the package
must only be used with graphic or
is executed. Preprocessing of the statement continues.
character columns.
User Response: If this statement is not intended to be
Explanation: The SQL statement uses LIKE against a
executed on the application server that returned the
numeric or datetime column. It can only be used
warning, the warning can be ignored. Otherwise,
against columns that have a data type that is
correct the columns before the statement is executed, or
compatible with the graphic data type or that have a
modify the statement and preprocess the program over
character data type. This code is returned only when a
again. If the condition is corrected before the statement
statement is being preprocessed.
is executed, execution occurs normally. However, if the
condition persists at execution time, the execution fails.
SQLSTATE 01571.
In either case, the statement is dynamically rebound
System Action: Processing of the SQL statement has
each time the program is run. This dynamic rebinding
ended. However, the statement has been recorded in
can be avoided by preprocessing the program again,
the package and it will be rechecked when the package
once the columns have been corrected.
is executed. Preprocessing of the statement continues.
User Response: If this statement is not intended to be
+416
You cannot specify a long string column
executed on the application server that returned the
in the SELECT clause of a UNION.
warning, the warning can be ignored. Otherwise,
Explanation: The SQL statement contained a SELECT
correct the predicate used before the statement is
clause item whose data type is a long string. This is not
executed, or modify the statement and preprocess the
valid.
program over again. If the condition is corrected before
the statement is executed, execution occurs normally.
A long string column is either a LONG VARCHAR,
However, if the condition persists at execution time, the
LONG VARGRAPHIC, VARCHAR(n) where n is
execution fails. In either case, the statement is
greater than 254 but less than or equal to 32767, or
dynamically rebound each time the program is run.
VARGRAPHIC(n) where n is greater than 127 but less
This dynamic rebinding can be avoided by
than or equal to 16383.
preprocessing the program again, once the predicate
has been corrected.
Note: This code is returned only when a program is
preprocessed.
+415
The corresponding columns,
column-number, of the operands of a
SQLSTATE 01582.
UNION or a UNION ALL do not have
System Action: Processing of the SQL statement has
comparable column descriptions.
ended. However, the statement has been recorded in
Explanation: The SQL statement contains SELECT
the package and it will be rechecked when the package
clauses connected by a UNION or UNION ALL, and
is executed. Preprocessing of the statement continues.
the corresponding columns in each SELECT clause
User Response: If this statement is not intended to be
cannot be compared. Specifically, columns of ordinality
executed on the application server that returned the
column-number of the operands in this UNION or
warning, the warning can be ignored. Otherwise,
UNION ALL cannot be compared. For columns to be
correct the long string column before the statement is
comparable, corresponding columns must be numeric,
executed, or modify the statement and preprocess the
character, graphic, date, time, or timestamp. Do not mix
program over again. If the condition is corrected before
these data types. If corresponding columns have field
the statement is executed, execution occurs normally.
procedures, both must have the same field procedure,
However, if the condition persists at execution time, the
and the same column CCSID value.
execution fails. In either case, the statement is
Note the following default data types for constants in a
dynamically rebound each time the program is run.
SELECT list:
This dynamic rebinding can be avoided by
preprocessing the program again, once the long string
v Alphanumeric constant: default data type is varying
column has been corrected.
character
244
Messages and Codes
SQLCODEs
v The stored procedure is unable to return num result
+419
The precision of the numerator and/or
sets due to the limit established in the RESULTSETS
the scale of the denominator are too
column of SYSTEM.SYSROUTINES.
large for decimal division.
v The stored procedure is unable to return num result
Explanation: The internal formula used to calculate
sets due to the DRDA limitations imposed by the
the resulting scale of decimal division is:
client. The DRDA client establishes this limit with the
Scale of result = 31 - np + ns - ds
MAXRSLCNT DDM code point.
Where np = precision of numerator,
ns = scale of numerator,
SQLSTATE: 01609
ds = scale of denominator.
System Action: The SQL statement is successful. The
SQLWARN9 field is set to ’Z’.
A negative resulting scale will cause incorrect results
due to internal decimal constraints. This may also
happen when you use the AVG() function.
+466
FORMAT 1
Procedure proc-name returned
Note: This code is returned only when a program is
num query result sets.
preprocessed.
FORMAT 2
Procedure proc-name returned
SQLSTATE 01583.
num query result sets for
AUTHID authid.
System Action: Processing of the SQL statement has
ended. However, the statement has been recorded in
Explanation: The stored procedure referenced
the package and it will be rechecked when the package
completed normally. The procedure returned the
is executed. Preprocessing of the statement continues.
number of query result sets specified in num.
User Response: If this statement is not intended to be
SQLSTATE: 01610
executed on the application server that returned the
System Action: The SQL statement is successful. The
warning, the warning can be ignored. Otherwise,
SQLWARN9 field is set to ’Z’.
modify the statement and preprocess the program over
again. If the condition is corrected before the statement
is executed, execution occurs normally. However, if the
+494
The number of result sets is greater than
condition persists at execution time, the execution fails.
the number of locators.
In either case, the statement is dynamically rebound
Explanation: The number of result set locators
each time the program is run. This dynamic rebinding
specified on the ALLOCATE LOCATORS statement is
can be avoided by preprocessing the program again,
less than the number of result sets returned by the
once the statement has been corrected.
stored procedure. The first ″n″ result set locator values
are returned, where ″n″ is the number of result set
+464
FORMAT 1
locator variables specified on the SQL statement.
Procedure proc-name returned
SQLSTATE: 01614
num query result sets, which exceeds
the defined limit integer
System Action: The SQL statement is successful.
FORMAT 2
User Response: Increase the number of result set
Procedure proc-name with AUTHID
locator variables specified on the SQL statement.
authid returned num
query result sets, which exceeds the
defined limit integer
+541
key-type name contains the same column
definitions as an existing entity.
Explanation: The stored procedure named by
proc-name completed normally. However, the stored
Explanation: The key-type is PRIMARY KEY,
procedure exceeded the defined limit on the number of
FOREIGN KEY, or UNIQUE CONSTRAINT.
query result sets the procedure can return.
name is the FOREIGN KEY or UNIQUE CONSTRAINT
num identifies the number of query result sets
key name that either the user specified or the system
returned by the stored procedure.
generated. For PRIMARY KEY, name is omitted.
integer identifies the defined limit on the number of
entity can be PRIMARY KEY, FOREIGN KEY, or
query result sets for the stored procedure
UNIQUE CONSTRAINT.
You receive a referential constraint warning because the
Only the first integer query result sets are returned to
FOREIGN KEY clause defines the same column list and
the application that issued the SQL CALL statement.
parent table as another referential constraint. You
receive a UNIQUE CONSTRAINT warning because the
The possible causes are as follows:
unique constraint defines the same column list as an
Chapter 18. SQLCODEs
245
SQLCODEs
existing UNIQUE CONSTRAINT or PRIMARY KEY.
executed on the application server that returned the
You receive a PRIMARY KEY warning because the
warning, the warning can be ignored. Otherwise,
PRIMARY KEY clause defines the same column list as
acquire the required authorization for the object before
an existing UNIQUE CONSTRAINT.
the statement is executed, or modify the statement and
preprocess the program over again. If the condition is
SQLSTATE 01543.
corrected before the statement is executed, execution
System Action: Processing of the SQL statement ends.
occurs normally. However, if the condition persists at
execution time, the execution fails. In either case, the
User Response: If you want to define a PRIMARY
statement is dynamically rebound each time the
KEY, drop the UNIQUE CONSTRAINT that causes the
program is run. This dynamic rebinding can be avoided
duplicate and define the PRIMARY KEY again. For the
by preprocessing the program again, once the required
other situations, you do not have to define the
authorization for the object is created.
FOREIGN KEY or UNIQUE CONSTRAINT again
because a similar entity already exists.
+552
user-id is not authorized to perform this
statement.
+551
User user-id does not have the
privilege-type privilege.
Explanation: An attempt was made to reference an
object that the user is not authorized to use, or the SQL
Explanation: An attempt was made to reference an
statement needs specific authority that the user does
object that the user is not authorized to use, or the SQL
not have.
statement needs specific authority that the user does
not have (for example, RUN authority). This can occur
Note: This code is returned only when the program is
if a user with DBA authority preprocesses a program,
being preprocessed with the NOEXIST option.
but because of the nature of the SQL statements in the
program, the DBA does not have the authority to grant
SQLSTATE 01542.
RUN authority to another user. For more information,
refer to the DB2 Server for VSE & VM Application
System Action: Processing of the SQL statement has
Programming manual for information on defining
ended. However, the statement has been recorded in
privileges on packages.
the package, and it will be rechecked when the
program is executed. Preprocessing of the statement
When this SQLCODE results from an SQL statement in
continues.
a program that an DB2 Server for VSE preprocessor is
processing, the statement is flagged in the DB2 Server
User Response: If this statement is not intended to be
for VSE package for rechecking when the program is
executed on the application server that returned the
executed. Preprocessing of the program continues. If
warning, the warning can be ignored. Otherwise, create
the condition is corrected before the statement is
the required object before the statement is executed, or
executed, execution occurs normally. However, if the
modify the statement and preprocess the program over
condition persists at execution time, the execution fails.
again. If the condition is corrected before the statement
In either case, the statement is dynamically rebound
is executed, execution occurs normally. However, if the
each time the program is run.
condition persists at execution time, the execution fails.
In either case, the statement is dynamically rebound
When this SQLCODE results from GRANT ALL, the
each time the program is run. This dynamic rebinding
grantor has no privilege on the object table or view
can be avoided by preprocessing the program again,
upon which he or she can grant privileges.
once the required object is created.
No error message is issued for GRANT ALL on a view
if the grantor has at least one grant privilege on the
+558
The WITH GRANT option is ignored
view.
because the GRANT is PUBLIC.
No error message is issued for GRANT ALL on a table
Explanation: Granting privileges to PUBLIC with the
as long as the grantor has at least one privilege.
GRANT option does not give PUBLIC the privilege to
grant to other users. Grant privileges cannot be passed
Note: This code is returned only when the program is
to PUBLIC.
being preprocessed with the NOEXIST option.
If PUBLIC is specified in a user list of GRANT ... WITH
SQLSTATE 01548.
GRANT OPTION, PUBLIC receives the granted
privileges without the grant option, while the other
System Action: Processing of the SQL statement has
users receive the granted privileges with the GRANT
ended. However, the statement has been recorded in
option.
the package, and it will be rechecked when the
program is executed. Preprocessing of the statement
For example, as a result of the statement:
continues.
GRANT SELECT ON TABLE1 TO USER1, PUBLIC, USER2
WITH GRANT OPTION
User Response: If this statement is not intended to be
246
Messages and Codes
SQLCODEs
USER1 and USER2 have the SELECT WITH GRANT
User Response: If this statement is not intended to be
privileges on TABLE1 while PUBLIC has only the select
executed on the application server that returned the
privilege.
warning, the warning can be ignored. Otherwise, check
that all the keys in which the table participates are
SQLSTATE 01516.
active, before the statement is executed, or modify the
statement and preprocess the program over again. If
System Action: The statement was executed
the condition is corrected before the statement is
successfully. The privileges are granted to PUBLIC
executed, execution occurs normally. However, if the
without the GRANT option.
condition persists at execution time, the execution fails.
In either case, the statement is dynamically rebound
+600
Automatic statistics collection was
each time the program is run. This dynamic rebinding
discontinued for the loading of table
can be avoided by preprocessing the program again,
owner.table-name.
once all the keys in which the table participates have
been checked.
Explanation: The Database Services Utility made a
request to begin collecting statistics for table
owner.table-name while adding rows to the table. After
+802
Exception error exception-type has
this request, the database manager detected that an
occurred during operation-type operation
index has been added to the table. The database
on data-type data, position
manager does not support this form of statistics
position-number.
collection for tables that have indexes defined on them.
Explanation: An arithmetic operation in the SQL
SQLSTATE Spaces.
statement has caused an exception condition. The
arithmetic operation can be in the select-list of the
System Action: The operation was executed
SELECT statement, the search condition of a SELECT,
successfully. The statistics accumulated thus far were
UPDATE or DELETE statement, or the SET clause of an
discarded. The database manager does not accumulate
UPDATE statement. exception-type, data-type,
statistics while the Database Services Utility loads rows
operation-type and position-number may be returned
into the specified table.
in SQLCA, depending on where the error was detected.
User Response: To get statistics for the specified table,
If the user is using ISQL or DBS Utility, only the first
the database manager must issue an UPDATE
occurrence of a +802 code on a query causes the
STATISTICS command for the table after the Database
message text to be displayed. If more +802s are
Services Utility has finished loading the table. If,
encountered, no more messages will be displayed even
instead, the Database Services Utility requests to
when the error type and operation are different. The
finalize statistics collection for the table, this request
indicator variable associated with the host variable in
fails because the database manager discarded the
error has been assigned a value of -2 to indicate the
statistics.
return of a NULL value. The associated data variable
remains unchanged. The following is a list of
exception-type values that can be tolerated by DB2
+668
Table owner.table-name is inactive and
Server for VSE:
you cannot access it.
v FIXED POINT OVERFLOW can occur during any
Explanation: No operation can be performed on this
arithmetic operation on either INTEGER or
table because at least one inactive key participates in a
SMALLINT fields.
relationship with this table.
v DECIMAL OVERFLOW exception can occur when
This may be a PRIMARY KEY, a FOREIGN KEY or a
one or more non-zero digits are lost because the
dependent FOREIGN KEY which references the
destination field in any decimal operation is too
PRIMARY KEY.
short to contain the result.
While an inactive key exists, only the table owner or a
v DIVIDE EXCEPTION can occur on a division
DBA can issue DML statements against the table. In
operation on any numeric field type (DECIMAL,
addition, no one can issue DML statements against an
FLOAT, SMALLINT, or INTEGER) by zero, or on a
active table which result in a reference to an inactive
decimal division operation when the quotient
table in order to enforce Referential Constraints. This
exceeds the specified data-field size.
code is returned only when a statement is being
v EXPONENT OVERFLOW can occur when the result
preprocessed.
characteristic of any floating point operation exceeds
™
the maximum value supported by System/370
SQLSTATE 01585.
architecture (approximately 7.2E+75).
System Action: Processing of the SQL statement has
ended. However, the statement has been recorded in
You can also get an exponent underflow when the
the package and it will be rechecked when the package
result characteristic of any floating-point operation
is executed. Preprocessing of the statement continues.
Chapter 18. SQLCODEs
247
SQLCODEs
exceeds the minimum value supported by System/370
v CALL statement cannot be the object of dynamic
Architecture (approximately 5.4E-79).
SQL statements : PREPARE, EXECUTE, or EXECUTE
IMMEDIATE.
SQLSTATE 01519.
v An attempt was made to prepare an ALLOCATE
CURSOR statement, but the statement identifier is
System Action: Processing of the SQL statement
already associated with a declared cursor.
continues.
User Response: Check the arithmetic operation and
SQLSTATE 42612.
the columns within the command to determine what
System Action: Processing of the SQL statement has
data may be causing the program exception. More
ended.
information can be found in the DB2 Server for VSE &
VM Interactive SQL Guide and Reference manual.
User Response: If the situation involves an invalid use
of the SQL CALL statement, correct the statement. Try
again.
+825
Operator command processing has been
completed successfully.
If the situation involves an invalid PREPARE of an
ALLOCATE CURSOR statement, change the application
Explanation: The database operator command has
program to use a statement identifier that is not
completed successfully and all output has been
associated with a declared cursor.
returned.
SQLSTATE 01541.
-101
SQL statement is greater than 8192
System Action: Normal processing continues.
positions or is greater than an internal
limitation of the system. Separate SQL
User Response: You may enter another database
statement into smaller statements.
operator command or a database statement.
Explanation: The SQL statement has caused an
internal limitation of the database manager to be
+863
The connection was successful but only
exceeded. By examining the SQLERRP of the SQLCA,
SBCS will be supported.
you can determine the nature of the exceeded
Explanation: The application requester supports only
limitation. See the following list:
the target application server’s SBCS CCSID. Either the
SQLERRP
Explanation
target application server’s mixed CCSID or graphic
CCSID (or both) is not supported by the application
ARIPBDL
Exceeded maximum SQL statement
requester. Application requester character data sent to
length of 8192 bytes when expanding
the target application server must be restricted to SBCS.
a host structure reference.
SQLSTATE 01539.
ARIPPAR
Exceeded maximum SQL statement
length of 8192 bytes when appending
System Action: The CONNECT statement is
the FOR UPDATE OF clause.
successful.
ARIPSQA
Exceeded maximum SQL statement
User Response: Do not execute any SQL statements
length of 8192 bytes.
which use either mixed data or graphic data in the
statement.
ARIPSQB
Exceeded maximum SQL statement
length of 8192 bytes.
Note: You may pass mixed and graphic data in host
ARIPSQC
Exceeded maximum SQL statement
variables.
length of 8192 bytes.
ARIPSQP
Exceeded maximum SQL statement
SQLCODEs -084 through -30090
length of 8192 bytes.
SQLCODEs -084 through -30090 are associated
ARITFST
Exceeded maximum SQL statement
with error conditions. The SQLCODE descriptive
length of 8192 bytes.
text identified for these SQLCODEs is displayed
ARIXECK
Exceeded maximum size of a key
as continuation lines for message ARI0503E.
because of an internal sort.
ARIXEPP
The SQL statement contains an
-084
Unacceptable SQL statement.
incorrect length. The length of the
Explanation: This SQL statement is unacceptable to
string should be from 0 to 8192.
DB2. One
of the following has occurred:
ARIXESX
SQL statement is too complex.
Exceeded database manager internal
limitations.
248
Messages and Codes
SQLCODEs
ARIXIAF
Exceeded maximum number of 32767
SQLSTATE 54001.
foreign keys.
System Action: Processing of this SQL statement ends.
ARIXOB2
Exceeded maximum number of 40
User Response: Either break the SQL statement into
join columns in an SQL statement.
smaller statements or try to remove unnecessary
The SQLERRD1 code for this first
conditions in the statement.
reason is -120 or -130.
Exceeded maximum number of 200
-102
Statement contains a string constant
predicates in an SQL query block
whose length exceeds 254 bytes. (An
(WHERE or HAVING clause). The
SBCS character counts as one byte and a
SQLERRD1 code for this second
DBCS character counts as two bytes. A
reason is -110.
hexadecimal constant is allowed a
ARIXOFC
Exceeded maximum number of 255
maximum of 254 numbers.)
column references in an SQL
Explanation: The SQL statement contains a string
statement.
constant whose length exceeds the allowed maximum
ARIXOFE
Exceeded maximum number of 32
of 254 bytes. When determining the length of this
table references in an SQL statement.
string constant, it is necessary to count each EBCDIC
The maximum refers to data
character as one byte and each graphic character as two
definition statements only (including
bytes. A hexadecimal constant has a maximum of 254
FROM list, views, and temporary
numbers, which result as 127 bytes. The beginning
tables).
graphic delimiter (shift-out) and the ending graphic
delimiter (shift-in) each count as one byte.
ARIXOFP
Exceeded maximum number of 400
predicates in an SQL statement.
SQLSTATE 54002.
ARIXOFQ
Exceeded maximum number of 16
System Action: If this error occurs during DB2 Server
queries in an SQL statement. Each
for VSE preprocessing, processing continues, but a new
view materialized is counted as a
package is not produced, and no SQLSTATE is issued.
query.
If the package existed previously, it is restored. If this
error occurs in other than a preprocessing run, the
ARIXOFT
Exceeded maximum number of 15
function ends.
tables in a FROM list.
User Response: Decrease the length of the constant
ARIXOML
Exceeded maximum number of 15
string and rerun.
table references in an SQL statement
(including FROM list, views, and
temporary tables).
-103
Statement contains the incorrect floating
point number number.
ARIXRST
Exceeded maximum size of a key
because of an internal sort.
Explanation: A floating-point number did not end
with a digit (exponent). For example, 12E is not correct,
If a SQLERRP is not shown in the preceding list, or
but 12E0 is correct.
SQLERRD1 = -199, the explanation is:
SQLSTATE 42604.
v The SQL statement is too complex, it exceeded SQL
System Action: Processing of the SQL statement has
internal limitations.
ended.
When an SQL statement is found to be too complex,
User Response: Correct the statement. Try again.
the complexity caused DB2 Server for VSE internal
storage or table limits to be exceeded. Possible causes
-104
A portion of the SQL statement is
for such complexity are if the command:
incorrect following or involving string.
v Contains a number of operations, especially
operations involving decimal or floating point
Explanation: The portion of the SQL statement shown
numbers.
in string is incorrect.
v Involves inserting a number of constants.
Some of the possible causes are:
v Involves a number of functions, especially those
v Format 2:
involving arithmetic functions. Refer to the DB2
A portion of the SQL statement is incorrect following
Server for VSE & VM SQL Reference manual for a
or involving DESCRIBE/ USING-descriptor.
complete list and description of column and scalar
functions.
v Format 3
v Involves a number of complex views.
Chapter 18. SQLCODEs
249
SQLCODEs
A portion of the SQL statement is incorrect following
System Action: Processing of the SQL statement has
or involving missing SQL statement in
ended.
PREPARE/EXEC.
User Response: Correct the statement. Try again.
v Format 4
A portion of the SQL statement is incorrect following
-106
SQL statement begins properly but is
or involving a literal, or a host variable is too long.
incomplete.
v Format 5
Explanation: The SQL statement was correct up to the
A portion of the SQL statement is incorrect following
point where no more input was found. This may be
or involving illegal format or length of SQL
caused by failure to properly end a literal. String
statement literal.
literals need a final quote mark.
v Format 6: A portion of the SQL statement is incorrect
following or involving a subquery in the SET clause.
SQLSTATEs:
v Format 7
42603
Unterminated string constant.
A portion of the SQL statement is incorrect following
42601
Anything else.
or involving the semicolon (;).
System Action: Processing of this SQL statement has
v Format 8
ended.
A portion of the SQL statement is incorrect following
or involving a missing semicolon (;).
User Response: Check that the statement has all the
necessary parts to complete the desired function and
v Format 9
that all clauses are complete.
A portion of the SQL statement is incorrect following
or involving an integer number that is larger than
For PL/I: Check that the SQL statement is complete
the maximum allowable number.
before the semicolon.
For Assembler: Check that the continuation rules are
A string of either :H or a question mark (?) displayed
properly followed. (A nonblank character must be in
in the message refers to a host variable found within
column 72, and continued lines must start in column 16
the SQL statement.
or beyond.)
SQLSTATEs:
For COBOL: Check that the SQL statement is complete
before END-EXEC.
42617
Statement string empty or blank.
42601
Everything else.
-107
The name name is too long. Maximum
System Action: Processing of this SQL statement has
allowable size is size.
ended.
Explanation:
User Response: Check the SQL statement for all
One of the following has occurred:
errors. Correct the statement and resubmit it.
v The SQL statement contains a name whose length
exceeds the maximum size. When determining the
-105
Either string1 string2 or the text that
length of this name, you must count each SBCS
follows is an incorrect sequence of
character as one byte and each DBCS character as
words or symbols, or string2 is an
two bytes. The beginning DBCS delimiter (shift-out)
incorrect or reserved keyword.
and the ending DBCS delimiter (shift-in) each count
as one byte.
Explanation: The SQL statement does not follow the
v NOFOR support was invoked and a name whose
rules for the statement type. The symbols printed in the
length exceeds the maximum size was found in the
message show where the error was encountered.
appended FOR UPDATE OF clause.
string2 is not allowed to appear in the statement in the
position where it was found. If either string1 or string2
was enclosed in double quotation marks ("), the
SQLSTATE 42622.
double-quote characters do not appear in the message.
System Action: If this error occurs during DB2 Server
If the symbol is a hexadecimal literal, it is not shown.
for VSE preprocessing, processing continues, but a new
(It is replaced by "X
".) If string1 or string2 appears
package is not produced, and no SQLSTATE is issued.
as :H or a question mark (?), that string refers to a host
If the package existed previously, it is restored. If this
variable, a field of a host structure, or an element of an
error occurs in other than a preprocessing run, the
indicator array found within the SQL statement. Strings
function ends.
of more than 34 characters may be truncated in the
message.
User Response: Shorten the length of the name and
rerun.
SQLSTATE 42601.
250
Messages and Codes
SQLCODEs
System Action: Processing of the SQL statement has
-108
The following user ID, password, server
ended.
name, or host variable does not have the
proper length: name.
User Response: Correct the statement. Try again.
Explanation: If name was an application program host
variable, the declared length of name was not exactly 8
-112
A column function was used incorrectly.
bytes (or 9 bytes in C) for the user ID or password, or
Either a column function is nested in a
was longer than 18 bytes (or 19 bytes in C) for a server
column function, or DISTINCT is used
name. If name was not a host variable, either the value
with an expression.
specified exceeded 8 bytes for a user ID or password,
Explanation: One of the following has occurred:
or exceeded 18 bytes for a server name.
v The statement contains one of the column functions
SQLSTATE 42622.
(AVG, MAX, MIN, COUNT, SUM) which contains
System Action: Processing of the SQL statement ends.
another column function. You cannot nest column
functions.
User Response: Correct the statement. Try again.
v If DISTINCT occurs inside a column function,
DISTINCT must be associated with a column name,
-109
You must provide an INTO clause on
not an expression. For example, COUNT(DISTINCT
the SELECT statement or the FETCH
QONHAND+QONORDER) is not permitted.
statement.
v If DISTINCT occurs inside a column function, the
function can only have the unary operators (+, -)
Explanation: An INTO clause is needed for a SELECT
applied to it. For example, -COUNT(DISTINCT
statement if written in an application program. The
PARTNO) is permitted; COUNT(DISTINCT
INTO clause may appear in the SELECT statement
PARTNO) + 10 is not permitted.
itself, or in a FETCH statement if the SELECT
statement was specified within a DECLARE CURSOR
Refer to the DB2 Server for VSE & VM SQL Reference
statement
manual for a complete list and description of column
functions.
SQLSTATE 42601.
System Action: Processing of this SQL statement has
SQLSTATE 42607.
ended.
System Action: Processing of the SQL statement has
User Response: Supply an INTO clause and
ended.
re-preprocess the program.
User Response: Correct the statement. Try again.
-110
The following incorrect function was
specified: function-type.
-114
The server name portion of
server-name1.creator.object does not match
Explanation: The function specified is not known to
the name of the connected application
the DB2 Server for VSE product. Refer to the DB2
server server-name2.
Server for VSE & VM SQL Reference manual for a
complete list and description of column and scalar
Explanation: The code is used to report that the server
functions.
name part (standalone or qualifying a column) does not
match the name of the connected application server.
SQLSTATE 42601.
This code is returned either when the statement is
being executed, or when the program is being
System Action: Processing of the SQL statement has
preprocessed with the EXIST option.
ended.
SQLSTATE 42961.
User Response: Correct the statement. Try again.
System Action: Processing of the SQL statement has
ended.
-111
A SELECT, HAVING, or WHERE clause
contains a column function without an
User Response: Correct server-name2 or use the
associated column name.
ERROR preprocessing option and try again. If the
statement is an SQL CALL, an SQL CONNECT may
Explanation: A SELECT, HAVING, or WHERE clause
need to be issued to the server server-name1 before
contains a column function that should be associated
issuing the SQL CALL statement.
with a column name. Refer to the DB2 Server for VSE &
VM SQL Reference manual for a complete list and
description of column and scalar functions.
SQLSTATE 42901.
Chapter 18. SQLCODEs
251
SQLCODEs
SQLSTATE 42902.
-115
The comparison operator, operator, was
used incorrectly. Follow SOME, ANY, or
System Action: Processing of the SQL statement has
ALL with a subselect. Follow IN or
ended.
NOT IN with a subselect or a list.
User Response: Correct the statement. Try again.
Explanation: One of the following has occurred:
v A comparison operator (=, ¬=, <>, <, >, <=, >=) was
-119
An item in a SELECT clause or in a
used with SOME, ANY, or ALL, but was not
HAVING clause was neither a column
followed by a subselect.
function nor a column in the GROUP
v A comparison involved a parenthesized list but the
BY clause.
list was not preceded by IN or NOT IN.
Explanation: One of the following has occurred:
SQLSTATE 42601.
v
The SELECT clause contains column functions which
imply grouping. At least one of the items in the
System Action: Processing of the SQL statement has
SELECT clause which is not a column function is not
ended.
in the GROUP BY clause. The following is an
example of an incorrect statement:
User Response: Correct the statement. Try again.
SELECT DEPTNO, DEPTNAME, AVG(SAL)
FROM EMPLOYEE GROUP BY DEPTNO
-116
The length of the following label is
greater than 30 bytes: label.
It should be:
Explanation: The length of the label for a column or
SELECT DEPTNO, DEPTNAME, AVG(SAL)
table exceeds the maximum of 30 bytes. Only the first
FROM EMPLOYEE GROUP BY DEPTNO,
30 bytes are displayed.
DEPTNAME
v
The SQL statement contains a HAVING clause which
SQLSTATE 42622.
includes a predicate which does not have a
System Action: Processing of the SQL statement has
group-qualifying property. The HAVING clause is a
ended.
search condition applied against each selected group.
Therefore, you cannot use a column or a column
User Response: Correct the statement and try it again.
function which is not a property of the selected
group. The following is an example of an incorrect
-117
The number of data values to be
statement:
inserted does not equal the number of
SELECT DEPTNO, AVG(SAL)
columns specified or implied.
FROM EMPLOYEE GROUP BY DEPTNO
HAVING SAL > 10000
Explanation: The number of data values on an
INSERT statement must equal the number of columns
It should be:
to be updated. Either too many or too few data values
were listed for the columns specified or implied.
SELECT DEPTNO, AVG(SAL)
FROM EMPLOYEE GROUP BY DEPTNO
This SQLCODE can be produced during
HAVING AVG(SAL) > 10000
re-preprocessing of a package, when the number of
columns that a table contained has been changed.
SAL > 10000 is incorrect because SAL is not part of
It can also be returned when either the statement is
the selected groups. Each group in the answer set
being executed, or when the program is being
only contains an AVG(SAL).
preprocessed with the EXIST option.
v
The SQL statement contains a SELECT clause or
column expression which contains a column function
SQLSTATE 42802.
on one side of the expression operator and a column
System Action: Processing of the SQL statement has
name on the other side. For example:
ended.
AVG(AGE) + SENIORITY.
User Response: Correct the statement. Try again.
Refer to the DB2 Server for VSE & VM SQL Reference
manual for a complete list and description of column
and scalar functions.
-118
A table to be modified cannot be
referenced in the subquery.
SQLSTATE 42803.
Explanation: You cannot change (INSERT, DELETE or
UPDATE) a table while naming it in the FROM clause
System Action: Processing of the SQL statement has
of a SELECT (subquery) used in the same SQL
ended.
statement.
User Response: Correct the statement. Try again.
252
Messages and Codes
SQLCODEs
System Action: Processing of the SQL statement has
-120
The argument of a column function is
ended.
not a correlated reference to a subselect
which contains a HAVING clause, or a
User Response: Correct the statement. Try again.
column function should not occur as the
value to be assigned to a column in the
-121
You cannot apply an INSERT or
SET clause of an UPDATE statement.
UPDATE to the same column more than
Explanation: One of the following has occurred:
once in the same statement.
v The argument of a column function contains a
Explanation: An attempt was made to change the
correlated reference, but the correlated reference does
same column in a table more than once in the same
not refer to a subselect that contains a HAVING
statement.
clause.
SQLSTATE 42701.
The following are invalid queries:
System Action: Processing of the SQL statement has
SELECT ENAME FROM EMP
ended.
WHERE AGE=MAX(AGE)
SELECT * FROM T0
User Response: Correct the statement. Try again.
WHERE T0.B = (SELECT SUM(T1.D)
FROM T1 GROUP BY T1.C HAVING
-124
More than 16 columns were used in an
SUM(T1.D) = (SELECT MIN(T2.F)
ORDER BY clause.
FROM T2 GROUP BY T2.E HAVING
MIN(T0.A) = T2.E))
Explanation: The maximum number of columns in an
SELECT * FROM T0
ORDER BY clause is 16.
WHERE T0.B = (SELECT SUM(T1.D)
FROM T1 GROUP BY T1.C HAVING
SQLSTATE 54005.
SUM(T1.D) = (SELECT T2.F
System Action: Processing of the SQL statement has
FROM T2 WHERE
ended.
MIN(T0.A) = T2.E))
User Response: Decrease the number of columns in
The following are valid queries:
the ORDER BY clause to sixteen or fewer and resubmit
SELECT MAX(AGE) FROM EMP GROUP BY ENAME
the statement.
HAVING MAX(AGE) > 1
SELECT SUM(T1.D) FROM T1 GROUP BY T1.C
-125
The statement contains ORDER BY
HAVING SUM(T1.D) = (SELECT MIN(T2.F) FROM
column-number. The ORDER BY clause
T2 GROUP BY T2.E HAVING
does not correspond to a column in the
MIN(T1.A) = T2.E)
SELECT clause.
SELECT SUM(T1.D) FROM T1 GROUP BY T1.C
HAVING SUM(T1.D) = (SELECT T2.F FROM T2
Explanation: The SQL statement contains an ORDER
WHERE MIN(T1.A) = T2.E))
BY column which does not point to a valid column in
the SELECT clause.
SELECT SUM(T0.B) FROM T0 GROUP BY T0.BB
HAVING SUM(T0.B) = (SELECT SUM(T1.D)
SQLSTATE 42805.
FROM T1 GROUP BY T1.C
HAVING SUM(T1.D) = (SELECT MIN(T2.F)
System Action: Processing of the SQL statement has
FROM T2 GROUP BY T2.E
ended.
HAVING MIN(T0.A) = T2.E))
User Response: Correct the statement. Try again.
SELECT SUM(T0.B) FROM T0 GROUP BY T0.BB
HAVING SUM(T0.B) = (SELECT SUM(T1.D)
FROM T1 GROUP BY T1.C
-126
A column to be updated is specified in
HAVING SUM(T1.D) = (SELECT T2.F FROM T2
the ORDER BY clause.
WHERE MIN(T0.A) = T2.E))
Explanation: The SQL query contains both a FOR
Column functions cannot be contained in the
UPDATE OF clause and an ORDER BY clause for the
SET-CLAUSE for column updates. Thus, the following
same column. The FOR UPDATE OF clause may have
is not allowed:
been appended when the NOFOR support was
invoked.
UPDATE EMP SET SAL=MAX(SAL) (invalid)
SQLSTATE 42829.
Refer to the DB2 Server for VSE & VM SQL Reference
System Action: Processing of the SQL statement has
manual for a complete list and description of column
ended.
and scalar functions.
User Response: Correct the statement. Try again.
SQLSTATE 42903.
Chapter 18. SQLCODEs
253
SQLCODEs
SQL statement contains too many table names.
-127
DISTINCT is specified more than once
in a query or subquery.
TABLE NAMES
-
15
v Format 6
Explanation: The SQL statement contains the keyword
DISTINCT more than once in the SELECT clause or
SQL statement contains too many selected columns.
HAVING clause.
SELECTED COLUMNS
-
255
SQLSTATE 42905.
v Format 7
SQL statement contains too many cursor references.
System Action: Processing of the SQL statement has
ended.
CURSOR REFERENCES
-
512
v Format 8
User Response: Correct the statement. Try again.
SQL statement contains too many CCSID overrides.
CCSID OVERRIDES
-
80
-128
The keyword, NULL, cannot be used as
a data value in a WHERE clause.
v
Format 9
Explanation: The NULL predicate was used as a data
value in a data items list associated with a search
SQL statement contains too many host identifiers.
condition predicate. This is not allowed. For example,
HOST IDENTIFIERS
-
512
the following statement is incorrect:
SELECT * FROM SAMPLE
Note: For Format 8, the 80 associated with CCSID
WHERE PARTNO IN (’SMITH’,NULL,’JONES’)
OVERRIDES refers to the number of UNIQUE
combinations of CCSID and data type. If you
It should be:
override the same data type with the same
CCSID for several different host variables or
SELECT * FROM SAMPLE
table columns, this constitutes one override only.
WHERE PARTNO IN (’SMITH’,’JONES’)
OR PARTNO IS NULL
SQLSTATEs:
SQLSTATE 42601.
54013
- Characters in host variables - Input
System Action: Processing of the SQL statement has
host variables - Output host variables
ended.
- Host identifiers.
User Response: Correct the statement. Try again.
54004
- Table names - Selected columns.
54019
- CCSID overrides
-129
SQL statement contains too many string.
System Action: Processing of the SQL statement ends.
Explanation: The string that may appear here is listed
If this error occurs during DB2 Server for VSE
below along with the allowed associated limits:
preprocessing, processing continues, but a new package
v Format 1
is not produced, and no SQLSTATE is issued. If the
SQL statement contains too many input host variable
package existed previously, it is restored. If this error
names.
occurs in other than a preprocessing run, the function
ends.
INPUT HOST VARIABLE NAMES
- 4096
(CHARACTERS)
User Response: For Formats 1 through 7, correct the
v Format 2
statement and try again. For Format 8, the correct user
response is determined by the cause of the error.
SQL statement contains too many output host
v This error can occur because you have overridden
variable names.
too many host variables in the SQLDA. Correct the
OUTPUT HOST VARIABLE NAMES
- 4096
situation by eliminating some of the overrides.
(CHARACTERS)
v This error can also occur if the columns which you
v Format 3
have selected from the table contain too many
SQL statement contains too many input host
unique combinations of CCSID and data type. Try
variables.
breaking your statement into one or more queries
each having no more than 80 CCSID overrides.
INPUT HOST VARIABLES
-
256
To determine which columns have overrides,
v Format 4
SELECT the CCSID column from the
SQL statement contains too many output host
SYSTEM.SYSCOLUMNS catalog table for each
variables.
column in your query. Those that differ from the
OUTPUT HOST VARIABLES
-
256
application server defaults are overrides. The CCSID
v Format 5
information for columns can also be obtained from
the SQLDA returned by a DESCRIBE operation. For
254
Messages and Codes
SQLCODEs
more information on CCSIDs, see the DB2 Server for
-133
You must use a column name, rather
VSE System Administration manual.
than an expression, as the argument of a
column function when that column is a
-130
A subquery was not enclosed in
correlated reference column in a
parentheses.
WHERE clause or HAVING clause.
Explanation: A subquery in the SQL statement is not
Explanation: The argument of a column function in a
enclosed in parenthesis.
WHERE clause or HAVING clause cannot be an
expression involving a correlated reference column; the
SQLSTATE 42601.
argument must be a column only. The following
System Action: Processing of the SQL statement has
example is incorrect:
ended.
SELECT DEPT,SUM(YEARS) FROM STAFF X
GROUP BY DEPT HAVING SUM(YEARS) >
User Response: Correct the statement. Try again.
ANY (SELECT AVG(YEARS) FROM STAFF
GROUP BY DEPT HAVING
MAX(YEARS) > MIN(1*X.YEARS))
-131
Either the LIKE predicate has an invalid
escape character, or the string pattern
The expression (1*X.YEARS) must not be the argument
contains an invalid occurrence of the
of the column function MIN. Refer to the DB2 Server for
escape character.
VSE & VM SQL Reference manual for a complete list
Explanation: For “column-name LIKE pattern”, the
and description of column and scalar functions.
escape character can only appear in the character
pattern if followed by itself, %, or _. You cannot use the
SQLSTATE 42906.
escape character when the column is defined as mixed
data, or the pattern is valid mixed data.
System Action: Processing of the SQL statement has
ended.
SQLSTATEs:.
User Response: Correct the statement. Try again.
22019
The LIKE predicate has an invalid escape
character.
-134
Improper use of the long string column
22025
The LIKE predicate string pattern contains an
column-name.
invalid occurrence of an escape character.
Explanation: The SQL statement references a long
System Action: Processing of the SQL statement has
string column improperly. The following items are not
ended.
allowed:
v A CREATE INDEX statement
Programmer response: Correct the string pattern, or
v A function other than SUBSTR or LENGTH
choose a different ESCAPE character and change the
v A GROUP BY clause
pattern accordingly.
v A PRIMARY KEY, FOREIGN KEY, or UNIQUE
clause
-132
LIKE or NOT LIKE is used incorrectly.
v A SELECT DISTINCT statement
You must precede it with a column
v A subselect of an INSERT
name and follow it with either a quoted
v A subselect of a UNION or UNION ALL
string, an input variable, or the special
v An expression in a SET clause of an UPDATE
register USER.
v An ORDER BY clause
v By itself in a predicate other than LIKE.
Explanation: LIKE or NOT LIKE is incorrectly
specified. In x [NOT] LIKE y, x must be a column
If it is none of the items listed above, it may be a long
name and y must be in quotation marks.
string column that is in a base table for a view that
must be materialized in order to process the SQL
If x appears in a WHERE clause when updating or
statement. View materialization is explained in the DB2
deleting from a view, it must not be derived from an
Server for VSE & VM Database Administration manual.
expression, a constant, or a scalar function in a VIEW
definition.
A long string column is either a LONG VARCHAR,
SQLSTATE 42824.
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.
Another format for this code is:
Format 2
Chapter 18. SQLCODEs
255
SQLCODEs
v Improper use of the long string input variable.
-140
The WITH CHECK OPTION cannot be
used for the specified view.
SQLSTATE 42907.
Explanation: The WITH CHECK OPTION cannot be
System Action: Processing of the SQL statement has
used in a view definition under the following
ended.
circumstances:
User Response: The use of long strings is described in
v The view is defined in such a way as to be read-only.
the DB2 Server for VSE & VM Application Programming
v The SELECT statement of the view contains a
manual. If you diagnose it as a view materialization
subselect.
restriction, define a view that does not include the long
string column. Correct the statement. Try again.
SQLSTATE 42813.
System Action: The statement cannot be processed.
-135
The input for a long string column in an
The specified view was not created.
INSERT statement or UPDATE
statement must be from a host variable
User Response: Refer to the DB2 Server for VSE & VM
or be the keyword NULL.
SQL Reference manual for rules regarding the use of the
WITH CHECK OPTION in the view definition.
Explanation: The UPDATE or INSERT is using
constants, column names, or subqueries where it
should be using NULL or a host variable.
-141
The INSERT or UPDATE is not allowed
because a resulting row does not satisfy
A long string column is either a LONG VARCHAR,
the view definition.
LONG VARGRAPHIC, VARCHAR(n) where n is
greater than 254 but less than or equal to 32767, or
Explanation: The WITH CHECK OPTION was
VARGRAPHIC(n) where n is greater than 127 but less
specified in the definition of the view (or on at least
than or equal to 16383.
one of the views on which this view is based), that is
the object of the INSERT or UPDATE
SQLSTATE 56033.
statement.Consequently, all attempts to insert or update
User Response: Refer to the DB2 Server for VSE & VM
in that view are checked to ensure that the results
Application Programming manual for information on the
conform to the view definition.
use of long strings. Correct the statement. Try again.
SQLSTATE 44000.
System Action: The statement cannot be processed.
-136
A package name consisting of more than
No inserts or updates were performed, and the
two parts is not supported.
contents of the object view (and underlying base table)
Explanation: A name consisting of more than two
remain unchanged.
parts was used for the package name of a DROP
User Response: Examine the view definition to
PACKAGE or an extended dynamic SQL statement.
determine why the requested INSERT or UPDATE was
This is not supported.
rejected.
SQLSTATE 56048.
System Action: Processing of the SQL statement ends.
-144
Invalid section number.
User Response: Correct the statement. Try again.
Explanation: The specified section number is invalid
for one of the following reasons:
v It exceeds the maximum section number supported
-137
The length resulting from operation is
by the database.
greater than size.
v The section number is already assigned to another
Explanation: The specified scalar operation operation
valid SQL statement (no error detected) that is not
gave a result whose length was greater than the
related to the current SQL statement.
acceptable maximum, size.
v The specified section number is less than zero.
SQLSTATE 54006.
SQLSTATE 58003.
System Action: Processing of the SQL statement has
ended.
System Action: The preprocessing of the program
ends. No package is created.
Programmer response: Correct the statement. Try
again.
User Response: Do not continue further processing.
Notify your system programmer of this distribution
protocol error.
256
Messages and Codes
SQLCODEs
v Format 5:
-149
The view cannot be used to modify data
because it is based on more than one
View limitations do not allow you to use the
table.
following operation: UNION in views.
Explanation: INSERT, DELETE, or UPDATE of a view
SQLSTATEs:
is not permitted if the VIEW is based on more than one
table.
42809
CREATE INDEX on a view
SQLSTATE 42807.
42909
Anything else.
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.
-151
A column of a view cannot be updated
-157
View owner.view-name cannot be
because it is derived from an
identified in a foreign key clause.
expression.
Explanation: The indicated view was identified in a
Explanation: A column of a view may be updated
FOREIGN KEY clause of a CREATE or ALTER TABLE
only if derived directly from a column of a base table.
statement. A FOREIGN KEY clause must identify a
table, not a view.
SQLSTATE 42808.
SQLSTATE 42810.
System Action: Processing of the SQL statement has
ended.
System Action: Processing of the SQL statement has
ended.
User Response: Correct the statement. Try again.
User Response: Correct the statement. Try again.
-153
You must specify a COLUMN name-list
in the CREATE VIEW statement because
-158
The CREATE VIEW statement failed.
a view column name is derived from an
The number of entries in the COLUMN
expression or a built-in function.
name-list is not equal to the number of
items in the SELECT clause.
Explanation: When a view column is not derived
directly from a column (for example, from an
Explanation: If a column name-list is specified on a
expression or function), a column name-list must be
CREATE VIEW statement, the number of column
supplied in the CREATE VIEW statement.
name-list entries (or view column names) must be
equal to the number of columns in the SELECT clause
Refer to the DB2 Server for VSE & VM SQL Reference
defining the view. For example, the following
manual for a complete list and description of column
command is not correct:
and scalar functions.
CREATE VIEW SAMPLE (SAMP1) AS
SQLSTATE 42908.
SELECT SUPPNO, PARTNO FROM QUOTATIONS
System Action: Processing of the SQL statement has
SQLSTATE 42811.
ended.
System Action: Processing of the SQL statement has
User Response: Correct the statement. Try again.
ended.
User Response: Correct the statement so that the
-154
View limitations do not allow you to
number of columns specified in the column name-list
use the following operation: operation.
for the view is equal to the number of columns in the
Explanation: Certain limitations exist when creating
SELECT clause.
views:
v Format 2:
-159
The following clause, keyword, or name
View limitations do not allow you to use either of
was expected, but not found in the SQL
the following operations: GROUP-BY or DISTINCT.
statement: string.
v Format 3
Explanation: A required keyword was incorrectly
View limitations do not allow you to use the
specified or was omitted from the SQL statement. Some
following operation: INPUT VARIABLES.
specific examples of this error are:
v Format 4
v Format 1:
View limitations do not allow you to use the
following operation: CURSOR REFERENCE.
Chapter 18. SQLCODEs
257
SQLCODEs
The following clause, keyword, or name was
error occurs in other than a preprocessing run, the
expected, but not found in the SQL statement: IN
function ends.
clause.
User Response: Correct the statement to use the
v
Format 2:
proper form of the PREPARE statement and rerun.
The following clause, keyword, or name was
expected, but not found in the SQL statement:
-160
Use or value of string1 is inconsistent
USING descriptor or FROM clause.
with the use or value of string2 in this
v
Format 3:
statement.
The following clause, keyword, or name was
Explanation: The user specification included parts of
expected, but not found in the SQL statement:
an SQL statement that are not allowed to coexist with
USING descriptor.
each other. Usually this is a result of using syntax that
v
Format 4:
is an incorrect mixture of two forms of an SQL
The following clause, keyword, or name was
statement. Some specific examples of this condition are:
expected, but not found in the SQL statement:
v
Format 1:
SETTING clause.
Use of FETCH is inconsistent with the use of
v
Format 5:
non-SELECT statement in this statement.
The following clause, keyword, or name was
expected, but not found in the SQL statement:
Note: The following is an example of where this can
SETTING or FOR clause.
occur:
v
Format 6:
stmt1=’DROP TABLE FRED’;
PREPARE STMT1 FROM :stmt1;
The following clause, keyword, or name was
DECLARE CURSOR c1 CURSOR FOR STMT1;
expected, but not found in the SQL statement: FROM
OPEN c1;
clause.
FETCH c1 USING DESCRIPTOR :SQLDA;
v
Format 7:
v
Format 2:
The following clause, keyword, or name was
Use of PUT is inconsistent with the use of
expected, but not found in the SQL statement:
non-INSERT statement in this statement.
DESCRIPTOR keyword.
v
Format 8:
Note: PUT cannot be executed against any statement
The following clause, keyword, or name was
but an INSERT. This is similar to Format 1.
expected, but not found in the SQL statement: SET
v
Format 3:
QUERYNO.
Use of the USING host variable clause is inconsistent
v
Format 9:
with the use of DECLARE CURSOR FOR INSERT in
The following clause, keyword, or name was
this statement.
expected, but not found in the SQL statement: host
variable or string constant in FROM clause.
Note: The USING clause cannot appear in the OPEN
v
Format 10:
statement for an insert-cursor.
The following clause, keyword, or name was
v
Format 4:
expected, but not found in the SQL statement:
Use of OPEN with cursor name host variable is
LANGUAGE.
inconsistent with the use of USING host variable list
v
Format 11:
in this statement.
The following clause, keyword, or name was
Note: An Extended OPEN must not use a host
expected, but not found in the SQL statement:
variable list (an SQLDA is needed).
EXTERNAL.
PREPARE s1 FROM ’SELECT * FROM t1
v
Format 12:
WHERE c1=?’;
The following clause, keyword, or name was
DECLARE c1 CURSOR FOR s1;
expected, but not found in the SQL statement:
OPEN :cur USING :hv1;
SERVER GROUP.
v
Format 5:
Use of OPEN with the cursor name host variable is
SQLSTATE 42601.
inconsistent with the use of the input variable in
System Action: If this error occurs during DB2 Server
DECLARE CURSOR FOR SELECT in this statement.
for VSE preprocessing, processing continues, but a new
v
Format 6:
package is not produced, and no SQLSTATE is issued.
Use of statement name is inconsistent with the use of
If the package existed previously, it is restored. If this
IN clause in this statement.
258
Messages and Codes
SQLCODEs
Note: An IN package-tag clause is not supported in
Note: In an Extended DECLARE CURSOR, the
a non-Extended EXECUTE, a non-Extended
cursor name must be a host variable.
DECLARE CURSOR, or a non-Extended
v
Format 14:
DESCRIBE statement. These statements are
Use of statement name is inconsistent with the use of
recognized as being Extended by virtue of the
cursor name host variable in this statement.
fact that package section is identified by a host
variable.
Note: In an Extended DECLARE CURSOR a
v
Format 7:
section-number host variable is required. A
Use of USING with the host variable list is
non-host variable statement name was
inconsistent with the use of Extended EXECUTE in
provided instead.
this statement.
v
Format 15:
Use of NEW is inconsistent with the use of
Note: An Extended EXECUTE must not use a host
KEEP/REVOKE in this statement.
variable list ( an SQLDA is needed).
CREATE PROGRAM PACK1 USING OPTIONS NEW, KEEP
v
Format 8:
v
Format 16:
Use of the USING clause or FROM clause is
inconsistent with the use of the non-Dynamic PUT
Use of EXECUTE is inconsistent with the use of
statement in this statement.
SELECT in this statement.
Note: A PUT statement that is linked to a static
Note: This is raised when a dynamic EXECUTE is
INSERT statement may not have either a
issued against a SELECT section. It is not
FROM clause or a USING clause.
issued when an Extended EXECUTE without
an OUTPUT DESCRIPTOR is issued against a
v
Format 9:
SELECT section.
Use of FETCH is inconsistent with the use of
v
Format 17:
DECLARE CURSOR FOR INSERT in this statement.
Use of FROM NULL is inconsistent with the use of
PREPARE SINGLE ROW in this statement.
Note: This differs from Format 1 in that it is for
static cursors, and is caught at program run
PREPARE SINGLE ROW FROM NULL
time.
v
Format 18:
v
Format 10:
Use of FOR is inconsistent with the use of PREPARE
Use of FETCH with cursor name host variable is
SINGLE ROW in this statement.
inconsistent with the use of INTO clause in this
PREPARE SINGLE ROW FROM :hv1 FOR :hv2
statement.
v
Format 19:
Use of OUTPUT descriptor is inconsistent with the
Note: An Extended FETCH must not use a host
use of statement name in this statement.
variable list (an SQLDA is needed).
v
Format 11:
Note: This is issued when a non-Extended
Use of cursor for SELECT is inconsistent with the use
EXECUTE statement contains an OUTPUT
of cursor name host variable in this statement.
DESCRIPTOR clause.
EXECUTE s1 USING OUTPUT DESCRIPTOR SQLDA
Note: A static DECLARE CURSOR statement cannot
v
Format 20:
exist with a host variable cursor name.
Use of value is inconsistent with the use of EXPLAIN
DECLARE :cur CURSOR FOR SELECT * FROM t1;
in this statement.
v
Format 12:
value = ALL
Use of CURSOR FOR INSERT is inconsistent with
REFERENCE
the use of cursor name host variable in this
STRUCTURE
statement.
COST
PLAN
Note: A static DECLARE CURSOR cannot exist with
v
Format 21:
a host variable cursor name.
Use of PUT is inconsistent with the use of DECLARE
DECLARE :cur CURSOR FOR INSERT
CURSOR for SELECT in this statement.
INTO t1 VALUES (’a’, ’b’);
v
Format 13:
Note: Similar to Format 9.
Use of cursor name constant is inconsistent with the
v
Format 22:
use of statement ID in this statement.
Use of CHECK/ERROR is inconsistent with the use
of MODIFY in this statement.
Chapter 18. SQLCODEs
259
SQLCODEs
v Format 23:
error occurs in other than a preprocessing run, the
function ends.
Use of EXECUTE is inconsistent with the use of
blocked INSERT in this statement.
User Response: Choose only one of the alternatives,
v Format 24:
or choose it only once. Repeat the run. Refer to the DB2
Server for VSE & VM SQL Reference manual for
Use or value of SERVER GROUP is inconsistent with
information about related options.
the use or value of DEFAULT SERVER GROUP in
this statement.
v Format 25:
-162
A name-type name is missing, is too long,
or contains incorrect characters.
Use or value of COMMIT ON RETURN is
inconsistent with the use or value of RESULT SETS
Explanation: SQL names must start with an alphabetic
in this statement.
character (A-Z) or national character (@, #, $) and may
follow with these alphabetic characters, national
SQLSTATEs:
characters, numbers (0-9), or underscore (_). Ordinary
identifiers (table names, column names, dbspace names,
24501
Format 1.
etc.), cursor names, and statement names are limited to
24503
Format 2.
a length of 18 characters. Authorization names,
passwords, and package names are limited to 8
07003
Format 16.
characters. When authorization names or passwords are
42601
Format 20.
specified as host variables, they are fixed-length
character variables of length 8 (or length 9 in C),
42867
Format 15, Format 22, Format 24, and Format
padded on the right with blanks.
25.
This message indicates a violation of the above rules
Spaces Format 3 through 14, Format 17 through 19,
for identifier contents or length, or the omission of an
and Format 21.
identifier of the indicated type.
System Action: If this error occurs during DB2 Server
Other formats of this code include:
for VSE preprocessing, processing continues, but a new
v Format 2
package is not produced, and no SQLSTATE is issued.
If the package existed previously, it is restored. If this
A cursor name is missing, is too long, or contains
error occurs in other than a preprocessing run, the
incorrect characters.
function ends.
v Format 3
User Response: Check the syntactical forms of the
Either a user ID or a package name is missing, is too
statement, correct the inconsistencies, and repreprocess
long, or contains incorrect characters.
the program or repeat the function.
v Format 4
Either a user ID or a package name is missing, is too
-161
You specified more than one alternative
long, or contains incorrect characters.
of the option option or else you specified
v Format 5
the option more than once.
A statement name is missing, is too long, or contains
Explanation: When options were offered, you chose
incorrect characters.
more than one. You can select only one. Specifically, the
v Format 6
following errors cause this message:
A user ID is missing, is too long, or contains
v In CREATE PACKAGE, both possibilities of an
incorrect characters.
option pair were chosen or a combination of more
v Format 7
than one possibility was chosen. For example, you
cannot specify option pairs such as REPLACE/NEW
A package name is missing, is too long, or contains
and KEEP/REVOKE, or a combination like
incorrect characters.
SBLOCK/BLOCK/NOBLOCK.
v Format 8
v Repeating an option may also cause this error
A qualifier or field name is missing, is too long, or
condition. For example, in CREATE PACKAGE,
contains incorrect characters.
options such as KEEP cannot be specified more than
once.
SQLSTATEs:
42601
name-type missing
SQLSTATE 42853.
42622
name-type too long
System Action: If this error occurs during DB2 Server
for VSE preprocessing, processing continues, but a new
42602
name-type incorrect.
package is not produced, and no SQLSTATE is issued.
System Action: If this error occurs during DB2 Server
If the package existed previously, it is restored. If this
260
Messages and Codes
SQLCODEs
for VSE preprocessing, processing continues, but a new
error occurs in other than a preprocessing run, the
package is not produced, and no SQLSTATE is issued.
function ends.
If the package existed previously, it is restored. If this
User Response: Correct the error in the specification
error occurs in other than a preprocessing run, the
of the constant and repreprocess the program or repeat
function ends.
the function.
User Response: Correct the error in the specification
of the identifier and repreprocess the program or repeat
-165
You cannot have leading or trailing
the function.
blanks in a delimited identifier.
Explanation: You have entered a delimited identifier
-163
A host variable is not allowed in this
(“
”) that contains either leading blanks, trailing
SQL statement.
blanks, or all blanks within the double quotes.
Explanation: This particular SQL statement does not
SQLSTATE 42602.
support the use of a host variable specification. In
particular, the DROP PACKAGE statement permits a
System Action: If this error occurs during DB2 Server
host variable name for the specification of the target
for VSE preprocessing, processing continues, but a new
program name, but other DROP statements require that
package is not produced, and no SQLSTATE is issued.
you specify a constant for the name of the entity that is
If the package existed previously, it is restored. If this
to be dropped.
error occurs in other than a preprocessing run, the
function ends.
SQLSTATE 42618.
User Response: Correct the statement. Try again.
System Action: Processing of the SQL statement has
ended.
-166
A graphic constant began incorrectly.
User Response: Correct the statement. Try again.
Explanation: All graphic constants must be started
and ended with the proper shift-out and shift-in
-164
A graphic constant was not ended
characters. The SQL form of graphic constant is:
correctly.
G’so...data...si’
Explanation: All graphic constants must be started
or
and ended with the proper shift-out and shift-in
N’so...data...si’
characters. The SQL form of graphic constant is:
G’so...data...si’
This form can be used in ISQL, COBOL programs, and
or
DBS Utility. In these situations, a graphic constant was
N’so...data...si’
started with G’, or with N’, but a so character was not
found following it.
This form can be used in SQL statements, COBOL
programs, and DBS Utility.
In a PL/I program, a graphic constant was started
improperly. For instance, the SQL form was used
If this error occurred in a COBOL program or in DBS
(G'so...data...si' or N'so...data...si'). The correct formats
Utility, a graphic constant was started properly with G’
for a PL/I graphic constant are (format 1):
so or N’ so and the terminating si was found, but the
soX’427D’...data...X’427D42C7’si
si was not followed by an ending quote.
or (format 2):
In a PL/I program, a graphic constant was started
’so...data...si’G
properly, but was not ended properly. The correct
or
formats for a PL/I graphic constant are (format 1):
’so...data...si’N
soX’427D’...data...X’427D42C7’si
SQLSTATE 42604.
or (format 2):
System Action: If this error occurs during DB2 Server
’so...data...si’G
for VSE preprocessing, processing continues, but a new
or
package is not produced, and no SQLSTATE is issued.
’so...data...si’N
If the package existed previously, it is restored. If this
error occurs in other than a preprocessing run, the
SQLSTATE 42604.
function ends.
System Action: If this error occurs during DB2 Server
User Response: Correct the statement. Try again.
for VSE preprocessing, processing continues, but a new
package is not produced, and no SQLSTATE is issued.
If the package existed previously, it is restored. If this
Chapter 18. SQLCODEs
261
SQLCODEs
characters, a graphic string must have properly paired
-167
You specified either an odd number of
bytes, and not be too long.
hexadecimal characters or incorrect
hexadecimal characters in a hexadecimal
The SQL form of a graphic string is:
constant.
G’so...data...si’
or
Explanation: Characters other than 0-9 or A-F were
N’so...data...si’
found in a hexadecimal constant (for example,
X’0F2AG4’) where G is not permitted. This can also
This form can be used in ISQL, COBOL programs, and
result from failure to provide an even number of
DBS Utility. In these situations, the termination
hexadecimal characters (for example, X’0F429C6’).
sequence for a graphic constant (a si (X’0F’) character
SQLSTATE 42606.
followed by an apostrophe) was detected, but it either
was not found in the proper byte positions or was
System Action: If this error occurs during DB2 Server
incomplete following the graphic constant string. The
for VSE preprocessing, processing continues, but a new
terminating sequence should follow a pair of bytes.
package is not produced, and no SQLSTATE is issued.
Instead it was found following a single byte or not
If the package existed previously, it is restored. If this
found.
error occurs in other than a preprocessing run, the
function ends.
There are two formats for a PL/I graphic constant,
User Response: Correct the statement. Try again.
(format 1):
soX’427D’..data...X’427D42C7’
-168
You specified an incorrect parameter
parameter or parameter value.
or (format 2):
’so...data...si’G
Explanation: The parameter or the value for the
or
parameter named is not valid. For example, the value is
’so...data...si’N
above or below the value limit, or it is an incorrect
value type.
In a PL/I program, the following conditions in a
SQLSTATE 42615.
graphic constant in an SQL statement can cause this
error:
System Action: If this error occurs during DB2 Server
for VSE preprocessing, processing continues, but a new
v A DBCS apostrophe within the DBCS constant was
package is not produced, and no SQLSTATE is issued.
started with only one X’427D’. The correct form
If the package existed previously, it is restored. If this
requires two: X’427D427D’, for both formats.
error occurs in other than a preprocessing run, the
v The beginning of the ending sequence of the DBCS
function ends.
constant (X’427D’) was not followed by X’42C7’
(format 1 only).
User Response: Correct the statement. Try again.
The correct formats for inserting a graphic apostrophe
-169
Incorrect continuation of a graphic
within a PL/I graphic constant are (format 1):
constant.
soX’427D’...X’427D427D’...data...
X’427D42C7’si
Explanation: A graphic literal in an SQL statement
must be contained on one line in a source program.
or (format 2):
SQLSTATE Spaces.
’so...X’427D427D’...data...si’G
System Action: Processing continues, but a new
or
package will not be produced. If the package existed
’so...X’427D427D’...data...si’N
previously, it will be restored.
v After so (X’0E’), a si (X’0F’) (both formats) was not
found on an even byte boundary within the length
User Response: Correct the error in the continuation
limit (18 bytes for identifiers and 254 bytes for
and repreprocess the program.
constants) in order to terminate graphic data.
-170
A graphic string either is too long, is
If the graphic option is YES, so/si pairings are imposed
improperly terminated, or contains bytes
on host variable and label names, and character
that are incorrectly paired for graphic
constants in PL/I and COBOL. A violation of this rule
strings.
causes SQLCODE -170.
Explanation: All graphic strings must be started and
The scan for proper termination continued to the end
ended with the proper shift-out and shift-in characters.
of the SQL statement or to the limit of 127 graphic
In addition to the proper shift-out and shift-in
characters for character string constants in dynamic
262
Messages and Codes
SQLCODEs
SQL statements, and to the limit of the line for the SQL
argument
statements imbedded in a host language program.
function-type number
reason
HEX
1
exceeds 127 in length
SQLSTATE 42604.
and >63 DBCS for
System Action: If this error occurs during DB2 Server
graphic
for VSE preprocessing, processing continues, but a new
HOUR
1
timestamp, time,
package is not produced, and no SQLSTATE is issued.
DECIMAL(6,0),
If the package existed previously, it is restored. If this
DECIMAL(20,6)
error occurs in other than a preprocessing run, the
function ends.
INTEGER
1
not numeric
User Response: Provide the correct termination of a
graphic constant or decrease the size of a graphic
MICROSECOND1
timestamp,
constant. Try again.
DECIMAL(20,6)
MINUTE
1
timestamp, time,
-171
The data type, length, or value of
DECIMAL(6,0),
argument argument-number of
DECIMAL(20,6)
function-type is invalid.
Explanation: The above message is issued under the
MONTH
1
date, timestamp,
following circumstances:
DECIMAL(8,0),
DECIMAL(20,6)
argument
function-type number
reason
CHAR
1
DATE or TIME
SECOND
1
timestamp, time,
DECIMAL(6,0),
2
must be USA or ISO or
DECIMAL(20,6)
EUR or JIS or LOCAL
STRIP
1
not short character
com-
patible or graphic
CONCATENATE
not both character or
both
2
not L T or B (without
graphic
quotes)
3
not a character or
graphic
DATE
1
character string=7,
constant of length 1
timestamp, date or
3
does not match
positive NUMBER
datatype of
STRING
DAY
1
date, timestamp,
DECIMAL(8,0),
SUBSTR
1
not character
DECIMAL(20,6)
compatible
or graphic
DAYS
1
date or timestamp
2
less than 0 or greater
than
DECIMAL
1
not numeric
max_length(no decimal
2
less than 1 or greater
or
than
float
31
3
less than 0
2
not a numeric constant
greater than
3
less than 0 or greater
max_length -
than
START + 1 (no numeric
PRECISION
constant=zero
3
not a numeric constant
TIME
1
TIMESTAMP or TIME
DIGITS
1
not SMALLINT,
INTEGER or DECIMAL
TIMESTAMP
1
TIMESTAMP, CHAR
STRING=8 or 14
FLOAT
1
not numeric
Chapter 18. SQLCODEs
263
SQLCODEs
System Action: Statement execution fails.
argument
function-type
number
reason
User Response: Change the isolation level specified
2
TIME
on the WITH clause.
TRANSLATE
1
not short character
-180
The string representation of a date/time
com-
value has invalid syntax.
patible or graphic
4
not a character constant
Explanation: The string representation of a date/time
of
value does not conform to the syntax, or does not meet
length 1
the minimum length requirements of any supported
formats.
VALUE
incompatible types
SQLSTATE 22007.
System Action: The statement cannot be executed.
VARGRAPHIC
1
not character or
character
User Response: Check that the datetime value
compatible
conforms to the syntax of a supported format such as
1
exceeds 127 characters
ISO, JIS, EUR, USA, or LOCAL. Correct the value
where required.
YEAR
1
date, timestamp,
DECIMAL(8,0),
-181
The string representation of a date/time
DECIMAL(20,6)
value is not a valid date/time value.
Explanation: The string representation of a datetime
value contains a value that is out of range.
Note: Long strings are only allowed for LENGTH and
The proper ranges for datetime values are as follows:
SUBSTR. See description for limitations.
v
0001 to 9999 for years.
v
1 to 12 for months.
SQLSTATEs:
v
1 to 31 for days; except when the month is 4, 6, 9, or
22011
An argument of SUBSTR is out of range
11 when the proper range is 1 to 30 days; or when
the month is 2 when the proper range is 1 to 28 days
42815
Anything else.
in a non-leap year or the proper range is 1 to 29 days
System Action: Processing of the SQL statement has
in a leap year.
ended.
v
0 to 24 for hours. If the hour is 24, the other parts of
Programmer response: Correct the statement. Try
the time, including the microsecond part of a
again.
TIMESTAMP value, are zero.
v
0 to 59 for minutes.
-172
The number of arguments specified for
v
0 to 59 for seconds.
function-type is invalid.
Note: The above ranges do not apply to LOCAL
Explanation: A SQL statement has specified the scalar
format values.
function function-type with either too many or too few
arguments. Refer to the DB2 Server for VSE & VM SQL
SQLSTATE 22007.
Reference manual for a complete list and description of
column and scalar functions.
System Action: The statement cannot be executed.
SQLSTATE 42605.
User Response: Provide a value within the valid
range. Try again.
System Action: The statement cannot be executed.
User Response: Correct the statement. Try again.
-182
An arithmetic expression with a
date/time value is invalid.
-173
UR is specified on the WITH clause but
Explanation: The specified arithmetic expression
the cursor is not read-only.
contains an improperly used date/time value or labeled
Explanation: The cursor is not read-only. WITH UR
duration.
can be specified only if the database manager can
SQLSTATE 42816.
determine that the cursor is read-only.
System Action: The statement cannot be executed.
SQLSTATE 42801.
264
Messages and Codes
SQLCODEs
User Response: Correct the indicated arithmetic
v COL1 = 3 DAYS + 4 MONTHS
expression. Try again.
v SELECT 10 YEARS FROM TABLE1
v DAYS(4 YEARS)
-183
An arithmetic operation on a date or
SQLSTATE 42816.
timestamp has a result that is not within
the valid range of dates.
System Action: The statement cannot be executed.
Explanation: The result of an arithmetic operation is a
User Response: Correct the statement. Try again.
date or timestamp that is not within the valid range of
dates, which are between ’0001-01-01’ and ’9999-12-31’.
-189
An invalid CCSID value ccsid_value was
SQLSTATE 22008.
specified.
System Action: The statement cannot be executed.
Explanation: The ccsid_value was invalid for one of the
following reasons:
User Response: Examine the SQL statement to
v Not in range of 1 to 65534
determine the cause of the problem. The problem may
v Not compatible with specified subtype.
be data-dependent, in which case you must examine
v Not supported by the DB2 Server for VSE database
the data that was processed at the time the error
management system.
occurred.
SQLSTATE 22522
-184
Invalid parameter in a date/time
System Action: Processing of the SQL statement ends.
arithmetic expression or scalar function
argument list.
User Response: Correct the statement. Try again.
Explanation: The specified arithmetic expression
contains a parameter marker improperly used, or the
-191
A mixed data value is improperly
parameter marker is used as a scalar function
formed. Reason Code = reason-code.
argument.
Explanation: The mixed data contained an improperly
SQLSTATE 42610.
formed DBCS portion. This could be a missing
X'0E'(shift-out), or X'0F'(shift-in), or a stranded half
System Action: The statement cannot be executed.
byte of a DBCS character. The reason codes for this
User Response: Correct the indicated arithmetic
message are:
expression. Try again.
1. Conversion of the input statement.
2. Conversion of the input data, either constant or host
-185
The application uses the local format
variable.
option with a date or time, but the local
3. Conversion of internal data during a column to
exit has not been installed.
column move.
Explanation: The local format option has been used
4. Conversion of internal data during a column to
with a date or time value but no date or time exit has
column compare.
been installed. This error may occur if the LOCAL
5. Conversion of internal data during a scalar function
option is used with the CHAR function, or if the
computation.
SYSOPTIONS table indicated that an exit for date or
6. Conversion of internal data during datetime
time was supplied, but in fact the exit has not been
arithmetic with a character operand.
installed.
7. Conversion of output data to host variable.
SQLSTATE 57008.
System Action: The statement cannot be executed.
SQLSTATE 22504.
User Response: Contact your system programmer
System Action: Processing of the SQL statement ends.
about installation of the date or time exit.
User Response: Correct the data. Try again.
-187
Invalid use of labeled durations.
-192
function-type scalar function does not
Explanation: Labeled durations such as 10 MONTHS
allow the first argument to be of
can only be used in a valid datetime arithmetic context.
MIXED subtype.
They are not to be used as stand-alone expressions
Explanation: You used an expression (column, host
such as COL1 > 5 DAYS.
variable, constant, and so on) of MIXED subtype as the
Some examples that cause this SQLCODE to be issued
first argument of the STRIP or TRANSLATE scalar
are:
function. This is not allowed.
Chapter 18. SQLCODEs
265
SQLCODEs
SQLSTATE 42937.
Or, if you are the owner of the table, you can
enter it as:
System Action: Processing of the SQL statement has
SELECT DESCRIPTION FROM INVENTORY,
ended.
QUOTATIONS WHERE INVENTORY.PARTNO
User Response: Correct the statement. Try again.
= QUOTATIONS.PARTNO
SQLSTATE 42703.
-198
A null SQL statement has resulted.
System Action: Processing of the SQL statement has
Explanation: Only the SQL statement delimiters were
ended.
found. This results in a null SQL statement. The SQL
statement start delimiter is EXEC SQL. The SQL
User Response: Correct the statement. Try again.
statement end delimiter depends on the host language
and can be one of the following:
-202
Column column-name was not found in
v Assembler - absence of a continuation marker
any table referenced by the statement.
v C, PL/I - semi-colon
v COBOL - END-EXEC
Explanation: Since the column name column-name
was unqualified, all the columns associated with the
SQLSTATE Spaces.
tables or views in the SQL statement were searched and
column-name was not among them.
System Action: The empty statement is marked as
incorrect. Processing of the statement ends.
This SQLCODE may result if you use the double
quotation character (") to mark the beginning and
User Response: Check the program to find the empty
ending of a character string constant, instead of using
statement and determine if any SQL statements are
the single quotation character (’) required by SQL. For
missing. Correct the program and resubmit it.
example, the following query generates SQLCODE -202
because the system attempts to use "STORED
-201
The following name was not found in
QUERIES" as a column name, not a character string
the FROM clause: name.
constant:
SELECT * FROM SYSTEM.SYSCATALOG
Explanation: One of the following has occurred:
WHERE TNAME="STORED QUERIES"
v Column reference table qualifier is not in the FROM
clause.
This query should be:
v Column reference table qualifier is in the FROM
SELECT * FROM SYSTEM.SYSCATALOG
clause but it is an unexpected table name.
WHERE TNAME=’STORED QUERIES’
v Correlation variable used in the SELECT clause is not
in the FROM clause that follows.
Note: This code is returned when either the statement
v WHERE clause table name qualifier or correlation
is being executed, or the program is being
variable not found in a FROM clause. It may be any
preprocessed with the EXIST option.
FROM clause that precedes it.
SQLSTATE 42703.
v ORDER BY clause table name qualifier or correlation
variable is not found at the outer most query level.
System Action: Processing of the SQL statement has
v GROUP BY clause table name qualifier or correlation
ended.
variable is not found at the outer most query level.
User Response: Correct the statement. Try again.
Note: If a table-name in a FROM clause is qualified by
an owner and this table-name is used to qualify
-203
The unqualified column column-name
a column reference in a WHERE clause, ORDER
was found in more than one table in the
BY clause, GROUP BY clause, or HAVING
FROM clause.
clause, the column reference qualifier must also
Explanation: The SQL statement contained a column
include the owner along with the table-name. As
name column-name which was not associated with a
an example, the following is incorrect:
specific table. The column name must be qualified so
SELECT DESCRIPTION FROM SQLDBA.INVENTORY,
that it can be associated with a table in the FROM
SQLDBA.QUOTATIONS WHERE INVENTORY.PARTNO
clause.
= QUOTATIONS.PARTNO
SQLSTATE 42702.
It must be entered as:
System Action: Processing of the SQL statement has
SELECT DESCRIPTION FROM SQLDBA.INVENTORY,
ended.
SQLDBA.QUOTATIONS WHERE SQLDBA.INVENTORY.
PARTNO = SQLDBA.QUOTATIONS.PARTNO
User Response: Correct the statement. Try again.
266
Messages and Codes
-204
owner.object-name was not found in the
-206
The key-type constraint-name on
system catalog.
owner.table-name was not found.
Explanation: The name owner.object-name specified in
Explanation: Key-type can be a PRIMARY KEY,
the message text is incorrect. This code is returned
FOREIGN KEY, or UNIQUE CONSTRAINT. For a
when either the statement is being executed, or the
primary key, constraint-name is omitted.
program is being preprocessed with the EXIST option.
The SQL statement containing a primary key, foreign
The owner.object-name referenced may not be the direct
key constraint, or unique constraint was not found for
object name being manipulated. You may need to check
the named table. Either you specified the
the system catalog tables to identify the type of object
constraint-name incorrectly, or the key or constraint
missing.
does not exist for the specified table.
SQLSTATEs:
This code is returned when either the statement is
42809
DROP VIEW table or DROP TABLE
being executed, or the program is being preprocessed
with the EXIST option.
42704
Anything else.
SQLSTATE 42704.
System Action: Processing of the SQL statement has
ended.
System Action: Processing of the SQL statement ends.
User Response: Create the required object or provide
User Response: Create the required key or constraint,
the correct name of the object. Try again.
or provide the correct name for the desired key or
constraint.
If the required object is one of the EXPLAIN tables, you
can use a supplied A-type source member (ARISEXP)
to create the EXPLAIN tables. See the DB2 Server for
-207
A column name is not allowed in an
VSE & VM SQL Reference manual for details about the
ORDER BY clause of a UNION.
ARISEXP source member. The implicit EXPLAIN
Explanation: The UNION involves an ORDER BY
version of this SQLCODE is -649.
clause which contains a column name in the order-list.
If the specified object is a stored procedure, use the
The order-list must contain only integers.
CREATE PROCEDURE statement to define the stored
SQLSTATE 42706.
procedure. If the specified object is a stored procedure
server, use the CREATE PSERVER statement to define
System Action: Processing of the SQL statement has
the stored procedure server. Once the stored procedure
ended.
or stored procedure server has been defined, issue
User Response: Correct the statement. Try again.
START PSERVER or START PROC to activate the new
definition.
-208
The column column-name was specified
Note: If the CREATE statement has already been
in the ORDER BY clause but does not
issued for the PROCEDURE, ensure that it has
appear in the SELECT clause.
been committed. The CALL statement searches a
Explanation: The ORDER BY clause contains a column
cache for the procedure being called, and the
name column which is not in the SELECT clause.
cache entry is not made until the unit of work in
which the CREATE statement was issued has
SQLSTATE 42707.
been committed.
System Action: Processing of the SQL statement has
ended.
-205
Column column was not found in table
User Response: Correct the statement. Try again.
creator.table.
Explanation: The SQL command contained a column
-209
A column name appears more than once
name column which cannot be found in the table
in the SELECT clause, but is not
specified in the message text.
qualified in the ORDER BY clause.
SQLSTATE 42703.
Explanation: The column name in the ORDER BY
System Action: Processing of the SQL statement has
clause should be qualified so that it can be associated
ended.
with the appropriate column in the SELECT clause.
User Response: Correct the statement. Try again.
SQLSTATE 42702.
System Action: Processing of the SQL statement has
ended.
User Response: Correct the statement. Try again.
267
-210
Incorrect symbol used in either a cursor
-301
The data type of a host variable or
name, owner name, package name, or
parameter is not compatible with the
statement name.
target data type.
Explanation: One of the following has occurred:
Explanation: It was found that the data type of the
input host variable or parameter is not compatible with
v A cursor name, owner name, program name, or
the target data type:
statement name contained characters other than A-Z,
0-9, $, @, #, or underscore.
v If the target column or parameter is CHAR,
VARCHAR, or LONG VARCHAR, the input host
v In a non-extended dynamic statement a cursor name,
variable or parameter must also be character data.
owner name, program name, or statement name
started with a character other than A-Z, $, @, or #.
v If the target column or parameter is GRAPHIC,
VARGRAPHIC, or LONG VARGRAPHIC, the input
v In an extended dynamic statement a cursor name,
host variable or parameter must also be graphic data.
owner name, program name, or statement name
started with a character other than A-Z, $, @, #, or
v If the target column or parameter is INTEGER,
0-9.
SMALLINT, FLOAT, or DECIMAL, the input host
variable or parameter must also be numeric data. If
SQLSTATE 42602.
the host variable is DECIMAL, the data passed to the
database manager at execution time in the host
System Action: Processing of the SQL statement has
variable must be a number in decimal format.
ended. A package is not produced if the error occurs
v If the target column or parameter is DATE, TIME, or
during preprocessing within a statement that is not an
TIMESTAMP, the input host variable or parameter
extended dynamic statement.
must be CHAR or VARCHAR.
User Response: When the error occurs in an extended
v If the column in a LIKE predicate is CHAR,
dynamic statement, rollback the logical unit of work,
VARCHAR, or LONG VARCHAR, the ESCAPE
correct the error causing the incorrect name, and rerun
character must also be character data. If the column
the preprocessor. Otherwise, just correct the name and
in a LIKE predicate is GRAPHIC, VARGRAPHIC, or
rerun the preprocessor.
LONG VARGRAPHIC, the ESCAPE character must
also be graphic data.
-211
The table name or correlation name
name appears more than once in the
The problem typically occurs on an INSERT or
FROM clause.
UPDATE statement. It also occurs on an SQL CALL
statement if a host variable is specified for a parameter,
Explanation: One of the following conditions was
and the data type of the host variable is incompatible
found in the FROM clause of the SQL statement:
with the expected data type of the parameter. In this
1. You repeated a table name (or view name) name
case:
without associated correlation names to distinguish
v If the parameter is defined correctly in
each occurrence.
SYSTEM.SYSPARMS, you must modify the calling
2. You repeated a correlation name name.
application to provide a host variable with a data
3. You have identical correlation names name and
type that is compatible with the parameter. You must
table names (or view names) in the same clause,
then repeat the steps from preprocessing to execution
and you repeated the name as a column qualifier.
of the calling application.
v If the parameter is defined incorrectly in
SQLSTATE 42712.
SYSTEM.SYSPARMS, then you must:
1. Issue the STOP PROC operator command with
System Action: Processing of the SQL statement ends.
the REJECT option to stop the procedure
User Response: The actions below correspond to the
2. Use the DROP PROCEDURE statement to remove
numbered conditions above:
the existing definition
1. Use a unique correlation name with each occurrence
3. Use the CREATE PROCEDURE statement to
of the replicated table name (or view name).
redefine the procedure
2. Use distinct correlation names with the same clause.
4. Issue the START PROC operator command to
3. Use a correlation name that differs from all table
activiate the procedure
names (view names) in the same clause.
SQLSTATEs:
Use correlation names as column qualifiers.
07006
if the statement is Dynamic
42895
if the statement is Static
268
Messages and Codes
System Action: Processing of the SQL statement has
precision of decimal variables is enforced and some
ended.
applications that insert data into decimal columns may
receive this error.)
User Response: Check data type of column or
parameter and correct the input host variable or
This problem most typically occurs on INSERT or
parameter. You must repeat the steps from
UPDATE where the data type and length assigned to
preprocessing to execution of the program.
the parameter marker is that of the column being
inserted into or updated.
-302
An input host variable or parameter is
invalid for the target column or
Any one of the following size conditions may have
parameter.
occurred for the assumed parameter marker data type:
Explanation: The problem typically occurs on an
v CHAR or VARCHAR (including VARCHAR >254),
INSERT or UPDATE statement. It also occurs on an
but the host variable contains a character string that
SQL CALL statement when a host variable is specified
is too long.
for an input parameter, and the data type of the host
v GRAPHIC or VARGRAPHIC (including
variable is incompatible with the expected data type of
VARGRAPHIC >127), but the host variable contains
the parameter. In this case:
a character string that is too long.
v If the parameter is defined correctly in
v INTEGER, but the host variable contains decimal or
SYSTEM.SYSPARMS, you must modify the calling
float data that is too large or too small for INTEGER.
application to provide a host variable with a data
v SMALLINT, but the host variable contains decimal,
type that is compatible with the parameter. You must
float, or integer data that is too large or too small for
then repeat the steps from preprocessing to execution
SMALLINT.
of the calling application.
v DECIMAL, but the host variable contains float,
v If the parameter is defined incorrectly in
decimal, integer, or small integer data that is too
SYSTEM.SYSPARMS, then you must:
large or too small for the assumed DECIMAL
1. Issue the STOP PROC operator command with
precision or scale.
the REJECT option to stop the procedure
v FLOAT, but the host variable contains a float value
2. Use the DROP PROCEDURE statement to remove
that is too large or too small in value.
the existing definition
3. Use the CREATE PROCEDURE statement to
See the DB2 Server for VSE & VM SQL Reference manual
redefine the procedure
for a description of numeric data type maximums and
minimums.
4. Issue the START PROC operator command to
activiate the procedure
This problem can also occur when the assumed data
type of the parameter marker in the ESCAPE clause of
If the error occurred on an INSERT or UPDATE
a LIKE predicate is:
statement, then either the data type and length of your
input host variables are not compatible with the target
v CHAR or VARCHAR (including VARCHAR > 245),
column, or the data type and length assigned to the
but the length of the ESCAPE character is not 1
parameter markers are not compatible with the target
v GRAPHIC or VARGRAPHIC (including
column.
VARGRAPHIC > 127), but the length of the ESCAPE
character is not 2.
DB2 Server for VSE assigns a data type and length to a
parameter marker. It gets the data type and length
SQLSTATEs:
contextually from the expression in which the
22001
Character or graphic string is too long
parameter marker is used. As a result, a host variable
for column.
can be too large if it exceeds the assumed length of the
parameter marker for which it is being substituted. Or,
22003
Numeric overflow or underflow.
in numeric data, a host variable can be too large if its
numeric value exceeds the size that can be handled by
22024
NUL missing from C NUL-terminated
the assumed data type (for example, greater than 32767
string with length greater than 1.
for SMALLINT).
System Action: Processing of the SQL statement has
ended.
If this SQLCODE is received after migration by an
application that previously executed successfully, refer
User Response: Check the target column or parameter
to the appendixes in the DB2 Server for VSE & VM SQL
type and correct the host variable or input parameter
Reference manual about the incompatibilities between
so that the data will fit in the target column or
the DB2 Server for VSE and SQL/DS releases of
parameter, or correct the length of the host variable or
software for more information about the problem. (For
parameter. If an SQL statement is modified, you must
example, as of SQL/DS Version 3 Release 2, the
269
|
||
|
|
|