Leon Duveen · Aug 20, 2019

Adding a header line to a file

I have set up a process to produce a daily file to be submitted to another system and this is working (using EnsLib.RecordMap.Operation.FileOperation).  However, the file needs to have a header line added each time it is created so it can be processed by the down stream system.  Looking though EnsLib.RecordMap.Operation.FileOperation and EnsLib.File.OutboundAdapter, I can't see where I can do this easily.  Any suggestions?


0 286
Discussion (3)1
Log in or sign up to continue

Hi Leon,

You're actually looking to create a batch, with a batch header for your file output.

To do this you'll need to define a batch class in your RecordMap, and in that class define your header (I'm assuming it's a fixed header, like field names).

You'll then want to use EnsLib.RecordMap.Operation.BatchFileOperation (or BatchFTPOperation) to deliver the batches. There are a few ways to trigger the batch rollover; a schedule, a record limit, or a Batch Rollover Request depending on your needs.


Worked perfectly, just as your advice in the old STC User group did.

Many thanks. 


Thanks, Leon. Good to hear that you're still active in healthcare integration, and I hope we'll see more of  you here at the Developer's Community!