EBCDIC to Ascii Delimited file

Seven Stars

EBCDIC to Ascii Delimited file

Hi,
I'm new Talend. I'm trying to convert EBCDIC file to ASCII delimited file. I've xc2j layout ready. I've also created a metadata using Copybook. But I'm getting following error when I execute my package.

Starting job Copy_of_EBCDIC_Files_Exercise at 17:30 07/09/2011.
connecting to socket on port 3754
connected
Sep 7, 2011 5:30:46 PM net.sf.cobol2j.RecordSet next
SEVERE: Cannot parse field: NAME. Data: '', Picture: X(6), Type: X, Size: 6
Sep 7, 2011 5:30:46 PM net.sf.cobol2j.RecordSet next
SEVERE: Total bytes processed before error: 55
Exception in component tFileInputEBCDIC_2
net.sf.cobol2j.RecordParseException: Unexpected EOF while reading record nr: 5.
at net.sf.cobol2j.RecordSet.next(RecordSet.java:107)
at training___joshi.copy_of_ebcdic_files_exercise_1_0.Copy_of_EBCDIC_Files_Exercise.tFileInputEBCDIC_2Process(Copy_of_EBCDIC_Files_Exercise.java:506)
at training___joshi.copy_of_ebcdic_files_exercise_1_0.Copy_of_EBCDIC_Files_Exercise.runJobInTOS(Copy_of_EBCDIC_Files_Exercise.java:828)
at training___joshi.copy_of_ebcdic_files_exercise_1_0.Copy_of_EBCDIC_Files_Exercise.main(Copy_of_EBCDIC_Files_Exercise.java:702)
Caused by: net.sf.cobol2j.FieldParseException:
at net.sf.cobol2j.RecordSet.readText(RecordSet.java:282)
at net.sf.cobol2j.RecordSet.getFieldsValues(RecordSet.java:156)
at net.sf.cobol2j.RecordSet.next(RecordSet.java:89)
... 3 more
Caused by: net.sf.cobol2j.FieldParseException:
at net.sf.cobol2j.RecordSet.readText(RecordSet.java:269)
at net.sf.cobol2j.RecordSet.readText(RecordSet.java:280)
... 5 more
disconnected
Job Copy_of_EBCDIC_Files_Exercise ended at 17:30 07/09/2011.
I even tried to load same file in SQL server, But I'm getting following special characters in my table.
ID Name Amount
??? ?????? ??K?
??? ?????@ ??K?
??? ???@@@ ??K?
??? ???@@@ ??

Can somebody please help me with this? This is driving me nuts now...
Seven Stars

Re: EBCDIC to Ascii Delimited file

Hi Shong.... Can you please help me with this?
Six Stars

Re: EBCDIC to Ascii Delimited file

The parser is encountering end of file prematurely after 55 bytes. Check the data file to make sure it is the correct size and does not contain any improper linefeed/new lines.
Seven Stars

Re: EBCDIC to Ascii Delimited file

Hi jholman,
Thank you very much for the prompt response. I just verified the data file, it indeed contained an extra line feed. But I'm still unable to load the file successfully.
The data in the file is
ñññÕÉâÈÁÄòóKõ
ñññÙÖÈÉã@òóKõ
ñññÙÖè@@@òóKõ
ñññÙÖè@@@òóKõ

The SQL Server is showing this data as
ID Name Amount
??? ?????? ??K?
??? ?????@ ??K?
??? ???@@@ ??K?
??? ???@@@ ??
Seven Stars

Re: EBCDIC to Ascii Delimited file

Here is the file I'm trying to load
Six Stars

Re: EBCDIC to Ascii Delimited file

This is looks like an encoding issue. A joy of going from IBM codepages to MSSQL. Make sure the x2cj file has the correct IBM codepage for the charset. You might try writing the file first as a delimited UTF-8 file and load to UCS-2. Good luck!
One Star

Re: EBCDIC to Ascii Delimited file

Hi,
You can do it without using the EBCDIC component, but just with a tfileInputFullrow. Just put "\r\u008e" as a row separator. Hope it helps you !
One Star

Re: EBCDIC to Ascii Delimited file

Hi Pedro,

I need the example file and EB CDIC component, Can you provide that. I want to create test job.
Thanks
Kiran