There are some solutions available to read the EDCDIC files like - https://github.com/rbheemana/Cobol-to-Hive, but this fails when the EDCDIC file contains rows with unequal offset length.
I wrote MapReduce job to read EBCDIC files and convert to CSV/Parquet by reading the each row based on offset values, so it is fixed length for all rows and following is sample code
Configuration conf = new Configuration();
conf.setInt(FixedLengthInputFormat.FIXED_RECORD_LENGTH, 100);
Job job = Job.getInstance(conf);
job.setInputFormatClass(FixedLengthInputFormat.class);
This also fails when the input EBCDIC file is not divisible by offset (record) length.
Is there any way to read & convert EBCDIC file with Header and Footer to ASCII file?