The FixedDelimitedSegmentMergeReceiver merges from two or more segmented data files, generated from the SegmentDataCreatorReceiver, into one or more Fixed file delimited formatted output files. Each Segment will be separated by a delimiter and fields within a Segment will be at a fixed position in the file.


The FixedDelimitedSegmentMergeReceiver requires that the following parameters are defined. Items with an asterisk* are required.

  • outputPath* - Defines the location to store the newly generated nested Fixed Delimited text file(s).
  • outputSubDirectory* - Defines the prefix name of subdirectories that are auto created under the outputPath and then appended with a number.
  • configName* - Defines the name of the configuration file.
  • configPath *- Defines the location where the configuration file to be stored.
  • configSubDir - Defines the subdirectory under the configPath directory where the configuration file to be stored.
  • segmentPath* - Defines the path to the Segment directory where all segment subdirectories can be found.
  • segmentSubDirectory* - Defines the subdirectory under the segmentPath where segment files can be found.
  • filesPerOutputSubDir* - Defines the number of files to be generated per output subdirectory.
  • segmentDelimiter* - Defines the delimiter that separates the segments.
  • overrideFileName - Defines the fileName which will override the fileName provided in the configuration file.
  • deleteOutputSubDir - Defines whether to delete the generated or an existing outputSubDirectory or not during the execution of the Scenario.

Receiver Attribute Property Keys

There are no property keys necessary for this Receiver.

Example Transaction Story

In this basic use case, the user wants to generate five transaction records per day which will be followed by a delimiter after each record and a record trailer by the end of the record header.

So, the example given below will be based on the generation of segmented data for three Domains.  There are three Domains the represent that following hierarchy in parent-child relationships:

  • FileHeaderDomain is the root Domain
  • TransactionRecordDomain is a child of the FileHeaderDomain
  • FileTrailerDomain is a child of the FileHeaderDomain

Each Domain will use a SegmentCreatorReceiver to generate segmented data output with referential integrity with regards to parent-child relationships. The last Domain, Merge, will also use a FixedDelimitedSegmentMergeReceiver to merge the segmented data generated for each Domain into one or more nested Fixed Delimited text output files. Four Scenarios will be created out of which Three Scenarios will be containing the instruction on how much the segmented data to generate for each Domain and the last Scenario will merge the segments together to generate the output.  Lastly, the Scenarios can be chained together so that they can be run with one command instead of four separate commands.

Configuration File

The configuration file defines the following elements of information:

  1. fileNameSegments - contains sub-elements that define how file names are created for each delimiter file generated.

  2. segmentFiles - contains sub-elements that define the file names of the segment data files to merge.

  3. elements - contains nested subelements that define the format of the Fixed Delimited text output.

Steps to Create Configuration File

  • Select the Configuration Management tab from the Management pane.

  • Click on the New Configuration button.

  • Select Fixed Format radio button in the Select Configuration Type.

  • Enter the required parameters to create a configuration file.
    • Name: Defines the unique name for the Fixed File configuration.
    • Config File Name: Defines the name of the configuration file that FixedDelimitedSegmentMergeReceiver will read to create a Delimited Fixed File format file.
    • Output File Name Format: Defines the format for the name of the output file.
    • Definitions: Defines the various segment and template files that will be used to build nested XML.

  • Arrange the Segments in a hierarchy by drag/drop the segments.

Example Configuration File

This is an example configuration file is defined to allow three segment files to be merged into one or more Fixed Delimited nested output files.  The format of the segmented data must produce nested output which meet the following rules:

  • There must be one fileHeader generated and each to its own nested Fixed Delimited text file.
  • Each fileHeader must have five transaction records
  • Each fileHeader must have one fileTrailer  

The XML configuration file

The following is a preview of the XML configuration file which will produce the Fixed Delimited file formatted output files based on the settings provided in the configuration file.

    <fileNameSegment segmentType='Constant' value='FixedFile-' />
    <fileNameSegment segmentType='Counter' value='1' />
    <fileNameSegment segmentType='Constant' value='.txt' />
    <segment domainName='FileTrailer' templateFile='FileTrailerTemplate.xml' segmentFile='FileTrailerSegment.xml' />
    <segment domainName='TransactionRecord' templateFile='TransactionRecordTemplate.xml' segmentFile='TransactionRecordSegment.xml' />
    <segment domainName='FileHeader' templateFile='FileHeaderTemplate.xml' segmentFile='FileHeaderSegment.xml' />
    <segment domainName='FileHeader'>
      <segment domainName='TransactionRecord' />
      <segment domainName='FileTrailer' />

