Previous Topic Next topic Print topic


ARITHMETIC

Specifies how arithmetic expressions are to be evaluated.

Syntax:

>>-.---.--ARITHMETIC--"arith-type"---------><
   +-/-+

Parameters:

arith-type
The behavior to adopt:
ENTCOBOL
Truncate according to the rules of Enterprise COBOL for z/OS and OS/390.
MF, ISO2002 or ANSI
Do not truncate intermediate results. With ARITHMETIC"MF", ARITHMETIC"ISO2002" or ARITHMETIC"ANSI" specified, expressions are calculated as accurately as possible because no truncation takes place.
OS390
Truncate according to the rules of COBOL for OS/390.
OSVS
Truncate according to the rules of OS/VS COBOL.
TRUNC20
Truncate the number of digits to the right of the decimal point to 20 at each step of the evaluation of the expression. This provides similar results to the truncation provided in COBOL Workbench. You should only use this directive if you need to obtain evaluation results similar to those provided in COBOL Workbench.
If you specify TRUNC20, you must not change the setting of the INTLEVEL Compiler directive from its default value of 2. This means that you cannot use some of the newer features, such as numeric pictures with more than 18 total digits, with the TRUNC20 parameter.
VSC2
Truncate according to the rules of VS COBOL II and COBOL/370.

Properties:

Default: ARITHMETIC"MF" (Dialect)
Phase: Syntax check
$SET: No
Previous Topic Next topic Print topic