HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Chapter 5 221
Reformatting Specifications
Output Field Menu
Default = none
You can specify both FILL LEADING and FILL TRAILING with no redundancy. But, you
must not specify either FILL LEADING or FILL TRAILING with FILL ALL. Since the FILL
ALL fills all the blanks, any other FILL specification for the field is diagnosed as an error.
The examples in Table 5-7. illustrate use of the FILL option. The input and output data
types are the same.
FILL LEADING and FILL ALL are not sensitive to the sign of a signed number. For example,
the first set of specifications in Table 5-8. produces a meaningless result because the sign is
floated before the field is filled with zeros; the second set of specifications produces the
desired result.
Check Digit
You can request that a check digit be added to the end of any digit or alphabetic value by
entering 10 or 11 in the CHECKDIGIT option of the Output Field Menu. The check digit is
calculated by modulo 10 or modulo 11 depending on which you specify.
Check digits can be added only to fields that are type DIG or type CHAR and that contain
only digits or letters of the alphabet.
If ADD CHECK DIGIT is not specified as 10 or 11, no check digit is added.
NOTE
This specification adds a check digit. If you want to verify a number that
contains a check digit, this can be requested in the original form design using
FORMSPEC (refer to Chapter 4).
If the data is right justified, the nonblank digits in the field are moved left one character
position to make room for the check digit. Note that when a check digit is to be added to a
field, the length of the output field must be specified as at least one character longer than
the input field. (Field length is increased on the Output Record Menu, not the Output Field
Menu.) Refer to Appendix D for a description of how check digits are calculated if modulo
Table 5-7. Examples Using the FILL Option
Data Type Input Value Specification Output Value
CHAR ∆∆ABC∆DEF∆∆ FILL ALL*
FILL LEADING* FILL
TRAILING*
**ABC*DEF**
**ABC∆DEF∆∆
∆∆ABC∆DEF**
NUM2 ∆∆∆∆∆123.75 FILL LEADING* *****123.75
Table 5-8. Example Using the FILL LEADING and FILL ALL Option
Input Value Specification Output Value
-∆∆999 FLOAT SIGN
FILL LEADING 0
000-999
-∆∆∆999 SIGN LEFT
FILL ALL 0
-∆∆∆999
-000999