public class EbcdicConvertor
extends java.lang.Object
java com.softwaremining.jcl.EbcdicConvertor direction full-ClassName input-filename output-filename [forceNewLine (true or false)] [-GRP_SELECTOR=(pos,length,condType,condValue,GRP_NAME,AND/OR, ...)] wherenote on JCL Type Record Definition above
direction: e2a (for EBCDIC to ASCII), a2e (for ASCII to EBCDIC) full-ClassName or record-definition e.g. com.myapp.idata.TestWrapper or JCL Type Record Definition (1,20,CH,21,4,PD,24,60,CH)
input-filename e.g. ../data/input-record.txt output-filename e.g. ../data/output-record.txt [OPTIONAL] forceNewLine : (deprecated use -forceNewLine]): the fifth argument (without a prefix) can be true or false. When true, FORCES the output-file records to be delimited by new line char. Default is false When 'false' the system will CR/LF characters (if any) at end of each record. [OPTIONAL] -forceNewLine=true/false [Optional] :true or false. Default is false. When true, FORCES the output-file records to be delimited by new line char. When 'false' the system will CR/LF characters (if any) at end of each record [OPTIONAL] -GRP_SELECTOR=(pos,length,condType,condValue,GRP_NAME,AND/OR, ...) e.g. (1,1,EQ,A,GRP_1 ,OR,1,1,EQ,X'F3',GRP_2 )" [OPTIONAL] -rdw=true/false)"
Constructor and Description |
---|
EbcdicConvertor() |
Modifier and Type | Method and Description |
---|---|
static void |
asciiToEbcdic(CBLBean dataClass,
java.lang.String inputFileName,
java.lang.String outputFileName,
boolean forceNewLineType)
Deprecated.
|
static int |
ASCIIToEBCDIC(int ascii)
translate a single byte 0 ..
|
static char[] |
convertBytes(byte[] data,
boolean ebcdicToAscii) |
static char[] |
convertChars(char[] data,
boolean ebcdicToAscii)
convert a string from/to ascii/ebcdic
|
static void |
convertPlainFile(java.lang.String inFileName,
java.lang.String outFileName,
boolean ebcdicToAscii)
convert a string from/to ascii/ebcdic
|
static char[] |
convertRecordLine_SingleField(char[] nextLine,
int memoryPosition,
java.util.List<AbstractCBLField> fieldList,
boolean ebcdicToAscii)
Deprecated.
|
static char[] |
convertRecordLine(char[] originalChars,
java.util.List<AbstractCBLField> allCompFields,
boolean ebcdicToAscii)
convert a string line for the record containing Fields
|
static java.lang.String |
convertString(java.lang.String data,
boolean ebcdicToAscii)
convert a string from/to ascii/ebcdic
|
static void |
ebcdicToAscii(CBLBean dataClass,
java.lang.String inputFileName,
java.lang.String outputFileName,
boolean forceNewLineType)
Deprecated.
|
static int |
EBCDICToASCII(int ebcdic)
Convert a single byte 0 ..
|
static void |
main(java.lang.String[] args)
Application Entry Point
|
@Deprecated public static final void ebcdicToAscii(CBLBean dataClass, java.lang.String inputFileName, java.lang.String outputFileName, boolean forceNewLineType) throws java.io.IOException
dataClass
- : Class representing the structure of to the datafileinputFileName
- - full name/path of the ebcidic datafileOutputFileName
- - full name./path of the target ASCII file.java.io.IOException
@Deprecated public static final void asciiToEbcdic(CBLBean dataClass, java.lang.String inputFileName, java.lang.String outputFileName, boolean forceNewLineType) throws java.io.IOException
dataClass
- : Class representing the structure of to the datafileinputFileName
- - full name/path of the ASCII datafileOutputFileName
- - full name./path of the target EBCDIC file.java.io.IOException
public static int ASCIIToEBCDIC(int ascii)
public static int EBCDICToASCII(int ebcdic)
public static void main(java.lang.String[] args)
public static char[] convertRecordLine(char[] originalChars, java.util.List<AbstractCBLField> allCompFields, boolean ebcdicToAscii)
originalChars
- allCompFields
- - conversion should exclude computation fieldsebcdicToAscii
- @Deprecated public static char[] convertRecordLine_SingleField(char[] nextLine, int memoryPosition, java.util.List<AbstractCBLField> fieldList, boolean ebcdicToAscii)
nextLine
- fieldList
- ebcdicToAscii
- public static java.lang.String convertString(java.lang.String data, boolean ebcdicToAscii)
data
- ebcdicToAscii
- public static char[] convertChars(char[] data, boolean ebcdicToAscii)
data
- ebcdicToAscii
- public static char[] convertBytes(byte[] data, boolean ebcdicToAscii)
public static void convertPlainFile(java.lang.String inFileName, java.lang.String outFileName, boolean ebcdicToAscii)
data
- ebcdicToAscii
- Copyright SoftwareMining. All Rights Reserved.