Optional fields
In case of Delimited, Fixed-Length, Fixed-Length & Delimited type of files, you can make a field optional by selecting the Optional flag. All fields without this optional flag are treated as mandatory.
An application that produces a delimited file and wants to omit an optional field must still mark the field separator for the omitted field. It can be substituted with the optional value indicator if applicable. In case of fixed length/ fixed length & delimited files, the omitted field's position must be filled with correct number of fill characters.
An application that consumes the file data must treat an optional field as omitted from the source if it encounters the optional value indicator, in case of delimited files.
In case of fixed length/ fixed length & delimited files fill characters must be filled in the field's position.
When reading from a file, these conditions on each field are checked:
- Is the field marked as optional in the file template.
- Does this field's position in the file data contain the optional value indicator.
When both conditions are true, the field is treated as blank. No further validation is performed to check if the optional value matches with its data type. While generating a custom BOD from the file data, this field is ignored and the XML element corresponding to the field is not included. The file is processed fully and will not be moved to the error folder.
When writing to a file, these conditions on each field are checked:
- Is the field marked as optional in the file template.
- Is this XML element corresponding to the field absent in the incoming BOD
When both conditions are true, the field is treated as blank. While writing this BOD data to a file, it will fill the field's position with the optional value indicator. No data type validation is performed. The BOD is processed fully and no confirm BOD is raised.