The PRECTYPE option determines how the compiler derives the attributes
for the MULTIPLY, DIVIDE, ADD and SUBTRACT built-in functions when the operands
are FIXED and at least one is FIXED BIN.

.-ANS-------.
>>-PRECTYPE--(--+-DECDIGIT--+--)-------------------------------><
'-DECRESULT-'
- ANS
- Under PRECTYPE(ANS), the value p in BIF(x,y,p) and in BIF(x, y, p, 0) is interpreted as specifying
a binary number of digits, the operation is performed as a binary operation
and the result has the attributes FIXED BIN(p,0).
However, for BIF(x, y, p, q) if
q is not-zero, then the operation will be performed as a decimal
operation and the result will have the attributes FIXED DEC(t,u) where
t and u are the decimal equivalents of p and q, namely t = 1 +
ceil(p / 3.32) and u = ceil(q / 3.32). In this case, x, y, p and
q are effectively all converted to decimal (in contrast to the next
suboption which converts only x and y to decimal and does so even
if q is zero). The compiler will issue the Informational message 1BM1053
in this situation.
- DECDIGIT
- Under PRECTYPE(DECDIGIT), the value p in BIF(x,y,p) and in BIF(x, y, p, 0) is interpreted as specifying a decimal number of digits, the operation
is performed as a binary operation and the result has the attributes FIXED
BIN(s) where s is the corresponding binary equivalent
to p (namely s = ceil(3.32*p)). For an instance
of BIF(x, y, p, q) where q is not-zero, the results under PRECTYPE(DECDIGIT)
are the same as described below under PRECTYPE(DECRESULT).
- DECRESULT
- Under PRECTYPE(DECRESULT), the value p in BIF(x,y,p) and the values p and q in BIF(x,y,p,q)
are interpreted as specifying a decimal
number of digits, the operation is performed as a decimal operation and
the result has the attributes FIXED DEC(p,0) or
FIXED DEC(p,q) respectively. The result is the same as would be produced
if the DECIMAL built-in were applied to x and y.
PRECTYPE(ANS) is the default.
|
This information center is powered by Eclipse technology. (http://www.eclipse.org)