Unable to load VB : fileStructure argument ignored
Read Cobol data files in Java
Status: Beta
Brought to you by:
bruce_a_martin
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
Anonymous
Erratum : the first line should read:
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
Okay, thanks a lot!
This has been fixed