We have an EBCDIC file that is of VB(variable length) records. Correspond to this EBCDIC we have copybook in which records are separated with 01 type & individual record also contains packed decimal fields. Kindly suggest how we can convert this kind of EBCDIC file to ASCII.
RecordEditor we cannot install due to company security policy. we are using JRecord Library and we are creating object like:
ICobolIOBuilder iob = CobolIoProvider.getInstance()
.newIOBuilder(copybookName)
.setCopybookFileFormat(Convert.FMT_MAINFRAME)
.setFileOrganisation(Constant.IO_VB)
.setSplitCopybook(CopybookLoader.SPLIT_01_LEVEL) .setFont("cp037");
After that when we read the file line by line using AbstarctLineReader it is coming with lots of special characters. Kindly suggest on this.
Basics
Before you do anything else, you need to:
Conversion
Package that may be useful
The RecordEditor should be able to edit the file using the Cobol Copybook (you need to import the Copybook). The RecordEditor can also write the file as Xml.
The java projects JRecord and its sub projects like CobolToXml can do the conversion. The RecordEditor has some Code Generation options for JRecord
Finally have a look at how to generate Java~JRecord code