Quando tento importar um shapefile usando o db2se, especifico as colunas de entrada a serem carregadas na sintaxe como o COLUMN NAME
db2se import_shape <dbname> -userId <username>
-pw <password> -fileName <shapefile to be loaded> -inputAttrColumns N(Cat_Zones) -srsName WGS84_SRS_1003 -tableSchema GEXPDBA -tableName TPOLYGON_STAGING -tableAttrColumns VC_FLD_1 -createTableFlag 0 -spatialColumn POLYGON_OB -typeSchema db2gse -typeName st_multipolygon -messagesFile C:\ABC1.txt -client 1
GSE2112N The column "CAT_ZONES" cannot be found in the dBASE file.
Mas se eu substituir pelo parâmetro POSITIONAL, funciona.
db2se import_shape <dbname> -userId <username>
-pw <password> -fileName <shapefile to be loaded> -inputAttrColumns P(1) -srsName WGS84_SRS_1003 -tableSchema GEXPDBA -tableName TPOLYGON_STAGING -tableAttrColumns VC_FLD_1 -createTableFlag 0 -spatialColumn POLYGON_OB -typeSchema db2gse -typeName st_multipolygon -messagesFile C:\ABC1.txt -client 1
GSE0000I The operation was completed successfully.
Qualquer motivo para isso acontecer. As informações do shapefile são as seguintes.
db2se shape_info -filename <shapefile to be loaded>
Shape file information
----------------------
File code = 9994
File length (16-bit words) = 2533850
Shape file version = 1000
Shape type = 5 (ST_MULTIPOLYGON)
Number of records = 2636
Minimum X coordinate = -173.109762
Maximum X coordinate = -66.954002
Minimum Y coordinate = 18.915497
Maximum Y coordinate = 71.398048
Shapes do not have Z coordinates.
Shapes do not have M coordinates.
Shape index file (extension .shx) is present.
Attribute file information
--------------------------
dBase file code = 3
Date of last update = 2013-09-03
Number of records = 2636
Number of bytes in header = 97
Number of bytes in each record = 305
Number of columns = 2
Column Number Column Name Data Type Length Decimal
------------- --------------- -------------- ------ -------
1 Cat_Zones C ( Character) 254 0
2 Country C ( Character) 50 0
Coordinate system definition: "GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID
["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.01
74532925199433],METADATA["World",-180.0,-90.0,180.0,90.0,0.0,0.0174532925199433,
0.0,1262]]"
Foi uma questão de sensibilidade de maiúsculas e minúsculas. Usando
inputAttrColumns N(\"Cat_Zones\")
resolveu o problema.