BeanIO Reader and Writer Multiple Record Types

Version 1

    Can we do the following with a chunk - read a single fixed format record file, use an item processor to query a database table to get some additional information then pass it to the beanio writer where we write 4 special records at the start of the output file before writing the new enhanced input into the file. Any suggestions or examples would be great.


    For the item processor to enhance the data item with more info from database, I think it still seems reasonable operations.

     

    Not so sure about the 4 special records at the beginning of the output file.  You can check if BeanIO library itself supports writing output headers.  Or you can extend JBeret's BeanIOWriter to write these 4 special records conditionally.  Or you can trick the BeanIOReader to produce such 4 items that will map to the 4 special rows in the output.


    I have worked out an example. Is therSe a way to attach the java, xml and sample output?

     

    Attachment of code, jsl, and mappings uploaded.


    On the top of the page, under the Create tab (to the right of a Pen icon), the pulldown menu has Upload Files submenu, where you can upload and share files.  I haven't used it either, but you can give it a try.


    Thanks for sharing your example!


    This article was generated from the following discussion: BeanIO Reader and Writer Multiple Record Types