Package com.softwaremining.jcl
Class UnisysDataConvertor
java.lang.Object
com.softwaremining.jcl.UnisysDataConvertor
EBCDIC To ASCII Data Migration utility class
LIMITATION: When dealing with classes which have fields REDEFINED,
then the system will only act on the FIRST FIELD.
E.g.
05 VAR1 PIC 9(5) COMP.
05 VAR1R PIC X(3) REDEFINES VAR1.
The system will use VAR1 for data migration.
However, this could produce incorrect results when:
05 VAR1 PIC X(3) REDEFINES VAR1.
05 VAR1R PIC 9(5) COMP.
Also, the system will not be able to handle complicated REDEFINED cases.
e.g.
03 GROUP-1.
05 VAR1 PIC 9(5) COMP.
03 GROUP-1-R REDEFINES GROUP-1.
05 VAR1R PIC X(3) .
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic final void
asciiToEbcdic
(CBLBean dataClass, String inputFileName, String outputFileName) Convert a datafile containing ASCII datafile to EBCDIC Note that the persistenceFile should contain the full definition of the Binary and Non-binary fields.static final void
asciiToEbcdic
(CBLBean dataClass, String inputFileName, String outputFileName, int forceNewLineType) Convert a datafile containing ASCII datafile to EBCDIC Note that the persistenceFile should contain the full definition of the Binary and Non-binary fields.static void
convertRecordLine
(char[] nextLine, List<AbstractCBLField> fieldList, boolean unisysToIBM) convert a string line for the record containing Fieldsstatic void
command line startup ...static final void
unisysToIBM
(CBLBean dataClass, String inputFileName, String outputFileName) Convert a datafile containing EBCDIC datafile to ASCII Note that the persistenceFile should contain the full definition of the Binary and Non-binary fields.static final void
unisysToIBM
(CBLBean dataClass, String inputFileName, String outputFileName, int forceNewLineType) Convert a datafile containing EBCDIC datafile to ASCII Note that the persistenceFile should contain the full definition of the Binary and Non-binary fields.
-
Constructor Details
-
UnisysDataConvertor
public UnisysDataConvertor()
-
-
Method Details
-
unisysToIBM
public static final void unisysToIBM(CBLBean dataClass, String inputFileName, String outputFileName) throws IOException Convert a datafile containing EBCDIC datafile to ASCII Note that the persistenceFile should contain the full definition of the Binary and Non-binary fields. Ie it cannot be used with a persistenceFile which contains a large Filler definition. LIMITATION: Does not work with classes containing REDEFINED items- Parameters:
dataClass
- : Class representing the structure of to the datafileinputFileName
- - full name/path of the ebcidic datafileOutputFileName
- - full name./path of the target ASCII file.- Throws:
IOException
-
unisysToIBM
public static final void unisysToIBM(CBLBean dataClass, String inputFileName, String outputFileName, int forceNewLineType) throws IOException Convert a datafile containing EBCDIC datafile to ASCII Note that the persistenceFile should contain the full definition of the Binary and Non-binary fields. Ie it cannot be used with a persistenceFile which contains a large Filler definition. LIMITATION: Does not work with classes containing REDEFINED items- Parameters:
dataClass
- : Class representing the structure of to the datafileinputFileName
- - full name/path of the ebcidic datafileOutputFileName
- - full name./path of the target ASCII file.forceNewLine
- - add a new LF/CR after each migrated record is written.- Throws:
IOException
-
asciiToEbcdic
public static final void asciiToEbcdic(CBLBean dataClass, String inputFileName, String outputFileName) throws IOException Convert a datafile containing ASCII datafile to EBCDIC Note that the persistenceFile should contain the full definition of the Binary and Non-binary fields. Ie it cannot be used with a persistenceFile which contains a large Filler definition. LIMITATION: Does not work with classes containing REDEFINED items- Parameters:
dataClass
- : Class representing the structure of to the datafileinputFileName
- - full name/path of the ASCII datafileOutputFileName
- - full name./path of the target EBCDIC file.- Throws:
IOException
-
asciiToEbcdic
public static final void asciiToEbcdic(CBLBean dataClass, String inputFileName, String outputFileName, int forceNewLineType) throws IOException Convert a datafile containing ASCII datafile to EBCDIC Note that the persistenceFile should contain the full definition of the Binary and Non-binary fields. Ie it cannot be used with a persistenceFile which contains a large Filler definition. LIMITATION: Does not work with classes containing REDEFINED items- Parameters:
dataClass
- : Class representing the structure of to the datafileinputFileName
- - full name/path of the ASCII datafileOutputFileName
- - full name./path of the target EBCDIC file.- Throws:
IOException
-
main
command line startup ...- Parameters:
args
-
-
convertRecordLine
public static void convertRecordLine(char[] nextLine, List<AbstractCBLField> fieldList, boolean unisysToIBM) convert a string line for the record containing Fields- Parameters:
nextLine
-fieldList
-unisysToIBM
-
-