Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
venkatadilip
Contributor
Contributor

Data Mapper: COBOL Copybook: ebcdic file - Invalid Packed Decimal Error

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.

Labels (2)
1 Reply
Tarun2
Partner - Contributor
Partner - Contributor

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.