If you move programs to the AIX workstation from the mainframe and compile them in the new environment, you need to choose the right compiler options and be aware of language features that differ from mainframe COBOL. You can also use the COPY statement to help port programs.
Choosing the right compiler options: The NOADV COBOL compiler option, available on the mainframe, is not applicable under COBOL for AIX, and is treated as a comment. It might yield unpredictable results. The compiler flags it with a W-level message:
For additional information about host compiler options that affect portability, see the related reference about compiler options.
Allowing for language features of mainframe COBOL: Several language features that are valid in mainframe COBOL programs can create errors or unpredictable results when compiled with COBOL for AIX. For details, see the related reference about language elements.
Using the COPY statement to help port programs: In many cases, you can avoid potential portability problems by using the COPY statement to isolate platform-specific code. For example, you can include platform-specific code in a compilation for a given platform and exclude it from compilation for a different platform. You can also use the COPY REPLACING phrase to globally change nonportable source code elements, such as file-names.
related tasks
Setting environment variables
related references
Compiler options
Language elements
COPY statement (COBOL for AIX Language Reference)