Previous Topic Next topic Print topic


Creating 64-bit Programs from 32-bit Programs

Important: For UNIX environments Default working mode is 64-bit. You can change the working mode by editing your build configuration and choosing the necessary Platform Target on the COBOL page of the configuration dialog box. You can also change the mode with the COBMODE environment variable or the cobmode command.

In general, you can take a 32-bit program, recompile it with the P64 Compiler directive set, and it should run without problem as a 64-bit application. There are, however, certain circumstances in which the conversion of your program won't be as simple as this:

If your program uses pointers
You need to ensure that pointers are not redefined or modified by reference. There should also be no assumptions in your record definitions about the sizes of pointers.
If your program uses a File Control Description (FCD) block that has been directly coded
The program will have to be modified to use the 64-bit FCD3 format if the 32-bit program was using the older FCD2 format. 64-bit programs need an FCD control block that has a different format to that used by older 32-bit applications.
Previous Topic Next topic Print topic