But even if my script is working, most of the time (not always but 80% of time ???) I get this error :

DBD::ODBC::st fetchrow_array failed: [unixODBC][IBM][System i Access ODBC Driver]Column 1: CWB0111 - A buffer passed to a system call is too small to hold return data (SQL-22018) [state was 22018 now 01004]

[unixODBC][IBM][System i Access ODBC Driver]String data right truncation. (SQL-01004) at ./odbcdemo-perl.pl line n.

I'm not an ODBC expert, not a DBI expert, therefore I'm maybe forgetting something important to be done, but I don't find anything on the web that helped me...

Last idea, could it be due to UTF8, which would create difference in string sizes ?