export import db2



hi to all,

how do i export and import tables or rows with java?
i like to:
1) select * from table1;
2) write the result with created insert-statements into an file.
3) read the file with the insert-statements and sumbit these to the new
database

i have problems with the field-type (char or bit data, varchar for bit
data ....)
does anyone has an example?

thanks to all...

.