Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

FIXEDDEC

FIXEDDEC returns a FIXED DEC value with precision and scale derived from the source unless explicitly specified as parameters to the function.

Read syntax diagramSkip visual syntax diagram>>-FIXEDDEC(x-+-----------+-)----------------------------------><
              '-,p-+----+-'
                   '-,q-'
 
x
Expression.
p
Restricted expression that specifies the total number of digits in the result. It must not exceed the implementation limit.
q
Restricted expression that specifies the scaling factor of the result. If q is omitted, a scaling factor of zero is assumed.

If both p and q are omitted, the precision of the result is determined from the source according to this table:

source result
FIXED BIN(p,q)
FIXED DEC(r,s)
where r = min(N,1+CEIL(p/3.32))
and s=CEIL(ABS(q/3.32))*SIGN(q)
FIXED DEC(p,q) FIXED DEC(p,q)
FLOAT BIN(p)
FIXED DEC(r,0)
where r = min(N,CEIL(p/3.32)
FLOAT DEC(p) FIXED DEC(p,0)
BIT
FIXED DEC(r,0)
where where r = min(N,1+CEIL(M/3.32))
CHAR, GRAPHIC or WIDECHAR FIXED DEC(N,0)

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)