A-61635 December 2010
4-21
Input formats
An
Input Format
is a text expression used to audit the user input for a
particular index field. Its purpose is to prevent incorrect data from being
entered into index fields. The syntax of the input format can be one or
combination of the following formats:
• Text formats
• Number formats
• Time formats
• Fixed string formats
Input Text formats
#
#<maxlength>
#<minlength, maxlength>
#
— used to represent a single character of a specific type. # may be one of
the following character types:
9: valid input character set includes '0', '1', ..., '9'
Z: valid input character set includes 'A', 'B', ..., 'Z'
z:
valid input character set includes 'a', 'b', ..., 'z'
A: valid input character set includes all characters in Z and z type
C: valid input character set includes all characters in Z and 9 type
c:
valid input character set includes all characters in z and 9 type
X: valid input character set includes all characters in Z, z and 9 type
?: valid input character set includes any characters
Examples
999999
Description
— 6 numeric characters
Valid input examples
123456
888888
Invalid input examples
ABCDEF
wrong character type
1234567
too long
12345
too short
ZZZ999?
Description
— 7 characters, first three characters are alphabetic letters, next
three characters are numeric, last character is any character.
Valid input examples
BAT001%
BOX123a
Invalid input examples
BAT12b3
sixth character must be a numeric
Bat123a
second and third letters must be upper case alphabetic
characters
BAT12345
too long