HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
Chapter 3 71
INTRODUCTION TO FORMS DESIGN
EASE OF FORMS DESIGN
Figure 3-7. sets out recommended guidelines for data type conversions from screen to ARB
and back.
FORMSPEC will ensure the following length specifications for ARB data types:
YYMMDD length = 6
INT length = 2
DINT length = 4
REAL length = 4
LONG length = 8
YYMMDD is defined as a 6-byte ASCII field containing numeric data with no separators,
in YMD order; for example, 860419.
The designer is responsible for making legitimate data conversions. The three critical
factors are data type, value, and length. The following examples illustrate their
importance.
• Data Type: Runtime errors may arise from specifying a CHAR/DATE source conversion
to a numeric destination, or a CHAR source to a DATE destination.
• Value: The ARB data type INT may have a screen type of CHAR. This works if the field
is for display only, but if it is an entry field, the user could input ABC unless the
designer has taken steps to prevent it.
• Length: Data may be truncated if the screen data type DIG is specified for a field of
length 10 and the ARB type is INT (length 2 bytes, equal to 1 HP 3000 word). Both
COBOL and Pascal can store numbers in the range -32768 to 32767 in one word.
NOTE
These are recommendations only, and are not enforced by FORMSPEC edits.
The programmer may set up the application code to handle non-standard
conversions.
Figure 3-8. shows the valid screen data types and their corresponding values for COBOL,
Table 3-7. Recommended Data Type Conversions
Screen Data Type — > ARB Data Type
CHAR CHAR only
YMD, DMY, MDY YYMMDD, CHAR
DIG any except YYMMDD, CHAR
NUM[n], IMPn any except YYMMDD, CHAR; "n" truncated if INT, DINT
ARB DATA Type — > Screen Data Type
CHAR CHAR only
YYMMDD MDY, YMD, DMY, CHAR, DIG
INT, DINT DIG, NUM[n], IMPn; positive only if DIG
REAL, LONG, PACK, ZONE DIG, NUM[n], IMPn; if DIG - "n" truncated, positive only