I downloaded the latest jRecord but that does not have VB_DUMP2. It seems I have to download r65, which says final and then build it. Hope I am on the right track. update: I tried building the project many times but it failed in some tests. I am attaching the output. I also found that the cb2xml.jar version dependency needed to be updated in the main pom file, like so: <dependency> <groupid>net.sf</groupid> <artifactid>cb2xml_src</artifactid> <version>1.01.0</version> </dependency> If you have the...
Thanks Bruce for such prompt and detailed response. I will take some time to digest this but knowing there are many options makes me feel better.
Bruce, I love the features of the Diff utility but I need to run this in the background, part of a flow. There is a need to generate a delta file by comparing the existing file with incoming file. I see the RunDiff jar but it opens up with UI. Where can I find the commandline version of this? Thanks
Thanks. However, when I tried System.out.println("constant for VB_DUMP2" + " = " +LineIOProvider.getInstance().getStructure("VB_DUMP2") + "\n"); I got 5, which is for VB_DUMP. I get errors when I use LineIOProvider.getInstance().getStructure("VB_DUMP2") instead of IO_VBDUMP2 Thanks
Perfect! Thank you! That helped. I need to abstract out the FileOrganization and SplitCopybook etc, which use constants. I could use the absolute values that I find from the javadoc but that defeats the purpose. Do you have any suggestion? ICobolIOBuilder iob = JRecordInterface1.COBOL.newIOBuilder(context.cobol_copybook) .setFileOrganization(Constants.IO_VB_DUMP2) how can I parameterize this .setSplitCopybook(CopybookLoader.SPLIT_NONE) how can I parameterize this .setFont(context.input_encoding)...
From the ioBuilder object, is there a way to introspect the COBOL field names and then drive the retrieval from there? Currently I am explicitly mentioning field names like: line.getFieldValue("CLNT-NR").asString() I want to create generic code that will work for a number of files and output all the columns that are in the copybook. When I debug the code, I see the metadata such as field name, level, pic clause etc. But I dont see how to access it programmatically. It would be helpfule to know where...
I would like to use jRecord on a large number of flat files that can contain non-COBOL data types. jRecord seems to support data types that COBOL supports. What if the file comes from a non-COBOL source and contains types like DATE, Double etc. Say, java data types or data types from RDBMS. It appears to me that the schema needs to be expressed as a COBOL copybook or XML. How to map the various data types to the COBOL data types and how to plug-in type conversion (like Date to String) in a generic...
I want to use the record selection feature to filter only the records I want to read. Also, I want to separately group the columns based on the record. I see some code example of Record Selector / setRecordSelection which shows how to set but I dont see an example of how to use it. Also, I have a complex record selection rule, like below. I would like to know how to define this and how to retrieve only the records I need. Thanks if RDT-REC-CODE-KEY "D" or reject the record if RDT-REC-TYPE-CONTROL...