PreviousIntroduction Publisher Set-upNext

Chapter 2: Portability Issues

This chapter describes syntax that the Net Express Compiler can flag, using warning or information error messages, as being incompatible between Net Express and COBOL for UNIX. However, the Net Express Compiler cannot flag all incompatibilities, so this chapter also describes syntax that you should manually check and change before porting the program to a UNIX system.

If a section is flagged as Not Server Express, the portability issues in that section can be ignored if you are publishing to a UNIX system that has Server Express installed.

2.1 Syntax Checking

The default for the INTLEVEL directive, for both Net Express and COBOL for UNIX, is set to 2. This is the value required to create portable intermediate code. However, certain syntax in Net Express COBOL, even when compiled with INTLEVEL"2", generates intermediate code that might not run on UNIX systems.

Therefore, if you set the WARNINGS"2" Compiler directive, the Net Express Compiler flags those syntax structures likely to cause problems if ported to a UNIX system.

2.2 Syntax Flagged

Not ServerExpress:
If you compile a program with the INTLEVEL"2" and WARNINGS"2" directives set on Net Express, various syntax structures are flagged. The flags are in the form of information or warning messages. You can increase the severity of an informational or warning message to a severe error using the CHANGE-MESSAGE Compiler directive. The following syntax is flagged:

2.3 Syntax Not Flagged

The following syntax is not flagged, but you should check for occurrences in your programs:

You should also be aware of the following differences between COBOL for UNIX and Net Express COBOL:

2.4 Using the LINKCOUNT Directive

Not Server Express:
The COBOL for UNIX Compiler has a different mechanism to the Net Express Compiler for allocating storage slots for data items. Therefore, programs that work when compiled using Net Express might give the Compiler error:

0067 Please recompile using a larger value for the LINKCOUNT directive

when published to the UNIX system. If this happens you should set the LINKCOUNT directive in the program causing the error using a $SET statement in the COBOL source program.

2.5 Debugging and .idy Files

Not Server Express:
The format of .idy files is different between the Net Express and Object COBOL Development System 4.1 and earlier versions of COBOL for UNIX. Hence, you cannot use the .idy file created by Net Express on these systems.

2.6 Object Oriented Programs

Not Server Express:
In Object COBOL V4.1 for UNIX you need to specify the MFOO Compiler directive to check Class and OO programs. This directive loads the Object COBOL reserved words. Net Express accepts the MFOO directive, but ignores it, as all the Object COBOL reserved words are already loaded by default.

To develop an OO program or class under Net Express, and then recompile it using COBOL for UNIX, you need to specify the MFOO directive. This is best done by setting the directive using a $SET statement in the source code.

You should also be aware of the following:

2.7 CGI Applications

The various versions of COBOL for UNIX provide differing levels of support for the syntax and run-time support required by CGI applications. For example, Object COBOL V4.1 for UNIX introduced the ACCCGI run-time support module.

The UNIX Option provides a standard level of CGI syntax and run-time support for all COBOL for UNIX products. If the COBOL for UNIX product provides its own syntax or run-time support, this is automatically used by the UNIX Option.


Copyright © 2000 MERANT International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.

PreviousIntroduction Publisher Set-upNext