Please enable JavaScript to view this site.

These programs will divide parameter one by parameter two supplied to the program and pass the result back in parameter one.  The default is to pass the result back as a two decimal numeric field of length eleven (8 numerics the decimal point and two decimals).  The number of characters returned before the decimal point is always eight but you may alter the number of decimals by passing the value of 1 – 5 in parameter six.

If you alter the number of decimals returned then the return value length will change accordingly.  The difference between COBDIV and COBDIVR is that COBDIVR will use rounding whilst COBDIV will just truncate to the correct number of decimals.

Parameter

In

Len

Out

Len

PARM1

Dividend

21

Quotient

Return length depends upon value specified in PARM6 e.g.

xxxxxxxx.xxxxx

xxxxxxxx.xxxx

xxxxxxxx.xxx

xxxxxxxx.xx

xxxxxxxx.x

xxxxxxxx

14

PARM2

Divisor

21

-

 

PARM3

-

 

-

 

PARM4

-

 

-

 

PARM5

-

 

-

 

PARM6

Number of decimals (0 - 5) or Blank for default of 2

 

-