Use this stored procedure to export a layer and its associated table to a shape file, or to create a new shape file and export a layer and its associated table to this new file.
For an example of the code for invoking this stored procedure, see the C function gseExportShape in the sample program. For information about this program, see Writing applications for DB2 Spatial Extender.
The user ID under which this stored procedure is invoked must hold the SELECT privilege on the table that is to be exported.
Input parameters
Table 18. Input parameters for the db2gse.gse_export_shape stored procedure.
Name | Data type | Description |
---|---|---|
layerSchema | VARCHAR(30) | Name of the schema to which the table specified in the layerTable
parameter belongs.
This parameter is nullable. Comment: If you do not supply a value for the layerSchema parameter, it will default to the user ID under which the db2gse.gse_export_shape stored procedure is invoked. |
layerTable | VARCHAR(128) | Name of the table that you are exporting.
This parameter is not nullable. |
layerColumn | VARCHAR(30) | Name of the column that has been registered as the layer that you are
exporting.
This parameter is not nullable. |
fileName | VARCHAR(128) | Name of the shape file to which the specified layer is to be
exported.
This parameter is not nullable. |
whereClause | VARCHAR(1024) | The body of the SQL WHERE clause. It defines a restriction on the
set of records to be geocoded. The clause can reference any attribute
column in the table that you are exporting.
This parameter is nullable. |
Output parameters
Table 19. Output parameters for the db2gse.gse_export_shape stored procedure.
Name | Data type | Description |
---|---|---|
msgCode | INTEGER | Code associated with the messages that the caller of this stored procedure can return. |
Reserved | VARCHAR(1024) | Complete error message, as constructed at the DB2 Spatial Extender server. |
Restriction
You can export only one layer at a time.