I have created layout based on cobol copybook.
Layout snap-shot:
I tried to load data also selecting same layout, it gives me wrong result for some columns. I try using all binary numeric type.
- CLASS-ORDER-EDGE
- DIV-NO-EDG
- OFFICE-NO-EDG
- REG-AREA-NO-EDG
- CITY-NO-EDG
- COUNTY-NO-EDG
- BILS-COUNT-EDG
- REV-AMOUNT-EDG
- USAGE-QTY-EDG
- GAS-CCF-EDG
Input file can be find below attachment
or
https://drive.google.com/open?id=0B-whK3DXBRIGa0I0aE5SUHdMTDg
Expected output:
Related thread Unpacking COMP-3 digit using Java
First Problem you have done an EBCDIC --> ascii conversion on the file !!!!
The EBCDIC --> ascii conversion will also try and convert binary fields as well as text.
For example:
You need to do binary transfer, keeping the file as ebcdic:
Other points:
You will have to update RecordEditor/JRecord
Finally