Configuring a mask

A mask is a template that is used to define data fields that have the same layout. This contains a single field definition that has a set of subfields.

Create masks to define field formats used in multiple places. Each mask is composed of one or more subfields, which contain the actual data within the record.

Defining a mask is similar to defining a field within a record layout.

  1. Create a new file or open an existing one, then select Define > Define Masks.
    To create a new mask, select New Field from the toolbar. This places a new folder in the Layout pane.
    To reconfigure an existing mask, open the file to edit. In the Layout pane, click the mask to reconfigure.
  2. Specify the mask name.
  3. For Fill Char, click the arrow to select the fill, or pad, character to use when creating or parsing the data in this field.
    The field justification determines which end of the data is padded with the fill character.
  4. For Width, specify the total width of the field.
    If left blank, then field width is automatically calculated from the total width of the subfields when Auto-Recalc is enabled on the Control menu.
    For special requirements, such as pad characters, specify a total field width that is greater or smaller than the sum of the subfield widths.
  5. Click Recalculate Field Width to recalculate the field width from its subfields.
  6. For Justification, select Left Justify or Right Justify. The parser strips all padding characters on the non-justified side.
    For example, a field is right-justified and "0" is the padding character. The field before parsing is "00123" and the field after parsing is "123."
  7. For Validate select from:
    • Validate at Fetch. This validates the field whenever this record layout is retrieved or used for an input or output operation. With this selected, messages with an invalid field are parsed, but a warning is given.
    • Validate at Parse. This validates the field when the data is parsed. This option forces validation even when the field is not used. With this selected, messages with an invalid field fail when parsed.