Db2 Spatial Extender function messages
Messages returned by Db2 Spatial Extender functions are typically embedded in an SQL message. The SQLCODE returned in the message indicates if an error occurred with the function or that a warning is associated with the function.
- The SQLCODE -443 (message number SQL0443) indicates that an error occurred with the function.
- The SQLCODE +462 (message number SQL0462) indicates that a warning is associated with the function.
The following table explains the significant parts of this sample message:
DB21034E The command was processed as an SQL statement because it was
not a valid Command Line Processor command. During SQL processing it
returned: SQL0443N Routine "DB2GSE.GSEGEOMFROMWKT"
(specific name "GSEGEOMWKT1") has returned an error
SQLSTATE with diagnostic text "GSE3421N Polygon is not closed.".
SQLSTATE=38SSL
Message part | Description |
---|---|
SQL0443N | The SQLCODE indicates the type of problem. |
GSE3421N | The Db2 Spatial Extender message
number and message type. The message numbers for functions range from GSE3000 to GSE3999. Additionally, common messages can be returned when you work with Db2 Spatial Extender functions. The message numbers for common messages range from GSE0001 to GSE0999. |
Polygon is not closed | The Db2 Spatial Extender message explanation. |
SQLSTATE=38SSL | An SQLSTATE code that further identifies
the error. An SQLSTATE code is returned for each statement or row.
|
An example of an SQL0443 error message
Suppose that you attempt to insert the values for a polygon into the table POLYGON_TABLE, as shown in the following statement:
INSERT INTO polygon_table ( geometry )
VALUES ( ST_Polygon ( 'polygon (( 0 0, 0 2, 2 2, 1 2)) ') )
DB21034E The command was processed as an SQL statement because it was
not a valid Command Line Processor command. During SQL processing it
returned: SQL0443N Routine "DB2GSE.GSEGEOMFROMWKT"
(specific name "GSEGEOMWKT1") has returned an error
SQLSTATE with diagnostic text "GSE3421N Polygon is not closed.".
SQLSTATE=38SSL
The SQL message number SQL0443N indicates that an error occurred and the message includes the Spatial Extender message text GSE3421N Polygon is not closed.
When you receive this type of message, review the detailed explanation and recommended user response in the message reference for GSE3421N or in the long text message retrieved with the SYSPROC.GET_MESSAGE procedure.
- Locate the GSE message number within the Db2 or SQL error message.
- Use the Db2
help command (Db2 ?) to see the Spatial Extender message
explanation and user response. Using this example, type the following command in an operating system
command line prompt:
DB2 "? GSE3421"