About the Batch Processing sample

This sample demonstrates how to use the FileInput and FileOutput nodes to append files into a single output file.

This sample demonstrates the following tasks:

The sample is based on the following scenario:

Each branch office records their postage usage in a text file on a workstation. This text file is transferred to the head office input directory, where it is appended to a master file each day. Once a day the master file is transferred to the head office output directory.

The scenario is implemented by using the messages flows described in the following sections.

FileBatchProcessingFlowSample_Branch message flow

The FileInput node monitors a directory where branch offices each send a text file that has a record of their daily postal usage. The FileOutput node appends each branch record to a master file held in the head office input directory. This file is held in the mqsitransit subdirectory until the End of Data message is received by the FileOutput node. The End of Data terminal of the FileInput node is connected to a Compute node. Three branch offices send postage data, and the Compute node counts the number of messages through the flow. When the third record is read by the Compute node, it propagates an End of Data message to the Finish File terminal on the FileOutput node.

The following diagram shows the FileBatchProcessingFlowSample_Branch message flow:

screen capture of the FileBatchProcessingFlowSample_Branch message flow.

FileBatchProcessingFlowSample_HOffice message flow

A FileInput node monitors the head office input directory. The FileInput node is connected to a FileOutput node and writes the master file to the head office output directory.

The following diagram shows the FileBatchProcessingFlowSample_HOffice message flow:

Screen capture of the FileBatchProcessingFlowSample_HOffice message flow.

Back to sample home