Create Fields with the Positional Field Editor

About this task

Each record you create contains logically related positional fields. These fields define the structure and content of the data to the translator.

The easiest way to add positional fields to a record is to use the Positional Field Editor. Generally, you create the fields for the first record in the positional file, and then for each sequential record.

Do not define fields if their only purpose is to explicitly contain the record tag. The translator takes the tag that you define in the record into account when the automatic sequencing (Auto Position) function is used. Instead, define the record tag on the Positional Record Properties dialog box.

Note: You must either specify the start position of each field or use the Auto Position function; otherwise, the translator will not be able to read or write the record correctly.

To create the positional fields for a record using the Positional Field Editor:

Procedure

  1. In the Sterling B2B Integrator Map Editor, right-click the positional record. From the shortcut menu, select Edit Fields.

    The Positional Field Editor dialog box opens.

  2. Is the field you are creating the first field in the record?
    • If Yes, click New and continue with the next step.
    • If No, select the field that precedes the field you are creating in the record layout and click New.

      A select bar appears in the Fields section where the new field is positioned.

      Complete the field values in the Field Details section.

  3. In the Name box, type the field name.
    Note: Do not use spaces or hyphens (-) in the field name. You can use the underscore (_) to separate words.

    Each positional field must have a unique name. It is useful to tag the end of the field that occurs in multiple records with a suffix that identifies the record that contains the field.

  4. Do you want to designate the field as required?
    • If Yes, select the Mandatory check box.
    • If No, continue with the next step.
  5. In the Description box, type a description of the field.

    The description briefly explains the field to enable you to differentiate it from similar fields.

  6. From the Data Type list, select the type of the field.

    Valid values are:

    • String – Alphanumeric field
    • Number – Numeric, real, overpunched, or packed field
    • Date/Time – Date or time field
  7. From the Format list, select how the field is formatted. The choices for this field depend on the type of field you select from the Data Type list.
    • If you select Number or Date/Time in the Data Type list, you can select the data format from the Format list.
    • If you select String from the Data Type list, you must type a syntax token to denote that this field must be formatted as the specified syntax token dictates (the default syntax token is X).
  8. Do you want to indicate the exact position of the field in the record?
    • If Yes, type the starting position of the field in the Start Pos box.

      Specify field start positions if, for example, you are using only a few fields but you want them positioned exactly in the record. The alternative to specifying the start position of each field is to add the fields sequentially in the record and then use the Auto Position function.

    • If No, continue with the next step.

      See step 13 for more information about the Auto Position function.

  9. In the Min Length box, type the minimum length of this field.
  10. In the Max Length box, type the maximum length of the field.
  11. Click New.

    The Sterling B2B Integrator Map Editor adds the field and creates a new field with blank values ready for you to identify, positioned after the newly added field.

  12. Create the rest of the fields according to your record layout.

    To stop adding fields, click Delete.

  13. After adding the last field, do you want Sterling B2B Integrator Map Editor to automatically position the fields in the record?
    Note: You must either specify the start position of each field or use the Auto Position function; otherwise, the translator will not be able to read or write the record correctly.
    • If Yes, click Auto Position.

      Auto Position automatically calculates the start position in the record of each field, using the criteria that each field is positioned directly after the previous field and is of the length specified in the Max Length box. Click Yes to acknowledge the warning message that fields are sequenced in order.

      Note: The Auto Position function is valid only if you define a record tag and if you define every field in the record in the sequence that each field occurs.
    • If No, continue with the next step.
  14. Are you completely finished adding fields to the record?
    • If Yes, click Close.
    • If No, repeat steps 2 - 13.

      Complete this procedure to add fields to the other records you defined.