The example configuration file defines the following information.


The subelements will produce a file naming convention that looks like the following:

  • FixedFile-1.txt


The following template files will be loaded and used to create the XML output when merged with segment data.

  • FileHeaderTemplate.xml
  • TransactionRecordTemplate.xml
  • FileTrailerTemplate.xml


The following segment files will be loaded and their data used in the merge process.

  • FileHeaderSegment.xml

  • TransactionRecordSegment.xml

  • FileTrailerSegment.xml


The elements and subelements are configured to produce the following nested Fixed Delimited structure.

File Header Record
Detail Entry Record 1
Detail Entry Record 2
Detail Entry Record 3
Detail Entry Record 4
File Trailer Record

Template Files

Each template file below represents a block of XML elements used for merging with segment data that, combined together, will create a nested Fixed Delimited file.

FileHeader Template

This template will be used for data segment merging with <segment name="FileHeader">

<Segment name='FileHeader'>
    <attribute fieldName='recordType' length='2' />
    <attribute fieldName='fileId' length='6' />
    <attribute fieldName='fileIdSeparator' length='2' />
    <attribute fieldName='fileIdValue' length='12' />
    <attribute fieldName='filler' length='12' />

TransactionRecord Template

This template will be used for data segment merging with <segment name="TransactionRecord">

<Segment name='TransactionRecord'>
    <attribute fieldName='recordType' length='2' />
    <attribute fieldName='customerNumber' length='10' />
    <attribute fieldName='customerAccountNumber' length='12' />
    <attribute fieldName='transactionId' length='36' />
    <attribute fieldName='transDate' length='12' />
    <attribute fieldName='cardNumFirst6' length='7' />
    <attribute fieldName='totalTransAmt' length='12' />

FileTrailer Template

This template will be used for data segment merging with <segment name="FileTrailer">

<Segment name='FileTrailer'>
    <attribute fieldName='recordType' length='2' />
    <attribute fieldName='institutionName' length='12' />
    <attribute fieldName='institutionID' length='8' />
    <attribute fieldName='filler' length='12' />

Example Files

All of the example files below were generated by GenRocket.

Example merged nested Fixed Delimited file

The following is an example of a merged Fixed Delimited file for the first fileHeader generated.

HHFILEID||2020-01-15  000000      
DT43637446  3854113929949c020401-ee58-11e7-aca1-de9802ff4a812021-09-01  511000 8402        
DT12840191  5866789137349c020402-ee58-11e7-b1ea-d6dfb95c8ca52021-07-14  521000 54089       
DT23591618  7527497533319c020403-ee58-11e7-93f9-140d9ca88c1c2021-05-06  531000 47529       
DT35793317  2347431459909c020404-ee58-11e7-9ec1-d7466b8488b02021-12-14  541000 31152       
DT64863061  3058124868099c020405-ee58-11e7-bd14-56f00866007a2021-11-01  551000 94107       
TTGenRocket   GNRCKT  000000      

Example Segment Files

The following are four example segmented data files used to generate the merged nested Fixed Delimited files.


This file will contain one segment having one data element containing the fileHeader attributes, a loopCount equal to one and no parentId since the fileHeader is the root Domain and does not have a parent Domain.

  <segment id="1" setId="1">
    <attribute name="recordType"><![CDATA[HH]]></attribute>
    <attribute name="fileId"><![CDATA[FILEID]]></attribute>
    <attribute name="fileIdSeparator"><![CDATA[||]]></attribute>
    <attribute name="fileIdValue"><![CDATA[2020-01-15]]></attribute>
    <attribute name="filler"><![CDATA[000000]]></attribute>


