Compiling Native COBOL Programs for 64-bit

Restriction: The following information applies to native COBOL only.

You can use the IDE or the command line tools to compile programs for a 64-bit environment.

In the Eclipse IDE, you set your platform target to 64-bit prior to compilation by choosing 64 bit in the Bitism field on the Build Configurations > Link page.

You can also compile from the command line by using the 64-bit Command Line Tool that is supplied with your product. You use the same compilation syntax as you would to produce 32-bit output; see Compiling from the Command Line (Windows) for more information.

On UNIX platforms, you can control the effective working mode (either 32- or 64-bit) of your environment by using the cobmode utility or the COBMODE environment variable: when the effective working mode is 64-bit (which is the default), the generic cob command compiles a 64-bit executable. You can also use the 64-bit specific compilation command (cob64) from either working mode to compile a 64-bit executable. See The cobmode Utility for more information.