There are two stages to identify or validate each character
value obtained from the parameter.
In the first the value is converted to the data type specified by
the "x" in the routine name. If this is successful, the derived
numeric value is compared with the range of acceptable values
defined by VMIN and VMAX. A value satisfying these constraints
is returned in the VALUES.
The second stage searches for a match of the character value with
an item in the menu. This step adheres to the following rules.
- The value is converted to the data type specified by the
"x" in the routine name. If this is successful, the numeric
value is compared with the range of acceptable values defined
by VMIN and VMAX. A value satisfying these constraints is
returned and the matching process terminates.
- All comparisons are performed in uppercase. Leading blanks
are ignored.
- A match is found when the value equals the full name of an
option. This enables an option to be the prefix of another
item without it being regarded as ambiguous. For example,
"10,100,200" would be an acceptable list of options.
- If there is no exact match, an abbreviation is acceptable.
A comparison is made of the value with each option for the
number of characters in the value. The option that best fits
the value is declared a match, subject to two provisos.
Firstly, there must be no more than one character different
between the value and the start of the option. (This allows
for a mistyped character.) Secondly, there must be only one
best-fitting option. Whenever these criteria are not
satisfied, the user is told of the error, and is presented
with the list of options, before being prompted for a new value
If a nearest match is selected, the user is informed unless the
MSG filtering level
is `quiet'.
This routine exits when all the values satisfy the criteria.