Configuration of Data-Description Entries for a REDEFINES group Or Union

You can configure the data-description entries for a REDEFINES group or union.

Procedure

  1. Assign a data-description entry from the group as the default by selecting Yes in the Default Redefine column. The setting maps the data content of storage area to this default data-description entry at runtime.
  2. Optional. Assign a data-description entry (known as control field) to the group by clicking magnifying glass in the Control Field column. At runtime, the value of this control field determines the data-description entry that maps the content of the redefined storage area.

    In assigning a control field, you are required to provide a list of control values for fields in the REDEFINES group or UNION. Subsequently, while checking the control field against those values, the activity outputs that field into the output XML document if the invoked Parse Copybook Data activity detects a match.

    If the Parse Copybook Data activity detects no matches, it outputs the field that was assigned as the default.

    If you do not select a control field, the Parse Copybook Data activity outputs the default field.

    Note: When you click on a field that belongs to a REDEFINES group or a UNION, all other fields and the control field are highlighted.

    A control field must precede any of the fields that belong to a REDEFINES group or a UNION. You can select a preceding field only.

    Even if you selected a control field, you are not required to assign control values to every field of a REDEFINES group or UNION. If control values are not assigned, such a field is never be generated unless it is selected as the default redefine of the REDEFINES group or UNION. If you do not assign control values to any of fields, the control field has no effect on parsing.

Result

For example, the UNIT-PRICE-CONTROL field determines whether the Plug-in generates the ACTUAL or CONVERTED field, as follows:

  • If the UNIT-PRICE-CONTROL value is actual or a, the Plug-in generates the ACTUAL field.
  • If the UNIT-PRICE-CONTROL value is converted or c, the Plug-in generates the CONVERTED field.
  • If the UNIT-PRICE-CONTROL value is none of above, the Plug-in generates the ACTUAL field because ACTUAL is the default in the Default Redefine column.
    ACTUAL and CONVERTED Fields on the Field Configuration page