Originally posted by: janhess
[b]Using the REJECT Function[/b]
To map invalid data, you can use the REJECT function. The REJECT function is used in conjunction with the Restart attribute. The REJECT function operates on an invalid data object contained within a valid object. The output of the REJECT function is a series of text items.
The syntax of the REJECT function is the following:
REJECT (component_with_the_restart_attribute)
Use the REJECT function in conjunction with expressions that map valid data. For example, you can generate an error report which contains the invalid input data, in addition to the valid company name and date from the input.
To map the invalid data objects to an error report, assign the Restart attribute on the component in the Type Designer to map the invalid objects.
Define the output error report in a type tree. Define the error report to begin with a simple heading, and after the heading, map the invalid objects as text items. The invalid objects must be defined as text items because the output of the REJECT function is a series of text items. Each invalid PO will be considered a stream of text.
Copyright © 2003 by Mercator Software, Inc.
[b]How the Restart Attribute Works[/b]
The restart attribute has the following properties:
¨ During validation, the restart attribute is used to tell the system where to start over when an unidentified foreign object (UFO) is encountered in the data. All unrecognized data is considered to be an error of the type with the restart assigned.
¨ The restart attribute is used during validation to mark both UFOs and existing data objects in error, which are ignored when mapping input to output.
¨ The restart attribute is used to identify valid data objects that contain objects in error.
If an invalid data object is a component that does not have the restart attribute, that component is marked in error. If components, from the beginning of the data are marked in error because none of them has a restart, the system stops after validation. It does not map the input data to the output.
Copyright © 2003 by Mercator Software, Inc.
#DataExchange#IBM-Websphere-Transformation-Extender#IBMSterlingTransformationExtender