Compatibility Considerations [ HP COBOL II/XL Reference Manual ] MPE/iX 5.0 Documentation
HP COBOL II/XL Reference Manual
Compatibility Considerations
There are several compatibility issues to consider when using the HP
COBOL II compiler.
Compatibility between ANSI COBOL'74 and ANSI COBOL'85
The HP COBOL II compiler is compatible with the ANSI COBOL'74 standard.
Through the use of entry points to the compiler you can choose which
standard to execute, thereby avoiding any conversion issues between the
two standards. Some incompatibilities between ANSI COBOL'74 and ANSI
COBOL'85, such as reserved words, allow you to preserve existing source
code while doing new development using the ANSI COBOL'85 standard. Or if
you choose to move all of your applications to the ANSI COBOL'85
standard, the compiler flags the syntax changes, allowing you to modify,
recompile, and execute using the ANSI COBOL'85 entry point.
For a complete list of the incompatibilities between ANSI COBOL'74 and
ANSI COBOL'85, as well as obsolete features to consider when upgrading,
refer to Appendix C .
[REV BEG]
Compatibility of COBOL Functions
The COBOL functions add the reserved word FUNCTION to the COBOL language.
HP COBOL II maintains compatibility with existing programs. Your
existing programs will continue to compile without change. If you want
to use the COBOL functions, you must use $CONTROL POST85 and you must not
use the word FUNCTION as an identifier anywhere in your program. If you
have used the word FUNCTION as an identifier, you must change it to
another word before you can call any COBOL functions. Otherwise, the
compiler gives an error message.
HP Extensions
HP extensions are features added to HP COBOL II that are not part of the
ANSI standard. These features make COBOL easier to use on the MPE
operating system and ease the conversion from previous versions of the
ANSI standard.
You can use the HP extensions with either the ANSI74 or ANSI85 entry
points unless one of the following is true:
* The HP extension if part of a ANSI COBOL'85 feature.
* The HP extension contains a ANSI COBOL'85 reserved word.
* The description of the HP extension specifically mentions that it
can be used only with the ANSI85 entry point.
$CONTROL STDWARN flags features that are HP extensions. HP extensions
are generally not portable to other systems. For a list of HP
extensions, see the HP COBOL II/XL Programmer's Guide.[REV END]
Portability to HP from Other Vendors
If you are transferring COBOL source programs and data to an HP computer
system from another system, ANSI standard features are compatible. Any
extension to accommodate vendor operating systems and file systems need
to be examined for conversion efforts. Consult your HP representative
for assistance and advice.
[REV BEG]
Portability between HP COBOL II/V and HP COBOL II/XL
For portability from HP COBOL II/V to HP COBOL II/XL, compiler options
provide 16-bit or 32-bit alignment for synchronized items and allow
passing of parameters on byte boundaries, as well as word boundaries.
These features allow compatibility with 32-bit or 16-bit architectures.
For more information, refer to the HP COBOL II/XL Migration Guide.[REV
END]
MPE/iX 5.0 Documentation