Joining Files


    Joining Files

    EDIFileJoiner is capable of joining any number of X12 EDI files into one. The joining operation is asynchronous by nature allowing program flow to continue.


    EDIFileJoiner joiner = new EDIFileJoiner();
    // Join the files at the ST header level
    joiner.FileJoinLevel = FileJoinLevel.HEADER;

    // Subscribe to be notified when the joining operation is complete
    joiner.OnFileOperationCompleted += new EventHandler(joiner_OnFileOperationCompleted);

    // Specify the list of files to join
    List files = new List();

    // Join the EDI files
    joiner.Join(files, “CombinedAll.txt”);
    private void joiner_OnFileOperationCompleted(object sender, FileOperationCompletedEventArgs e)
       if (e.Status != FileOperationStatus.Success)
         // Success
    Files can also be joined asynchronously using the async join methods. Use the EachSegmentInNewLine property to make every segment appear in a new line.
    in EDI File Joiner
    Did this article answer your question?