HP RPG/iX Utilities Reference Manual (30318-90006)
2- 268
items such as account numbers. The number is initially created by a user program, using an appropriate
algorithm, to compute a check digit, which is then appended to the right-most end of the number. For
example, a 6-digit number plus the check digit would become a 7-digit account number. When the number
is entered on the screen and self-check is specified, the number is checked, again using an appropriate
algorithm, to ensure the number was entered correctly. Hewlett-Packard provides two methods for
checking the check digit.
If a T is specified in the self-check field, a modulus 10 self-check test is performed. If an E is specified, a
modulus 11 check is used. See appendix C for detailed information on these algorithms. If the entry is left
blank, no check is made. You must use the same algorithm to generate the check digit as that used to
check it in your program. The number may contain leading blanks, embedded blanks, and punctuation.
The checking algorithm treats these characters as zeros.
Setting the Attributes
When you are finished making changes to the attributes of a field, you can either save or cancel them. To
save them, press f1 (SET FIELD). To cancel them, f7 (SEE ATTRIB.). Both f1 and f7 will return you
to the form.
If the field is an input field, the data type appears as the first byte in the field when the form is
redisplayed. Any video attributes that were specified are also displayed.
When the field attributes have been modified, the pound signs (#) shown in Figure 2-3 are changed to
asterisks (*). This indicates that the attributes of a field have been modified. When you have set all fields
in the form with the correct attributes, press f8 (EDIT MENU) to return to the edit menu.
Additional Editing Features
This section describes additional SIGEDITOR editing capabilities that were not described in chapter 1.
Creating Fields with the Tab and Right Arrow Key
As described in chapter 1, the space bar creates a field when in create form mode. Once the f1 key
(START FIELD) designates the starting point of a field, pressing the space bar extends the field to the
desired end point.
There are two other ways to extend the field. First, you can use the right arrow key. However, unlike the
space bar, the right arrow key does not show the field in inverse video until you press the space bar or the
f2 key (STOP FIELD). When using the right arrow key to extend a field, you must remember to stop the
field.
The second method of extending a field is to use the tab key. The tab key extends the field by ten spaces at
a time, relative to the starting point of the field. For example, if you press the f1 key (START FIELD),
followed immediately by the tab key, the field is extended ten spaces. If, however, you press the space bar
first to extend the field four spaces, pressing the tab key extends the field by six more spaces, or ten spaces
from the start point. The tab key actually extends the field eleven spaces, but the last space is erased
when the (STOP FIELD) key is pressed. When you use the space bar, the cursor leads the field as the field
is extended. In contrast, the cursor is included in the field when you use the tab key.
Stop Field Key
The f2 key (STOP FIELD) appears in the set of keys used to create a form. As mentioned earlier, you
must use the f2 key to indicate the end of a field. If you do not use this key to end a field, and proceed to
another line to create a new field, SIGEDITOR assumes that the field extends to the end of the line.
Although the whole field might not appear on the screen in reverse video, it is recorded by the program as
extending to the end of the line. Delete and recreate the field if you are not sure that you correctly stopped
the field.