Rational Developer for System z
COBOL for Windows, Version 7.5, Programming Guide


Writing code to run on the mainframe

You can use IBM COBOL for Windows to write new applications, taking advantage of the productivity gains and increased flexibility of using your Windows-based workstation. However, you need to avoid using language features that are not supported by IBM mainframe COBOL.

IBM COBOL for Windows supports several language features not supported by the IBM mainframe COBOL compilers. As you write code on the Windows-based workstation that is intended to run on the mainframe, avoid using these features:

Several compiler options are not available with the mainframe compilers. Do not use any of the following options in your source code if you intend to port the code to the mainframe:

Be aware of the difference in file-naming conventions between Windows and other file systems. Avoid hard-coding the names of files in your source programs. Instead, use mnemonic names that you define on each platform, and map them in turn to mainframe ddnames or environment variables. You can then compile your program to accommodate the changes in file-names without having to change the source code.

Specifically, consider how you refer to files in the following language elements:

Multithreaded programs on the mainframe must be recursive. Therefore, avoid coding nested programs if you intend to port your programs to the mainframe and enable them for execution in a multithreaded environment.


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)