We found the problem,
a particular column of the select was constructed with a series of concatenations between string fields.
"SELECT ....,
coalesce(column1, ' ') ||'/'|| coalesce(column2,' ')||'/'|| coalesce(column3,' ')||'/'||
coalesce(column4, ' ')||'/'||coalesce(column5, ' ')||'/'|| .... etc AS COMPUTED_STRING"
We used DB2 operator "|| ( double pipe ) " which corresponds to the CONCAT function.
By removing this calculated column everything went well.
We haven't tried replacing the || with the CONCAT function yet, but I think the problem is related to this particular operator. It may not be handled correctly by the ODBC driver.
I suppose we should modify the select with a series of :
SELECT CONCAT(CONCAT('colmun1',' '),'column2') AS COMPUTED_STRING
FROM SYSIBM.SYSDUMMY1;
Alternatively we can concatenate the columns via PB script