


For more information about the format of a data item in memory, see section 5.7.1.8 in Book 3, "Reference Manual."
-Da Allows you to specify the data alignment modulus for level 01 and level 77 data items. Normally, level 01 and level 77 data items are aligned on an even boundary (modulus 2). You can specify an alternate alignment boundary by following this option with the desired modulus. This should be specified as a single digit that immediately follows the "-Da" as part of the same argument. For example, "-Da4" specifies that data should be aligned on quad-byte boundaries.
-Db Causes COMPUTATIONAL data items to be treated as if they were declared as BINARY data items. This is the default when you are using VAX COBOL compatibility mode.
-Dca This selects the ACUCOBOL-GT storage convention. It is the default setting. This convention is also compatible with data produced by RM/COBOL (not RM/COBOL-85) and previous versions of ACUCOBOL-GT. It also produces slightly faster code.
-Dci This selects the IBM storage convention. It is compatible with IBM COBOL, as well as with several others including RM/COBOL-85. It is also compatible with the X/Open COBOL standard.
-Dcm This selects the Micro Focus storage convention. It is compatible with Micro Focus COBOL, when the Micro Focus "ASCII" sign-storage option is used (this is the Micro Focus default).
-Dcn Causes a different numeric format to be used. The format is the same as the one used when the "-Dci" option is used, except that positive COMP-3 items use "x0B" as the positive sign value instead of "x0C". This option is compatible with NCR COBOL.
-Dcv This creates numeric sign formats that are compatible with VAX COBOL. These are identical to the IBM formats, except that unsigned COMP-3 fields place "x0C" in the sign position, instead of "x0F".
The ANSI definition of COBOL does not state how signs should be stored in numeric fields (except for the case of SIGN IS SEPARATE). As a result, different COBOL vendors use different conventions. By using the options "-Dca", "-Dci", "-Dcm", or "-Dcn", you may select alternate sign-storage conventions. Doing so is useful in the following cases:
The storage-convention affects how data appears in USAGE DISPLAY, COMP-2 and COMP-3 data types. For additional information and tables, see the Reference Manual, section 5.7.1.7, "USAGE clause."
-Df This option changes the way the compiler treats data items declared as COMP-1 and COMP-2.
Some compilers use COMP-1 and COMP-2 to specify single and double precision floating point data items. However, ACUCOBOL-GT assigns a different meaning to COMP-1 and COMP-2 and uses FLOAT and DOUBLE to specify floating point data items.
When the "-Df" option is used, the compiler treats data items declared as COMP-1 as if they were declared FLOAT and data items declared as COMP-2 as if they were declared DOUBLE. With the "-Df" option, you have the following correspondence:
COMP-1 FLOAT single precision COMP-2 DOUBLE double precision
The "-Df" option makes it easier to compile code originally written for another compiler--one that used COMP-1 and COMP-2 to specify floating point data items. The "-Df" option lets you compile such code without having to change COMP-1 and COMP-2 to FLOAT and DOUBLE.
-Di This option causes the compiler to initialize Working-Storage. Normally, the compiler will initialize all data items to spaces except for those items given a VALUE clause. If this option is specified, data items are initialized according to their type:
Automatic initialization applies only to Working-Storage and does not apply to any item that (a) is given a VALUE clause, (b) is EXTERNAL, or (c) is subordinate to a REDEFINES phrase.
-Dl Allows you to limit the maximum alignment modulus that will be used for SYNCHRONIZED data items. Normally, a synchronized data item will be aligned on a 2, 4, or 8-byte boundary depending on its type. This option allows you to specify an upper bound to the modulus used. This should be specified as a single digit that immediately follows the "-Dl" as part of the same argument. For example, "-Dl4" specifies that the maximum synchronization boundary should be a 4-byte boundary. If you want to make programs that are compliant with the 88/Open COBOL specification, you should specify "-Dl4".
-Dm Causes any data item whose underlying type is binary to be stored in the minimum number of bytes needed to hold it. Normally, binary types are stored in two, four, or eight bytes. This option allows storage in any number of bytes ranging from one to eight. The exact number of bytes used for a particular data item is described under the USAGE clause in the ACUCOBOL-GT Reference Manual.
-Ds This causes USAGE DISPLAY numeric items with no SIGN clause to be treated as if they were described with the SIGN IS TRAILING SEPARATE clause. Several versions of RM/COBOL behave this way (all versions before 2.0, and some versions afterward).
-Dw Lets you modify the definition of certain data types. These data types are generally dependent on the host machine's native word size. You may use this option to:
"-Dw" selects the maximum word size of the set of machines that you expect to run on. You follow this option with the maximum word size you desire, expressed as the number of bits per word. Currently, the legal forms are "-Dw32" and "-Dw64".
SIGNED-SHORT
SIGNED-INT
SIGNED-LONG
POINTER
UNSIGNED-SHORT
UNSIGNED-INT
UNSIGNED-LONG
It also affects the size of the RETURN-CODE special register.
Selecting a maximum word size does not inhibit the portability of your code. Instead, it limits the size of certain data items. If you attempt to use a data item that is too small for a particular machine, you may lose precision. For example, USAGE POINTER data items are stored in 4 bytes if you use "-Dw32". If you attempt to run a program that stores an address in 4 bytes on a 64-bit machine, you may lose some of the address. While the program will technically run, the results may not be useful.
For maximum portability, you should use "-Dw64". This will allow your code to run on all machines that run ACUCOBOL-GT. For strict compatibility with ACUCOBOL-85 Version 2.2 or earlier, you should use "-Dw32". For programs prior to Version 2.3, the only real effect of shifting from "-Dw32" to "-Dw64" is that USAGE POINTER data types expand from 4 bytes to 8 bytes. If your program does not depend on the size of POINTER data items, then you should be able to use "-Dw64" with no harm.
If you use any of the "-C" compile options that establish source compatibility with ACUCOBOL-85 Version 2.2 or earlier (e.g. "-C21"), then the default setting is "-Dw32". If you do not use these options, then the default setting is "-Dw64". You may override the default by using the "-Dw" option. For example, to compile for source compatibility with Version 2.1, but to set the target architecture to 64 bits, you would use "-C21 -Dw64". In order to use "-Dw64", you must use a Version 2.3 or later runtime.
See the related information on USAGE types in the Reference Manual, section 5.7.1.8. See also the information on RETURN-CODE and support for 64-bit architectures in sections F.5.1.2 and F.5.1.3 in Book 4, "Appendices."
-Dy Specifies that all data items whose underlying representation is binary should be treated as if they were described as SYNCHRONIZED. This option is not recommended unless you have a particular need for it. ACUCOBOL-GT is optimized for non-synchronized handling of binary data, so synchronization will usually not have beneficial results. Note, however, that you must specify this option if you want to make programs that are compliant with the 88/Open COBOL specification.
-Dz This option causes the compiler to modify its size checking rules for numeric items. Instead of computing size error by examining the number of 9's in an item's picture, the compiler computes size error by examining the actual storage for that item. For example, normally a PIC 99 BINARY data item cannot hold a number larger than 99, although the storage for the item can hold a value up to 255. When "-Dz" is used, ACUCOBOL-GT will not cause a size error until a value greater than 255 is moved to this item. This option also affects truncation in MOVE statements and implied moves.
-D1 Causes any data item whose underlying type is binary to be stored in one byte if that data item has only one or two digits. Normally, such a data item would be stored in two bytes.
-D2 Causes COMPUTATIONAL data items to be treated as if they were declared as COMPUTATIONAL-2. This is the default when you are using RM/COBOL compatibility mode.
-D5 Causes data items declared as BINARY to be treated as if they were declared as COMPUTATIONAL-5. This causes the values to be stored in the host machine's native byte-ordering instead of the machine-independent byte-ordering normally used. This option should be used with caution because it can lead to programs that are not portable.
-D6 Causes unsigned data items declared as PACKED-DECIMAL to be treated as if they were declared as COMPUTATIONAL-6. This saves one-half of a byte because the compiler will not generate any storage for the sign.
-D7 Allows you to match one of the binary storage conventions used by Micro Focus COBOL. That convention is identical to the ACUCOBOL-GT "-Dm" convention, except that a PIC 9(7) data item (unsigned) is stored in 3 bytes instead of 4 and a PIC 9(12) data item (unsigned) is stored in 5 bytes instead of 6. When you use this option, the size of a binary item is determined as follows (the value in the table is the number of bytes occupied by the data item):
| Number of 9's in PIC
| Signed Storage
| Unsigned Storage
|
| 1 - 2
| 1
| 1
|
| 3 - 4
| 2
| 2
|
| 5 - 6
| 3
| 3
|
| 7
| 4
| 3
|
| 8 - 9
| 4
| 4
|
| 10 - 11
| 5
| 5
|
| 12
| 6
| 5
|
| 13 - 14
| 6
| 6
|
| 15 - 16
| 7
| 7
|
| 17 - 18
| 8
| 8 |