Prev Up Next


Following is a very brief introduction to the RecordEditor and the Examples provided.


This package uses Layouts to describe a record or Line. The system uses a 3 level definition of each record as follows.

Layout :: 1 or more Records
Record :: 1 or more Fields

Field Java Class
Layout net.sf.RecordEditor.record.LayoutDetail
Record net.sf.RecordEditor.record.RecordDetail
Field net.sf.RecordEditor.record.types.FieldDetails

Line class

Java class net.sf.RecordEditor.record.Line represents one line (or data record) in the file. The main methods are

Type interface

Java classes that implement the interface net.sf.RecordEditor.record.types.Type are used to convert a field's value between the external representation and a Java String representation for display on the screen.


The TypeManager is used store the Type's and CellFormat's. You can use the static method getSystemTypeManager to get the system TypeManager. The method register is used to define new Types to the system.

   1:        TypeManager typeManager = TypeManager.getSystemTypeManager();


The examples are in the directory <install_directory>/src package net.sf.RecordEditor.examples.

Before you do anything else, you must update the constants in net.sf.RecordEditor.examples.Constants

All the examples require RecordEdit.jar to be added to the java class path. This jar will be in <install_directory>/lib or <install_directory>/jars directory

Example class's and + example programs and require both RecordEdit.jar LayoutEdit.jar to be added to the java class path.

Java Class Purpose A Cobol Copybook Interface. Constants used by the examples. You may need to Update this file. This class will format
  • a Record oriented File (i.e. a file of Lines) using a velocity Template.
  • Selected files in a directory using velocity

For example if a Record-Layout of "ams Receipt" then the following classes will be generated
Java Class Purpose
AmsReceipt A class (extends Line) to access lines using the supplied RecordLayout
AmsReceiptProvider Class to create `AmsReceipt` Lines
AmsReceiptProcess Class to process files of Record-Layout "ams Receipt".

Example of a Format
Sample hand coded line example
Sample Type and Cell_Format interfaces
Sample Type and Cell_Format interfaces
Converts a XML/Cobol Copybook to a Layout
Example of using Record Deciders (java classes that decide which layout to use)
Example of adding a Format to the RecordEditor
Edit a specified file with the RecordEditor
This is an example of editing a specific file using the Record Frame (i.e. one record per frame)
This is an example of editing a specific file using your own JTable
This is an example of editing program supplied data with the RecordEditor
Example of defining your own Types
This is a example of introducing a new file structure (Mainframe VB with a maximum block size of 9040)
This is a example of introducing a new file structure. In this case this file structure is for Comma / Tab delimited files with the Column names on the second line of the file
This is an example of formatting selected files from a directory using Velocity (via
This class takes a Record-Layout and generates 3 java class's (using Velocity):
  • A specific Line class to access records using this Record-Layout
  • A LineProvider class for the line class generated
  • A class to process files of the supplied record layout
Demonstrates Reading a file using RecordEditor's Line Based Routines. See "Reading a File" for more details.
Demonstrates Reading and writing files using RecordEditor's Line Based Routines. It also illustrates LineIOProvider and LineProvider.
Demonstrates Reading files using the CobolCopybookReader interface.
Example of reading a Standard Variable length record file (VB file on the mainframe).

Prev Up Next