Input data validation
When a map begins execution, the input data must first be validated to ensure that the data for each input conforms to the definition of the corresponding input card. If it does conform, the data is valid. If the data does not conform, it is invalid. If data is determined to be invalid, a run-time return code and corresponding message is issued.
If invalid data is encountered, you may still want the map to continue processing or you may even want to map the invalid data. This can be accomplished during map development by using the Restart attribute when defining the input data and using the REJECT function when mapping the output data. In addition, functions are available to test for the presence of errors. For information about using the Restart attribute, see the Type Designer documentation. For information about using the error-related functions, see the Functions and Expressions documentation.
The validation process assumes that source data is a data stream. To find data objects in the input stream, type tree definitions are used including information about syntax items, data patterns, restrictions, component rules, and size. To process your input, the data must be able to be accessed at a designated position, for a specified length.
As data is validated, information about the data is recorded into workspace in memory or work files that guide the output process. The workspace information controls the data objects appearing in the data stream, whether they are related to other data objects, and what (if any) the relationship is. This enables you to specify any input within a map rule regardless of where the data appears in the input stream. It also enables you to use rules about the presence of data so that, for example, you can count objects or test their presence.