EngageOne™

Welcome to the EngageOneTM community - start a discussion in the discussion tab or join in a conversation.

The EngageOneTM community is the place to share best practices across product usage and deployment.  You’ll have access to key Subject Matter Experts (SME’s), Technical Resources, and Support/Services Leadership. You have the opportunity to share opinions and perspectives on development, provide valuable input for research and development of new products, and volunteer for beta testing opportunities.

Discussions

Members

Resources

Events

 View Only
  • 1.  combining AFP files

    Posted 01-16-2025 10:45

    Are there any examples or details, know issues for combining multiple AFP files with Enrichment? How are Resource Groups handles?



    ------------------------------
    John Julitz
    DFS Corporate Services LLC
    ------------------------------


  • 2.  RE: combining AFP files

    Employee
    Posted 01-16-2025 11:07

    John,

    This is a simple control file for combining two AFP files:

      <INPUT>
        <NAME>input1
        <FILE>file1.afp
        <TYPE>A
        <DOC>*
        <HEADER> X'D3A9C6' 4 Y
      </INPUT>
      
      <INPUT>
        <NAME>input2
        <FILE>file2.afp
        <TYPE>A
        <DOC>*
        <HEADER> X'D3A9C6' 4 Y
      </INPUT>
      
     <SORTMATCH>
      <SORT> %%INPUT_ORDER A
      <INPUTNAME> input1
      <INPUTNAME> input2
     </SORTMATCH>
     
    <ENVIRONMENT>
      <RESOURCESCAN> Y
    </ENVIRONMENT>
     
    <OUTPUT>
        <NAME>SWOUTPUT
        <FILE>output.afp
        <RESOURCEREPLACE> Y
     </OUTPUT> 
    This results in the two AFP files being concatenated together, and renaming resources in the 2nd file, as necessary.
    The <HEADER> tag in both <INPUT> groups will cause Enrichment to treat all records up to the end of the Resource Group as <HEADER> records.
    The <RESOURCESCAN> tag will cause Enrichment to look for resources in both files, maintain those resources in memory, and detect if any resource-renaming needs to occur, meaning a resource in the 2nd file has the same name as a resource in the 1st file, but has different content. If that occurs, then the resource will be renamed in the 2nd file and references to it in MCF or MDR records will be changed to the new name.
    The <RESOURCEREPLACE> tag will cause Enrichment to remove all pre-existing resources from the combined output file, and replace them with the combined resources that Enrichment found wrapped in a new Resource Group.


    ------------------------------
    Eric Olson
    Senior Principal Software Engineer
    Precisely Software Inc.
    ------------------------------