DB2 Import

beetri
beetri used Ask the Experts™
on
I have csv file containing international text as below
+0000000000000010003.,+0000000000000000103.,+0526640777496331405.,+0000000000000000019.,"¿¿¿¿¿¿"
+0000000000000010020.,+0000000000000000120.,+0526640777496331405.,+0000000000000000019.,"¿¿¿¿¿¿¿¿"

When I ftp it to db server for upload purpose, i see some junk character on the server as:

ÿÅ+0000000000000010003.,+0000000000000000103.,+0526640777496331405.,+0000000000000000019.,"³0¢0°0ë0ü0Ã0"
+0000000000000010020.,+0000000000000000120.,+0526640777496331405.,+0000000000000000019.,"Ã0ë0·0ü0¦0§0¤0Ã0"

I tried using iconv -f ISO8859-9 -t UTF-8 test/sample_cat_master.csv > test/sample_cat_master_test.csv
But do not get result. I still see the junk char.

Import from that file gives following msg:
SQL3110N  The utility has completed processing.  "0" rows were read from the
input file.

SQL3221W  ...Begin COMMIT WORK. Input Record Count = "0".

SQL3222W  ...COMMIT of any database changes was successful.

SQL3149N  "0" rows were processed from the input file.  "0" rows were
successfully inserted into the table.  "0" rows were rejected.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Hi beetri,

The FTP process shouldn't alter anything in the file, with the possible exception of the line terminator.  If you select a BINARY transfer, the file is bit-for-bit accurate.  If the transfer is cross platform (unix to Windows, etc.) the line terminator may be wrong, but you can still try it.  If you select a TEXT transfer, FTP will ensure that the line terminator is correct for the local system.  FTP does NOT know anything about the data so if there's an embedded newline character, even in quotes, the newline will be converted to the local line terminator.


Kent
i see some junk character on the server as:...

What are you using to "see" the junk characters? What platform is the file stored on?

Tom

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial