1

I am using net.sf.flatpack and new to fixed length file parsing. Does flatpack support mutlilined files or files with different fixed length records?

for example:

myfile

AAA000 SOMETHING 0001 - record1

AAAA SOMETHINGELSE 0001 AAAA - sub-record of record 1

-repeat-

if flatpack does support it how is the pzmap xml defined? if not supported is there another library i can use?

Thanks all

Maxwell Wang
  • 41
  • 1
  • 3
  • Looking at http://flatpack.sourceforge.net/flatpack-examples/index.html the **FixedLengthHeaderAndTrailer** example should be what you are looking for. – Bruce Martin Dec 06 '18 at 21:33
  • I believe that the header and trailer example only defines the header line and trailer line. https://github.com/Appendium/flatpack/blob/master/flatpack-samples/src/main/script/PEOPLE-FixedLengthWithHeaderTrailer.txt – Maxwell Wang Dec 06 '18 at 22:04
  • There are plenty of other libraries that will do this. For example JRecord (https://sourceforge.net/projects/jrecord/) will handle the file but it does not covert the records to Pojo's (which others do). One bonus is with JRecord is the Xml schema's can be used to edit the files in Recsveditor/RecordEditor (https://sourceforge.net/p/recsveditor/wiki/Xml%20Schema/). The example list both position & length, you can generally use either position or length to define the fields. – Bruce Martin Dec 06 '18 at 23:08
  • This site (http://www.osalternative.com/p/jrecord-alternative-and-similar-open-source-projects-9873.html) lists several alternatives – Bruce Martin Dec 06 '18 at 23:17
  • http://jsapar.blogspot.com/p/links.html lists a lot of libraries – Bruce Martin Dec 07 '18 at 11:22

0 Answers0