DB2 Server for VSE: Messages and Codes


Chapter 7. ARI0500-ARI0511 SQL Messages


The SQL messages are associated with the SQLCODEs. These messages provide general information; they do not give detailed descriptions of the cause of the error. The SQLCODE appears in message ARI0505I. The text following messages ARI0501 and ARI0503 is the SQLCODE descriptive text. To find the explanation and related action, refer to Chapter 17, SQLCODEs of this manual.

ARI0500ISQL processing was successful.

Explanation: The processing of the SQL statement was successful. This message occurs only when SQLCODE = 0 and no SQL warning conditions occurred during SQL statement processing. This message is followed by message ARI0505I, which indicates the SQLCODE and ROWCOUNT information.

System Action: Normal completion.

ARI0501IAn SQL warning has occurred. SQLCODE descriptive text

Explanation: This message occurs when either:

This message is followed by message ARI0505I, which provides the SQLCODE and ROWCOUNT information, and in the first two conditions, the ARI0502I message that indicates the specific warning conditions.

The SQLCODE descriptive text describes the SQLCODE error condition.

System Action: SQL statement processing completed successfully.

User Response: For an SQLCODE greater than zero, take action based upon the SQLCODE descriptive text. For the SQLCODE of zero, take action defined for message ARI0502I. For an SQL code of less than zero, correct the problem described in the SQLCODE descriptive text before the application program is executed.

