Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to view the ebcdic file by importing COBOL copybook into Structures in Data Mapper.
When i click Sample records(Imported the ebcdic file) , I am getting this error
1: Error - COBOL reader has encountered a fatal error (1504)
Cobol has returned this error while reading input data: At offset 143 (0x8F), field /CUST-RECORD-REF/CUST-ID, failed conversion with error: Invalid Packed decimal. Sign nibble 0x0 at position 2 is invalid. Cobol value was 0x250000. Schema was {"type":"string","logicalType":"decimal","talend.max.len":"3","talend.cobol.decimal.type":"PACKED","talend.min.len":"3","precision":5,"scale":0}
Element: Structures/cust-record-copybook/Reference/CUST-RECORD-REF.xml - Element: /CUST-RECORD-REF/CUST-ID
Copybook and the ebcdic files are in the below path
https://github.com/kenkrupa-ml/mainframe-ml-sample
Thanks in Advance.
This error usually comes over when a field has been defined incorrectly.
In your case you have defined the field CUST-ID as PIC 9(5) COMP-3 in the structure (based on Copybook), however the data in the input file is not conforming to this definition. The data in input file is showing : custId is either 001, 002 or 003 etc.
Now, 3 digits in EBCDIC can be stored using just 2 bytes. So, PIC 9(2) COMP-3, should suffice here.
Please update the copybook definition for the field and I believe, you should be able to get through this error.