Compiler options
COBOL for Linux® on x86 does not support the following COBOL for AIX® compiler options.
- ADATA
- The ADATA option is not currently supported. Use the default NOADATA for now.
- ARCH
- This option is used by COBOL for AIX to target different Power® machine architectures. It is not supported on Linux because COBOL for Linux on x86 makes use of the most efficient x86 instruction set currently available.
- ENTRYINT
- This option is treated as a comment on AIX, and not supported on Linux.
- DUMP
- Use of this option will generate a warning message but will not terminate compilation.
- LIB
- Use of this option will generate a warning message but will not terminate compilation.
- MAXMEM
- Use of this option will generate a warning message but will not terminate compilation.
- SIZE
- Use of this option will generate a warning message but will not terminate compilation.
COBOL for Linux on x86 does not support the following COBOL for AIX flag options:
- -cmain
-
On Linux, this option is accepted and ignored.
With COBOL for AIX, the -cmain option has an effect only if you also specify -host. When -host is used, the compiler needs a pseudo main program to convert the arguments from EBCDIC to ASCII, and then call the COBOL program. If you have a C or PL/I object file that contains a main routine, the -cmain option informs cob2 not to link with the pseudo main, and makes the C or PL/I object file that contains a main routine the main entry point in the executable file.
With COBOL for Linux on x86, cob2 always links with the pseudo main, and forces it to be the entry point of the executable. You can still have your own C program calledmain
, and it will be called from the pseudo main. If you do provide your own main(), it must understand that it is being passed a single z/OS® style parameter list with the string null terminated.struct plist { uint16_t len; uint8_t str[1025]; };
- -p and -pg
- These options are profiling options for use with tprof on AIX. On Linux, use Valgrind instead. No additional instrumentation or changes to the COBOL program are needed to make use of Valgrind.