Package com.softwaremining.jcl
Class CSVConvertor
java.lang.Object
com.softwaremining.jcl.CSVConvertor
This class convert COBOL sequential data-files to Comma-Separated-Values (CSV) format.
It requires a SoftwareMining generated Data-Access-Object (DAO) to tell it about the fields, their sizes types.
In this process the utility applies the following conversion.
- Packed-Decimals fields will be converted to their numeric values
- String/Character fields will be trimmed
Usage: java com.softwaremining.jcl.CSVConvertor full-ClassName input-filename output-filename [REC-SEQ-INPUT] [-includeFields=...] [-excludeFields=...]
where
full-ClassName or record-definition e.g. com.myapp.idata.TestWrapper or (11,2,PD,24,8,CH)
input-filename e.g. ../data/input-record.txt
output-filename e.g. ../data/output-record.csv
[OPTIONAL] REC-SEQ-INPUT (-deprecated. Please use -inputFileIsRecordSeq below) : Tells the system INPUT record is Record-Sequential, Ie it records are not separated by CR/LF characters, but are on one continuous line
[OPTIONAL] -inputFileIsRecordSeq=true of false: true tells the system INPUT record is Record-Sequential, Ie it records are not separated by CR/LF characters, but are on one continuous line
[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] -includeFields=FIELD_1,FIELD_2,...
[OPTIONAL] -excludeFields=FIELD_1,FIELD_2,...
NOTES: Does not support REDEFINIONS or ARRAY-Fields
includeFields and excludeFields : use the quoted field-names from the DAO
includeFields and excludeFields - can be used with DOA's containing REDEFINES .
Notes on GRP_SELECTOR: useful when the record contains REDEFINES. It allows specifying conditions where each REDEFINE group can be applied.
For GRP_NAME use the quoted field-names from SoftwareMining generated DAO
E.g: 1,1,EQ,A,GRP_1 means when first character equals "A" then use GRP_1
and 1,1,EQ,X'F3',GRP_2 means when first character equals 0xF3 then use GRP_2
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
CSVConvertor
public CSVConvertor()
-
-
Method Details
-
main
-