Please enable JavaScript to view this site.

This program will subtract the parameters two to five from parameter one and pass the result back in parameter one. Note: A minus sign will be added as the last character of the result if it is negative - thus making COBSUBS obsolete.

The default is to pass the result back as a two decimal numeric field of length 12 [to include the minus sign].  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 0 – 5 in parameter six. If you alter the number of decimals returned then the return value length will change accordingly from 9 – 15 [including the minus sign].

Note: If the number you pass into the program has a minus sign e.g. 1.10- then this number will be added i.e. subtracting a negative number will add it. If the end result is a negative number then a minus sign will be returned.

Parameter

In

Len

Out

Len

PARM1

Value 1

21

Result.

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

xxxxxxxx.xxxxx-

xxxxxxxx.xxxx-

xxxxxxxx.xxx-

xxxxxxxx.xx-

xxxxxxxx.x-

xxxxxxxx-

15

PARM2

Value 2

21

-

 

PARM3

Value 3

21

-

 

PARM4

Value 4

21

-

 

PARM5

Value 5

21

-

 

PARM6

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

 

-