Trading Networks 10.3 | Administering and Monitoring B2B Transactions | Service Development Help | Working with Flat Files | Defining Flat File Elements | Adding a Field Definition
 
Adding a Field Definition
*To add a field definition
1. In Package Navigator view, double-click the flat file schema or flat file dictionary to which you want to add a field definition. The schema or dictionary opens in the appropriate editor window.
2. In the Flat File Structure tab of the flat file schema editor, or in the flat file dictionary editor, select the record definition or composite definition and click in the editor toolbar. (You can also right-click the element and select New.)
3. Under Enter Field Definition Information, specify the following.
Extractor Type
Description
Fixed Position
Counting from zero (0), indicates a fixed number of bytes to be extracted from a record.
Property
Description
Name
Type the name of the field.
Start
Type the first byte to extract from the record.
End
Type the first byte that is not included in the extraction. If you enter a negative number (for example, –1), the extractor returns all bytes from the byte specified in Start to the last byte in the record or composite.
Mandatory
Optional. Select the check box to require that this field appear in the flat file. If is not selected, the field is not required to appear in the flat file. If it is selected and the convertToValues service validate variable is set to true, errors will be generated if the field does not appear in the flat file.
Nth Field
Counting from zero (0), indicates the field that you want to extract from the record.
Property
Description
Name
Type the name of the field.
Position
Type a value to indicate the position of the field that you want to extract from the record. This value cannot be null and must be an integer greater than or equal to zero (0). For example, if you type 1, the second field will be extracted. This option is available only if you specified a field delimiter when configuring your flat file schema. This extractor returns the field as a key–value pair. The key is the name of the field. The value is the String value of the field.
Mandatory
Optional. Select the check box to require that this field appear in the flat file. If is not selected, the field is not required to appear in the flat file. If it is selected and the convertToValues service validate variable is set to true, errors will be generated if the field does not appear in the flat file.
4. To add additional field definitions at this level, click .
5. Click Finish to save the element definition.