Data Transformation Engine Functions and Expressions Reference Guide

Chapter 3 - Function Reference REFORMAT
Functions and Expressions Reference Guide
169
Returns
This function returns a type object.
Input Type Output Type Result
Group Group The content for each output component results
from the content of the corresponding input
group component content. For example, output
component 1 is matched with input component 1,
output component 2 is matched with input
component 2, and so on. The components of the
groups must be items, not another group. If
there is no matching input component for an
output component, the output component’s
required occurrences are built as NONES. If there
is no matching output component for an input
component, the data of that input component is
ignored.
When a component occurrence is built, the
delimiter (if any) of the contained output group is
built and an object of the component’s output
type is built from the corresponding input type
using the
REFORMAT algorithm.
Group Item The text of a corresponding input group content.
Item Group The input item content is applied as though it
were the first component of the output group.
Item Item The input item content is applied to the output
item content.
Example
MyXMLPurchaseOrder = REFORMAT(MyCOBOL_PurchaseOrder)
This function is useful when the same type structure may come from different
type trees, such as different versions of the same EDI, or when converting
legacy formats to XML.