Specify the format of the output data

When you create transaction descriptions, the Format of a transaction field represents the actual format of the data to be transferred to another system.

Usually, you insert predefined transaction fields from the Available fields list (Transaction description dialog), and there is no need to edit them or create your own from scratch.

If you click Default in the Transaction description dialog when you access it via the invoice profile, Kofax ReadSoft Invoices automatically inserts transaction fields with the correct format for each of the single item fields defined on that invoice profile, as well as for a number of system variables. Therefore, it is not often necessary for you to specify the format or to edit it yourself.

To insert your own unique field, position the cursor on the line just below where you want to insert a transaction field. Then click the button with the small plus sign (+). The Properties dialog is displayed.

To view or edit an existing transaction field, first select it in the Transaction description dialog. Then click the Properties button. The field properties are displayed in the Properties dialog, where you can edit them as you wish.

The format has these parts:

Justification

The justification of a field is indicated by the plus or minus sign. The default output format is right-justified numeric values and left-justified alphabetic and alphanumeric values.

Example:

-"0"N(3)  A left-justified numeric field with 3 digits and zero (0) as pad character.

If a field is truncated and the field is left-justified, characters are truncated from the right side of the field, and vice versa.

To change the justification:

  1. Select the field.
  2. Click the Properties button on the right-hand side.
  3. Select Left or Right in the resulting dialog, and click OK to accept the change.

Pad character

Fields with values shorter than their format are padded with the pad character by default. The pad character of a field is shown in quotation marks.

Example:
-"*"SN(2)  A signed numeric field with 2 digits, left-justified, and padded with asterisks instead of zeros.

To change the pad character:

  1. Select the field.
  2. Click the Properties button on the right-hand side.
  3. Type the character into the Pad character box, and click OK to accept the change.

    You can also type an ASCII value for a character (1 <= value <= 255).

Format

The format is shown with the format T(i), where T can be A for alphabetic, N for numeric or X for alphanumeric; i is the length of the data.

To change the format:

  1. Select the field.
  2. Click the Properties button on the right-hand side. If you change the size of a variable, do not forget to change its Length at the same time.
  3. Change the format in the Format box, and click OK to accept the change.

    Type S before the format to signify a signed field. The field has a negative value if it contains a minus sign when interpreted or if a minus sign is typed during manual verification.

    Use a period to signify a decimal.

    Examples:
    +" "N(5). NN  A numeric field with 5 digits followed by a decimal and 2 more digits, right-justified, and with spaces as pad characters.
    -"&"SN(1-3). NN A signed numeric field with 1 to 3 digits followed by a decimal and 2 more digits, left-justified, and with ampersands as pad characters.

    The default output format is right-justified for numeric values and left-justified for alphabetic and alphanumeric values. To change this, type a minus sign (-) before the format description to left-justify or a plus sign (+) to right-justify the output. Some system variables have the plus sign in their formats by default.

    Examples:
    -SN(3)  A signed numeric field with 3 digits and left-justified.

    Numeric fields are padded with zeros by default. Alphabetic and alphanumeric fields are padded with spaces.

    To indicate a specific pad character, type the pad character in quotation marks (for example, "*") or the ASCII character code preceded by a slash (/ nnn) in front of the format.

    Examples:
    "*"-SN(2) A signed numeric field with 2 digits, left-justified, and padded with asterisks instead of zeros.
    /042A(8)  An alphabetic field with 8 characters and padded with asterisks instead of spaces.

    It is possible to specify that only a partial string is to be included in the transfer file. The format for this is $(x,y), where x is the position of the first character to be included and y the number of characters to be included. If y is 0, all the characters in the string are transferred, starting from the position specified by x.

    Examples:
    +"*"N(7)$(2,4) A numeric field with 7 digits where only digits 2 to 5 are to be transferred, right-justified, and padded with asterisks.
    +"0"N(4).NN$(3,4) A numeric field with 4 digits where only positions 3 to 6 are to be transferred, right-justified and padded with zeros. Note that the decimal is considered a character, so if the field value is 1234.56, the result is 34.5, not 34.56.
    -" "A(10)$(3,8) A alphabetic field with ten-characters where only the letter 3 to 10 are to be transferred, left-justified, and padded with spaces.