How to build dataframe from cobol and ebcdic file with COMP fields using Cobrix?

479 views Asked by At

I am trying first to build a simple dataframe from mainframe source with cobrix to find out how it deals with ebcdic files.

My Input looks like this. (hex) : 313030100C3230301A0C. If I quickly open with Notepad++ : raw_data

I use these options to read my data and turn it into a dataframe. I have tried all the ebcdic encoding supported values without success. I also tried to change S9(3). to 999. or 9(3). in .cobol file but does not change anything.

My output does not look like what I was expecting.

It works fine with "classic" ascii encodage and without "COMP-3". Can you help me to find out why my df does not look like expected ?

Many thanks !

1

There are 1 answers

0
James Anderson On BEST ANSWER

Your input data has been converted from EBCDIC to ASCII already.

The first s9(3) characters '100' should be hex 'F1F0F0' in EBCDIC.

However your file was transferred it converted all bytes to ASCII therefore corrupting the comp-3 values which are NOT valid EBCDIC.