Hybrid Integration 10.2 | Integrating On-Premises Applications | Processing Flat Files | Processing Flat Files Overview | Processing Inbound Flat Files
 
Processing Inbound Flat Files
 
Handling Large Flat Files
To process an inbound flat file, use the pub.flatFile:convertToValues service. This service uses a flat file schema to parse flat files inbound to an Integration Server. The input of this service is a flat file and the name of a flat file schema, and the output of this service is an IS document (IData object). The output IS document is created based on the structure defined in the flat file schema. You can also validate the flat file against the flat file schema. During validation, the constraints placed on the records and fields cause the flat file schema to generate errors as output. For more information about the pub.flatFile:convertToValues service, see webMethods Integration Server Built-In Services Reference.
Note: Validation is turned off by default. To enable validation, you must set the validate variable of the convertToValues service to true.
Invoke the pub.flatFile:convertToValues service as part of customized flow services. You can then use Integration Server services to process the resulting data as necessary, (for example, map data from one format to another). The general process for inbound flat files is as follows:
Inbound Flat File Process
The flat file schema provides the pub.flatFile:convertToValues service with the information necessary to detect the boundaries between records and fields. After a record boundary is detected, the service matches the record in the flat file with a record defined in the flat file schema using the record identifier.
Note: When parsing a file, the flat file parser ignores any data that appears before the first valid record in the file.
Processing a flat file consists of the following basic steps:
Step 1
Create a flat file schema. Before you start working with an inbound flat file, you must create a flat file schema to be used for conversion and validation of the document. Use the Software AG Designer to create the flat file schemas used to parse, convert, and validate inbound flat files. For steps to create flat file schemas, see webMethods Service Development Help.
Step 2
Integration Server receives the flat file. Integration Server provides a number of ways to send and receive flat files. For more information, see Sending and Receiving Flat Files.
Step 3
Parse, convert, and validate flat file. To parse a flat file using a flat file schema and to convert the data into IS documents (IData objects), you call the pub.flatFile:convertToValues service.
During flat file parsing, you have the option of validating the flat file against the document, record, and/or field constraints you defined in a flat file schema.
To validate a flat file against the flat file schema used to parse the file, you must set the validate variable of the pub.flatFile:convertToValues service to true, which returns errors describing how the given ffData violates the constraints described in the flat file schema. For a list of validation error codes and messages, see Validation Errors.
For more information about the pub.flatFile:convertToValues service, see webMethods Integration Server Built-In Services Reference.
Step 4
Process the IS document produced by the pub.flatFile:convertToValues service. In many cases it is necessary to map the output of the ffValues document produced by the pub.flatFile:convertToValues service to another format, such as your back-end or user-defined format.
To assist with mapping the data, create an IS document type from your flat file schema. You can add a document reference variable that references the resulting IS document type to the pipeline. You can then map the ffValues document to the document reference variable.

Copyright © 2015- 2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release