JRecord 0.80

JRecord provides code to read and write files of length-based records.
JRecord project provides code to:

- Read and write files of length based records (both fixed length records and Length field based records).
- Read and Write native cobol files.


- Code was written to support the RecordEditor not for reading Cobol Files.
- Data is returned as a String.
- Better Generic Cobol is needed

File Formats

- Length based files have 2 advantages over typical unix/windows text files:
- When reading, you do not need to check every byte in the file for a < CR >.
- Ideal for storing binary data - Saves the conversion cost (in 3rd generation languages like C and Cobol).

Formats Currently Supported

- Fixed Record Length (ie every record is the same fixed length.
- Mainframe VB (was also used on other computers as well).
- Mainframe VB Dump (sames as VB but also including the the Block Discriptor Word).
- Fujitsu Cobol VB format.


Reading a File

This example shows how a ByteReader is Read a Fujitsu-Cobol variable length file as a array of Bytes.

Note: Each line in these files consist of

4 byte Record descriptor (2 byte length in little endian binary format, 2 bytes check data).

Line Data

4 byte Record descriptor. Having the Record descriptor at the start and end of a record allows you to read forward and backwards in the file.

1: AbstractByteReader tReader = new FujitsuVbByteReader();
2: byte[] line;
4: try {
5: tReader.open(fileName);
7: while ((line = tReader.read()) != null) {
8: // TODO Do Something .....
9: }
10: } finally {
11: tReader.close();
12: }

last updated on:
July 20th, 2013, 2:43 GMT
developed by:
Bruce Martin
license type:
Free To Use But Restricted
ROOT \ Utilities


In a hurry? Add it to your Download Basket!

user rating



What's New in version 0.68.1b
  • This version fulfills a couple of user requests.
  • There is an option for having column names in quotes for CSV files, and an enhanced copy utility.
read full changelog

Add your review!