Previous Topic: RC 2017Next Topic: SVC or z/OS PC Error Codes


DB2 Mode Codes

CA Datacom allows you to specify a DB2 Mode for SQL processing. DB2 Mode is available only if your site has purchased CA Datacom DB2 Transparency.

When a program is executing in DB2 mode, the SQL Manager passes a value to the SQLCODE field of the SQL Communications Area (SQLCA) after each SQL statement is processed. If no error is indicated, the value is zero. If an error is indicated, the SQL Manager provides a DB2 SQL error code.

The following table provides the DB2 codes, the equivalent CA Datacom code, and the meaning of the code. For a detailed explanation of the reason and corrective action for each code, see the explanation of the equivalent CA Datacom code in SQL Codes.

DB2 Code

CA Datacom Code

Meaning

0

0

The command was successful.

100

100

No row was found.

-84

-002

Query string is empty.

-101

-032

Statement is too large too compile.

-104

-020

Syntax error.

-109

-110

ORDER BY is not allowed in a view definition.

-112

-072

Cannot nest column functions.

-117

-054

Unequal number of columns and values.

-117

-057

Specified more columns or values than the table has.

-118

-162

Cannot INSERT and SELECT on the same table.

-119

-073

Selected columns must be in the GROUP BY clause.

-119

-103

Must use column functions if HAVING clause with no GROUP BY.

-120

-012

Column functions not allowed in SET clause of query.

-121

-55

Duplicate names in the INSERT/ALTER/CREATE data elements list.

-122

-075

Cannot use column functions with no GROUP BY clause.

-125

-066

Illegal number in order specification.

-127

-080

Only one DISTINCT clause allowed per query.

-129

-026

Exceeds maximum number of tables/views permitted in query.

-150

-079

INS/DEL/UPD function not allowed on GROUP BY/ORDER BY query.

-150

-111

The view is not updatable because it contains a subquery.

-151

-113

The view's column is not updatable.

-153

-184

Column name list required on CREATE VIEW containing a nonsimple column.

-158

-155

Number of columns in view not equal to number in query.

-160

-018

CHECK option is not allowed on non-updatable views.

-161

-156

UPDATE/INSERT rejected. Row violates the WHERE clause of the view.

-180

-226

No M after the A or P or too many colons in a TIME string.

-180

-227

There must be an M after the A or P in a TIME string.

-180

-223

A TIME string cannot contain more than one A.

-180

-224

A TIME string cannot contain more than one P.

-180

-225

A TIME string cannot contain more than one BLANK before the A or P.

-180

-228

Too many nodes in CHARACTER string.

-180

-229

Too many digits per node in string.

-180

-230

The value of a node is out of range.

-180

-231

Only two slashes are allowed.

-180

-232

No AM or PM found in TIME character string with one colon.

-180

-233

Number of colons must be 1 or 2.

-180

-234

Found an M, but no A or P to go with it.

-180

-235

Number of periods can only be 2.

-180

-236

Number of dashes can only be 3.

-180

-237

Number of digits for microseconds cannot exceed 6.

-180

-238

Unrecognizable DATE/TIME format.

-181

-193

Century cannot be larger than 99.

-181

-198

Year cannot be larger than 99.

-181

-199

Month is not between 1 and 12 inclusive.

-181

-200

Day out of range for month and year.

-181

-201

Hour cannot be greater than 24.

-181

-204

Microsecond cannot be greater than 99.

-181

-202

Minute cannot be greater than 59.

-181

-203

Second cannot be greater than 59.

-181

-218

Cannot determine Julian date.

-181

-219

Julian date has gone negative.

-182

-277

Unknown duration type.

-204

-179

Constraint not found.

-204

-015

AUTHID not defined.

-204

-034

Illegal correlation name.

-204

-124

Plan does not exist.

-206

-009

Illegal column name.

-208

-070

ORDER BY column is not SELECTed.

-301

-044

Invalid data type indicator.

-303

-159

Host variable incompatible with column.

-305

-001

Column requires NULL indicator variable. None found.

-401

-041

Left side of expression not compatible with right side.

-401

-194

It is invalid to add these two data types.

-401

-195

It is invalid to subtract these two data types.

-402

-043

Column function on invalid data type.

-406

-004

Number value overflow.

-407

-086

Null not allowed in column.

-408

-052

Cannot update column to incompatible data type.

-408

-058

Column's data type is incompatible with INSERT value's data type.

-412

-071

Selecting more than one item in a subquery.

-415

-083

Data types in columns do not match.

-421

-082

Each query in a union must have the same number of projected columns.

-501

-135

Invalid cursor state.

-504

-133

Cursor not declared.

-510

-152

Maximum number of tables exceeded for operation.

-518

-122

Statement not found.

-518

-134

Unknown dynamic/cursor statement.

-530

-176

Foreign key value violation.

-531

-175

Foreign key reference violation.

-542

-182

Unique/primary key cannot be specified due to nullable column.

-554

-008

Cannot GRANT privileges to yourself.

-555

-003

Cannot REVOKE privileges from yourself.

-559

-559

Security Facility is not enabled.

-601

-165

Duplicate constraint name.

-604

-151

Invalid precision or scale specification on a column.

-680

-060

Too many columns specified for a table.

-803

-263

Duplicate key xxxxx value rejected.

-811

-142

More than one row selected.

-811

-148

Subquery returned more than one row.

-818

-120

Program and plan do not match.

 

-999

A condition for which there is no equivalent DB2 code. The CA Datacom SQL code and other CA Datacom diagnostic information is placed in the SQLCA.