HP Data Entry and Forms Management System (VPLUS) Reference Manual (32209-90024)
218 Chapter5
Reformatting Specifications
Output Field Menu
Note that in the last IMP2 example, stripping the last character moves the implied
decimal to the position between 4 and 5.
JUSTIFY
This specification lets you move data to the right or left boundary of the output field or to
center it in the field. These three options are specified as:
JUSTIFY RIGHT
Moves the data to the right until the last character in the output field is
nonblank, padding with blanks on the left as the data is moved.
JUSTIFY LEFT
Moves data to the left until the first character in the output field is
nonblank, padding with blanks on the right as the data is moved.
JUSTIFY CENTER
Positions the data so that there is an equal number of blanks to the right
and left of the nonblank data. If the total number of blanks in the field is
not even, the extra blank is on the right.
If JUSTIFY is not specified, numeric type data is justified right and date type data is
justified left. No justification is performed on character type data. In Table 5-3., the
examples illustrate the three types of justification. It is assumed the input and output data
Table 5-3. Examples Using STRIP
Data Type Input Value Specification Output Value
CHAR ∆ACBAXCBYZBB none
STRIP ALL "ABC"
STRIP LEADING "ABC"
STRIP TRAILING "ABC"
∆ACBAXCBYZBB
∆XYZ∆∆∆∆∆∆∆∆
∆∆∆∆∆XCBYZBB
∆ACBAXCBYZ∆∆
DIGIT ∆234567∆∆∆∆ none
STRIP ALL "35"
STRIP LEADING "0"
STRIP TRAILING "7"
∆∆∆∆∆1234567
∆∆∆∆∆12467∆∆∆
∆∆∆∆∆12345.67
∆∆∆∆∆3456∆
NUM2 ∆12,345.67∆∆ none
STRIP ALL "35"
STRIP LEADING "01"
STRIP TRAILING "7"
∆∆∆-12345.67
∆∆∆-124.67∆∆
∆∆∆∆-2345.67
∆∆∆-12345.6∆
IMP2 ∆12,34567∆∆∆ none
STRIP ALL "35"
STRIP LEADING "01"
STRIP TRAILING "7"
∆∆∆∆-1234567
∆∆∆∆-12467∆∆
∆∆∆∆∆-234567
∆∆∆∆-123456∆