The truncation options enable you to control the truncation of certain data items.
The following compiler options are supported in Visual COBOL when using ccbl32 and ccbl64 from the command line or the ACUOPT Compiler directive. 1
Option | Definition |
---|---|
-Dz | All binary and packed-decimal data types ignore their PICTURE when determining the largest value they can hold. The PICTURE is not used when moving to a nonnumeric destination (the largest possible value determines the number of digits moved instead). |
-noTRUNC | All binary data types ignore their PICTURE when determining the largest value they can hold. However, the PICTURE is used when moving data from a binary number to a nonnumeric data item. The name of this option is similar to the name used by some other COBOL systems that behave this way. |
-truncANSI | Full ANSI COBOL rules are in place. Each numeric data item stores values up to its PICTURE in size. A small number of USAGE types provide exceptions (such as COMP-X and COMP-5). Values larger than allowed by the PICTURE are truncated using the standard size rules when the data item is the target of a MOVE statement; however, COMP-5 items do use their PICTURE when moving a value to a nonnumeric data item. The results of an arithmetic overflow (without the SIZE phrase) are undefined. |
The -Dz truncation option is not supported in JVM COBOL.