Menu

#12 Unable to load VB : fileStructure argument ignored

v1.0_(example)
pending
nobody
None
1
2017-12-12
2015-10-19
No

Hello

I'm trying to load some VB file using the following code:

    int fileStructure = Constants.IO_FIXED_LENGTH;
    CobolIoProvider ioProvider = CobolIoProvider.getInstance();
    AbstractLineReader reader  = ioProvider.getLineReader(
            fileStructure, Convert.FMT_MAINFRAME,
            CopybookLoader.SPLIT_NONE, cbl, dat
    );

However, the fileStructure argument does not have any effect. Looking at the code (http://sourceforge.net/p/jrecord/code/HEAD/tree/jrecord/Source/JRecord/src/net/sf/JRecord/IO/CobolIoProvider.java#l176), it looks like that argument is ignored.

Did I stumble into a bug? Or am I doing this wrong?

Thanks a lot!

Georges

Discussion

  • Georges Dubus

    Georges Dubus - 2015-10-19

    Erratum : the first line should read:

    int fileStructure = Constants.IO_VB;
    
     
  • Bruce Martin

    Bruce Martin - 2015-10-19

    Sorry about that, I introduced the error when replacing IOProvider.getFileReader(int fileStructure) with IOProvider.getFileReader(IBasicFileSchema fileSchema)

    Error fixed in subversion (see lines 192/193 in below).

    A full release will take longer because:
    * Need to add test to prevent this in the future
    * Currently I am working on cb2xml release
    * Releases take time (documentation etc)

    So please consider
    * Applying the changes yourself
    * Using the IOBuilder instead

     
  • Georges Dubus

    Georges Dubus - 2015-10-20

    Okay, thanks a lot!

     
  • Bruce Martin

    Bruce Martin - 2017-12-12
    • status: open --> pending
     
  • Bruce Martin

    Bruce Martin - 2017-12-12

    This has been fixed

     

Anonymous
Anonymous

Add attachments
Cancel