db2se run_gc command

The db2se run_gc command runs a geocoder in batch mode on a geocoded column.

The information that is associated with the specified geocoded column is no longer available from the DB2GSE.ST_GEOCODING and DB2GSE.ST_GEOCODING_PARAMETERS catalog views.

Authorization

The user ID must hold one of the following authorities or privileges to run this command:
  • DATAACCESS authority on the database that contains the table on which the specified geocoder is to operate
  • CONTROL privilege on this table
  • UPDATE privilege on this table

Command syntax

db2se run_gc command

Read syntax diagramSkip visual syntax diagramrun_gcdatabase_name-userIduser_id-pwpassword -tableSchematable_schema-tableNametable_name -columnNamecolumn_name -geocoderNamegeocoder_name-parameterValuesparameter_values-whereClausewhere_clause-commitScopen

Command parameters

Where:
database_name
Specifies the name of the database for which you want to run a geocoder in batch mode on a geocoded column.
-userId user_id
Specifies the database user ID that has DATAACCESS authority on the database indicated by database_name.
-pw password
Specifies the password for user_id.
-tableSchema table_schema
Specifies the schema name for the specified table_name. If you do not specify a schema name, the value in the CURRENT SCHEMA special register is used as the schema name for the table or view.
-tableName table_name
Specifies the unqualified name of the table for the specified column_name. The table_name value is converted to uppercase unless you enclose it in double quotation marks.
-columnName column_name
Identifies the column name into which the geocoded data is to be inserted or updated. The column_name value is converted to uppercase unless you enclose it in double quotation marks.
-geocoderName geocoder_name
Uniquely identifies the geocoder that is to perform the geocoding. The geocoder_name value is converted to uppercase unless you enclose it in double quotation marks. The maximum length for this parameter is 128 characters.
-parameterValues parameter_values
Specifies the list of geocoding parameter values for the geocoder function. If this parameter is not specified, the values that are used are either the parameter values that were specified when you set up the geocoder or the default parameter values that were specified when you register the geocoder.
You must specify the parameter values in the order that the function defined them, and separate them with a comma. For example:
default_parm1_value,default_parm2_value,...
Each parameter value must be an SQL expression. Follow these guidelines to specify default parameter values:
  • If a value is a string, enclose it in single quotation marks.
  • If a parameter value is a number, do not enclose it in single quotation marks.
  • If the parameter value is null, cast it to the correct type. For example, specify the following expression to indicate a NULL for an integer parameter: CAST(NULL AS INTEGER).
  • If the geocoding parameter is to be a geocoding column, do not specify a default parameter value.

Use two consecutive commas (...,,...) to omit values for parameters that you indicated a value when you set up or register the geocoder.

The maximum length for this parameter is 32,672 characters.

-whereClause where_clause
Specifies the text for a search condition of a WHERE clause to filter the set of records to be geocoded. If this parameter is not specified, the where_clause value specified during the geocoding setup is used. If a where_clause value was not specified during the geocoding setup, all the rows in the table are geocoded.

You can specify a clause that references any column in the table or view that the geocoder is to operate on.

Do not specify the keyword WHERE in where_clause.

The maximum length for this parameter is 32,672 characters.

-commitScope n
Specifies that a COMMIT is to be performed after every n records are geocoded. If this parameter is not specified, the value specified with the -commitScope parameter during the geocoding setup is used. If this parameter is not specified and a value was not specified during the geocoding setup, a COMMIT is performed at the end of the operation. One COMMIT at the end of the operation can result in large log file utilization and data lost on operations that are interrupted.

Examples

The following example runs a geocoder in batch mode to populate a column named MYCOLUMN in a table named MYTABLE.
db2se run_gc mydb -tableName mytable -columnName mycolumn