This file will contain fiver segments each having eight data elements containing the userRecord attributes, a loopCount equal to five and a parentId given each set of users referential integrity to a given fileHeader defined within FileHeaderSegment.xml.

  <segment id="1" setId="1">
    <attribute name="recordType"><![CDATA[DT]]></attribute>
    <attribute name="customerNumber"><![CDATA[15934998]]></attribute>
    <attribute name="customerAccountNumber"><![CDATA[198680530800]]></attribute>
    <attribute name="transactionId"><![CDATA[9c020401-ee58-11e7-ac64-fd02db979799]]></attribute>
    <attribute name="transDate"><![CDATA[2021-06-10]]></attribute>
    <attribute name="cardNumFirst6"><![CDATA[511000]]></attribute>
    <attribute name="totalTransAmt"><![CDATA[79357]]></attribute>
    <attribute name="fileHeader"><![CDATA[1]]></attribute>
  <segment id="2" setId="1">
    <attribute name="recordType"><![CDATA[DT]]></attribute>
    <attribute name="customerNumber"><![CDATA[40369607]]></attribute>
    <attribute name="customerAccountNumber"><![CDATA[733867508081]]></attribute>
    <attribute name="transactionId"><![CDATA[9c020402-ee58-11e7-994a-1b3aeb69e153]]></attribute>
    <attribute name="transDate"><![CDATA[2021-05-06]]></attribute>
    <attribute name="cardNumFirst6"><![CDATA[521000]]></attribute>
    <attribute name="totalTransAmt"><![CDATA[67408]]></attribute>
    <attribute name="fileHeader"><![CDATA[1]]></attribute>
  <segment id="3" setId="1">
    <attribute name="recordType"><![CDATA[DT]]></attribute>
    <attribute name="customerNumber"><![CDATA[33309838]]></attribute>
    <attribute name="customerAccountNumber"><![CDATA[717539711082]]></attribute>
    <attribute name="transactionId"><![CDATA[9c020403-ee58-11e7-9268-9180d664e317]]></attribute>
    <attribute name="transDate"><![CDATA[2021-12-15]]></attribute>
    <attribute name="cardNumFirst6"><![CDATA[531000]]></attribute>
    <attribute name="totalTransAmt"><![CDATA[74727]]></attribute>
    <attribute name="fileHeader"><![CDATA[1]]></attribute>
  <segment id="4" setId="1">
    <attribute name="recordType"><![CDATA[DT]]></attribute>
    <attribute name="customerNumber"><![CDATA[36968742]]></attribute>
    <attribute name="customerAccountNumber"><![CDATA[200612319715]]></attribute>
    <attribute name="transactionId"><![CDATA[9c020404-ee58-11e7-bc25-f148b538ac01]]></attribute>
    <attribute name="transDate"><![CDATA[2021-02-09]]></attribute>
    <attribute name="cardNumFirst6"><![CDATA[541000]]></attribute>
    <attribute name="totalTransAmt"><![CDATA[97030]]></attribute>
    <attribute name="fileHeader"><![CDATA[1]]></attribute>
  <segment id="5" setId="1">
    <attribute name="recordType"><![CDATA[DT]]></attribute>
    <attribute name="customerNumber"><![CDATA[82799644]]></attribute>
    <attribute name="customerAccountNumber"><![CDATA[593560623561]]></attribute>
    <attribute name="transactionId"><![CDATA[9c020405-ee58-11e7-bfcb-f5ccac9dc2dc]]></attribute>
    <attribute name="transDate"><![CDATA[2021-02-16]]></attribute>
    <attribute name="cardNumFirst6"><![CDATA[551000]]></attribute>
    <attribute name="totalTransAmt"><![CDATA[23307]]></attribute>
    <attribute name="fileHeader"><![CDATA[1]]></attribute>


This file will contain one segment having one data element containing fileTrailer attributes, a loopCount equal to 1 and a parentId given each fileHeader referential integrity to a given fileHeader defined within FileHeaderSegment.xml.

  <segment id="1" setId="1">
    <attribute name="recordType"><![CDATA[TT]]></attribute>
    <attribute name="institutionName"><![CDATA[GenRocket]]></attribute>
    <attribute name="institutionID"><![CDATA[GNRCKT]]></attribute>
    <attribute name="filler"><![CDATA[000000]]></attribute>
    <attribute name="fileTrailer"><![CDATA[1]]></attribute>