ARI0502IFollowing SQL warning conditions encountered: {truncation | NULLIGNORED | mismatch | NULLWHERE | performance | implicit rollback | adjustment | ineligible | no storage | can't fit 2}.

Explanation: Each of the SQL processing warning condition keywords is directly associated with an SQLCA SQLWARN indicator. The applicable SQLWARN indicator is identified in the explanation of each keyword.

TRUNCATION (SQLWARN1) - one or more of the requested data items was truncated due to insufficient space in the declared program variable. By examining the null indicator variables of the data items returned, you can find which data items were truncated. A positive value in the null indicator denotes actual length before truncation.

Set to W, if the value of a string column was truncated when it was assigned to a host variable.

Set to Z, if mixed character data was truncated and the resulting data does not follow the proper rules regarding mixed data.

Set to Z, if both W and Z truncations occur.

NULLIGNORED (SQLWARN2) - set to W, if null values were ignored in the computation of a column function such as AVG, SUM, MAX, MIN, or COUNT.

MISMATCH (SQLWARN3) - set to W, if the number of target variables in the INTO clause is less than the number of items in the SELECT list.

If the number of target variables in the INTO clause is greater than the number of items in the SELECT list, then the warning flag will not be set.

NULLWHERE (SQLWARN4) - set to W, if an UPDATE or DELETE command has been used without a WHERE clause. The user should verify that the update or deletion was intended unconditionally on the entire table.

PERFORMANCE (SQLWARN5) - set to W, if a WHERE clause, represented internally by one or more search arguments, associated with a SELECT statement has exceeded a DB2 Server for VSE internal limitation. This means that a performance degradation will result because the database manager will not internally convert eligible predicates to search arguments. The database manager may still choose to use indexes for eligible predicates, but if not, degradation may further be increased since a DBSPACE scan would be used to retrieve query data. Decreasing the number of predicates, such as by removing unnecessary conditions which may exist in the WHERE clause of the SELECT statement, may alleviate this condition.

IMPLICIT ROLLBACK (SQLWARN6) - the logical unit of work is no longer active. It has been rolled back due to a system failure.

Set to W, when the database manager is forced to terminate a logical unit of work.

Set to S, when the database manager issues a severe SQLCODE.

ADJUSTMENT (SQLWARN7) - set to W, when an adjustment has been made to a derived date or timestamp value for the last day of the month.

Set to Z, when the divisor or dividend of a DECIMAL divide operation requires readjustment in order to complete the divide operation. This may affect the accuracy of the quotient (result).

INELIGIBLE (SQLWARN8) - set to W, if the statement is disqualified for blocking for reasons other than storage, such as use of long fields.

Set to Z, if a character that could not be converted was replaced with a substitute character.

NO STORAGE (SQLWARN9) - set to W, if there was insufficient storage for blocking and therefore blocking is cancelled for the subject cursor.

CAN'T FIT 2 (SQLWARNA) - set to W, if blocking factor of at least two rows cannot be maintained and therefore blocking is cancelled for the subject cursor.

System Action: Normal completion; SQL statement processed successfully.

User Response: Take appropriate action based upon warning condition.

ARI0503EAn SQL error has occurred. SQLCODE descriptive text

Explanation: Processing of the SQL statement was not successful. This message is followed by message ARI0505I, which provides the SQLCODE and ROWCOUNT information, and message ARI0504I, which indicates the condition that caused the error message.

SQLCODE descriptive text is derived from SQLCODE descriptive text modules. Multiple lines of SQLCODE descriptive text may appear.

System Action: SQL statement was not processed.

User Response: Take action based on the SQLCODE descriptive text. For additional information on the specific problem, refer to the appropriate SQLCODE in the section Chapter 17, SQLCODEs, or use the SQLCODE number as the topic for the ISQL HELP command (for example: enter HELP -105).

ARI0504ISQLERRP: pppppppp SQLERRD1: nnn SQLERRD2: nnn.

Explanation:

SQLERRP
RDS module name, preprocessor module name, Resource Adapter module name, or RUN-TIME that set either the warning flag or the SQLCODE.

RUN-TIME means that an error occurred while a DB2 Server for VSE data manipulation statement was being executed.

If an error occurs while the statement is being preprocessed, the RDS module name is displayed. If the error occurs in the run-time access generator (when the statement is being executed), the message text may contain either the RDS module name or the literal string RUN-TIME. The RUN-TIME message is issued when the error is one that cannot be trapped by the access generator run-time modules and is handled by the DB2 Server for VSE abend handler. For example, division by zero or an arithmetic overflow.

SQLERRD1
Secondary return code value set by module pppppppp. This value, along with the module name, can be used by persons responsible for locating problems within the database manager itself. This information is not usually of interest to others. However, if the SQLCODE is -314, the SQLERRD1 value denotes the reason why a host variable was incorrectly declared. Refer to SQLCODE -314 for more information.

SQLERRD2
Return code value set by DBSS or the Resource Adapter. The definition of the Resource Adapter return codes can be found under Chapter 19, DB2 Server for VSE Reason Codes. See Chapter 16, DBSS Return Codes for definitions of the DBSS return codes.

This message follows messages ARI0503E (or ARI0533E) and ARI0505I.

System Action: See System Action for the associated ARI0503E (or ARI0533E) message.

User Response: See User Response for the associated ARI0503E (or ARI0533E) message.

ARI0505ISQLCODE = nnn [SQLSTATE = nnnnn] ROWCOUNT = nnn

Explanation: This message follows messages ARI0500I, ARI0501I, and ARI0503E (or ARI0533E). In the case of DELETE statements, it only appears when the number of dependent rows affected is greater than zero.

SQLCODE= nnn:

nnn < 0
SQL statement processing has not been completed because an error occurred.

nnn = 0
SQL statement processing completed. Warning may or may not indicate an error.

nnn > 0
This indicates a warning. SQL statement processing completed but one or more unusual conditions occurred.

The text following message ARI0501I or ARI0503E is the SQLCODE descriptive text. To find the explanation and related action, either refer to the section Chapter 17, SQLCODEs in this manual or enter a HELP command for the SQLCODE indicated.

SQLSTATE=nnnnn, where nnnnn is a 5-digit number associated with an SQLCODE. See Chapter 18, SQLSTATEs for a list of SQLSTATE values.
Note:The application server does not issue an SQLSTATE value if the error occurs during DB2 Server for VSE preprocessing.
ROWCOUNT = nnn, where nnn is a value that indicates:

UPDATE
the number of rows updated.

INSERT
the number of rows inserted.

DELETE
the number of rows deleted.

For any other SQL statement or catalog migration, the value of ROWCOUNT is not applicable.

System Action: See System Action for the associated SQLCODE.

User Response: See User Response for the associated SQLCODE.

ARI0506I Dependent rows affected = n.

Explanation: This message appears only for DELETE statements when the number of dependent rows affected is greater than zero. The command caused changes to dependent tables because of referential constraints with a rule of SET NULL or CASCADE. The number (n) of dependent rows affected is reported.

System Action: Processing of the command continues.

ARI0511ESQL message formatter error. Reason Code = nn.

Explanation: The SQL Message Formatter Routine has encountered incorrect parameter values being passed to it by some system internal calling routine.

REASON CODE = nn:

nn = 10
The MSGID SQLTEXT flag is set ON but the SQLMSGNO field does not contain either of the valid values, 501 or 503.

nn = 20
The MSGID SQLTEXT flag is set OFF with one or more of the MSGID fields nonzero and either the MSGNO field is not equal to the SQLMSGNO field, or the SEQNO field is not greater than 1.

System Action: Processing of the current SQL statement has ended. A return code value of 20 is returned to the calling routine in register 15.

User Response: Notify your system programmer.

System Programmer Response: Make a record of what went wrong and contact the designated support group for your installation.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]