Format specification for fields and identifiers

While specifying the field format or creating a field specification for a field exception, type a Specification for the fields as accurately as you can in accordance with the rules described below. Specify barcodes using this system, as well.

Specify how many characters of a certain type are allowed, using the format C(f-t), where C stands for the type of character, f stands for "length from" and t stands for "length to". Spaces are not allowed in the format specification.

Notes:

Symbol

Meaning

Example

N

Numeric characters

Example: N(7)

Meaning: A seven-digit numeric field.

Field: 1234567

A

Alphabetic characters

Example: A(2-5)

Meaning: An alphabetic field containing two to five characters.

Field: Abc

X

Alphanumeric characters and special characters such as "#", ">", etc.

Example: X(5)

Meaning: A field containing five characters, each of which can be a letter, number, or a special character.

Field: Abc3D

W

White space

Example: N(3)WN(2)

Meaning: A field containing three digits, a space, and two more digits.

Field: 123 45

S

A signed number (with a plus or minus sign)

Example: SN(3)

Meaning: A three-digit, numeric field with a plus or a minus sign in front of it. If the number is negative, it is proceeded by a minus sign (-) in the resulting transaction. If the number is positive and is preceded by a plus sign (+), it is proceeded by a plus sign in the resulting transaction.

Field: -425

-

Remove specific characters at the beginning or end of a string

Example: N(4)-X(0-1)[#]

Meaning: The # character, if any, is removed when this four-digit field is transferred.

Field: 1234#

Output: 1234

*

Remove any character

Example: N(3)**

Meaning: The last two characters are removed.

Field: 1234#

Output: 123

Note: * can only be used at the beginning or end of format specifications.

.

Decimal

Example: N(1-5).NN

Meaning: A numeric field containing one to five digits followed by a decimal and two more digits.

Field: 24.99

^

Disallowed character

Example: N[^0]

Meaning: Any single digit except 0.

Field: 2

(More info and examples.)

( )

Required

Example: A(5)

Meaning: The field must contain five alphabetic characters.

Field: Abcde

[ ]

Specified character (case sensitive)

Example: N[139]

Meaning: A single digit that can be 1, 3, or 9.

Field: 3

(More examples.)

{ }

Multiple formats

Example: {N(5)|N(10)}

Meaning: Either a five-digit field or a ten-digit field.

Field: 12345

|

The "or" operator used to separate multiple formats when more than one is allowed

Example: {N(5)|N(10)}

Meaning: Either a five-digit field or a ten-digit field.

Field: 1234567890

Specification of date fields