ASCII to EBCDIC conversion -- JRecord
Read Cobol data files in Java
Status: Beta
Brought to you by:
bruce_a_martin
Hi Bruce, Could you please provide a reference or document where we can convert ASCII file to EBCDIC. The attached is the sample ASCII file consisting of multiple layout records that needs to be converted into EBCDIC and transmitted to MainFrame. Do we need to have a layout/copybook of the data?
Anonymous
By the looks like a Text file, if so the Mainframe file transfer program can convert the file from ASCII to EBCDIC.
If you use JRecord, you will need a layout/copybook. You only need JRecord if
Hi Bruce, thank you, could you please provide some code examples related to the second point (you need some sort of translation....).
And attached is the copy book and a sample ASCII file, and I would like to convert that file to EBCDIC. could you please assist on that.
Again the mainframe-file transfer program should be able to convert the file to from ascii to a mainframe file.
Attached are 2 example programs:
ReadSaloSalxFileStructure.java using standard JRecord. It is also listed below
ReadSaloSalxFileStructure2.java is another way to do the conversion (with out using much of JRecord)
Thank you Bruce, will give a try.
Hi Bruce, will this also take the packed decimal conversion into account?
yes