Home

Bruce Martin

provide Java Record based IO routines for Fixed Width (including Text, Mainframe, Cobol and Binary) and delimited Flat files via a Record Layout (Cobol, CSV or XML).


Project Admins:


  • Bruce Martin
    Bruce Martin
    2014-10-28

    Cobol2Csv, Csv2Cobol programs

    With JRecord version 0.80.6, I have added 2 example programs Cobol2Csv and Csv2Cobol. As you might expect these 2 programs convert Cobol data files to/from Csv using a Cobol copybook.Program arguments are identical for both programs.

    At this stage these are example programs, so if you decide to use them, please test them thoroughly !!!.

    Running the 2 programs

        java -jar Cobol2Csv <program arguments="">
    
        java -jar Csv2Cobol <program arguments="">
    
    

    Program arguments:

       
    -I or -InputFile : Input file
    -O or -OutputFile : Output file
    -C or -Copybook : Cobol Copybook file
    -D or -Delimiter : Field Seperator (space, tab or value)
    -Q or -Quote : Quote, you can use DoubleQuote SingleQuote as well as an a the char
    -IC or -InputCharacterSet : Input font or character set
    -OC or -OutputCharacterSet : Output font or character set
    -FS or -FileStructure : File Structure:
    Default : Determine by Copybook
    Text : Use Standard Text IO
    Fixed_Length : Fixed record Length binary
    Mainframe_VB : Mainframe VB File
    Mainframe_VB_As_RECFMU : Mainframe VB File including BDW (block descriptor word)
    FUJITSU_VB : Fujitsu Cobol VB File
    Open_Cobol_VB: Gnu Cobol VB File
    -B : Cobol Dialect
    0 or Intel : Intel little endian
    1 or Mainframe : Mainframe big endian (Default)
    4 or Open_Cobol_Little_Endian_(Intel) : Gnu:Cobol
    2 or Fujitsu : Fujitsu Cobol
    -Rename : How to update cobol variable names
    0 or Leave_Asis : Use the COBOL name
    1 or Change_Minus_To_Underscore: Change '-(),' to '_'
    2 or Drop_Minus : Drop minus ('-') from the name
    -CsvParser : Controls how Csv fields are written / parsed
    0 or Basic_Parser : Parse Csv - when a field starts with " look for "<FieldSeparator>or "<eol&gt
    1 or Standard_Parser : Parse CSV matching Quotes
    2 or Standard_Parse_Quote_4_Char_Fields : Standard Parser, add Quotes to all Char fields
    3 or Basic_Parser_Column_names_in_quotes : Basic Parser, Field (Column) names in Quotes
    4 or Standard_Parser_Column_names_in_quotes: Standard Parser, Field (Column) names in Quotes
    5 or Standard_Parser_Quote_4_Char_Fields_Column_names_in_quotes : Standard Parser, Char fields in Quotes, Field (Column) names in Quotes
    6 or Basic_Parser_Delimiter_all_fields : Basic Parser, Field Separator for all fields
    7 or Basic_Parser_Delimiter_all_fields+1 : Basic Parser, Field Separator for all fields + extra seperator at the End-of-Line

     
    Last edit: Bruce Martin 2014-11-04