Guardian Procedure Calls Reference Manual (G06.25+)

Formatter Edit Descriptors
Guardian Procedure Calls Reference Manual522629-013
F-20
The M Edit Descriptor
For example, a value that is intended to represent a date can be formatted with an M
field descriptor as follows:
The following is a comparison of the effects of using the 9 and Z as digit selectors.
The minus sign in the preceding examples is the symbol that is automatically displayed
for negative values in the absence of any specification to the contrary by a decoration.
As shown in the preceding examples, a decimal point in the mask can be used for
radix point alignment of the external field. Additional examples follow here:
The “/\” marker is used to denote the boundaries of the output field.
In the example below, a comma specified as mask text is not displayed.
The “|”character is used to denote the boundaries of the output field.
Compare the different treatment of the embedded commas in the following examples:
Data Values:
298738472, 389487.987, 666, 0.35
Format One:
M<$ ZZZ,ZZZ,ZZ9 AND NO CENTS>
Format Two:
M<$ 999,999,999 AND NO CENTS>
Format Data Value Result
M"99/99/99" 103179 |10/31/79|
Format Data Value Result
3M<Z99.99
>
-27.40, 12,
0
-27.40 12.00
00.00
/\ /\ /\
3M<ZZ9.99
>
-27.40, 12,
0
-27.40 12.00
0.00
/\ /\ /\
3M<ZZZ.99
>
-27.40, 12,
0
-27.40 12.00
00
/\ /\ /\
Format Data Value Result
M'Z,ZZ9.99' 32.009 | 32.01|
Format One Format Two
$ 298,738,472 AND NO CENTS $ 298,738,472 AND NO CENTS
$ 389,488 AND NO CENTS $ 000,389,488 AND NO CENTS
$ 666 AND NO CENTS $ 000,000,666 AND NO CENTS
$ 0 AND NO CENTS $ 000,000,000 AND NO CENTS