0

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 !

Pic Ale
  • 3
  • 1
  • 2
    Please paste your code inline instead of using screenshots. – Beefster Feb 18 '21 at 18:57
  • 1
    The data example you provide is ascii and not ebcdic. I would of thought it would be a binary file (it is classified as text in the option file). The data looks like valid ASCII with comp-3 fields in it. EBCDIC to ASCII conversions often corrupt binary data fields. – Bruce Martin Feb 18 '21 at 21:41

1 Answers1

1

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.

James Anderson
  • 27,109
  • 7
  • 50
  • 78