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...
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.
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?
??? ???@@@ ??
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!