This chapter describes syntax that the NetExpress Compiler can flag, using warning or information error messages, as being incompatible between NetExpress and COBOL for UNIX. However, the NetExpress 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.
The default for the INTLEVEL directive, for both NetExpress and COBOL for UNIX, is set to 2. This is the value required to create portable intermediate code. However, certain syntax in NetExpress 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 NetExpress Compiler flags those syntax structures likely to cause problems if ported to a UNIX system.
If you compile a program with the INTLEVEL"2" and WARNINGS"2" directives set on NetExpress, 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:
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 NetExpress COBOL:
The COBOL for UNIX Compiler has a different mechanism to the NetExpress Compiler for allocating storage slots for data items. Therefore, programs that work when compiled using NetExpress 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.
The format of .idy files is different between the NetExpress and COBOL for UNIX products. Hence, the .idy file created by NetExpress compilation cannot be used by COBOL for UNIX.
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. NetExpress 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 NetExpress, 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:
class-control. logicalClassName is class "physicalFileName".
In NetExpress, the logicalClassName is scoped within the individual
class or program in which it exists. It has no effect beyond this. In
earlier versions of Object COBOL, the logicalClassName has global
scope; if entries exist for a given logicalClassName in more than one
compilation unit, the entries need to match, otherwise run-time error
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 © 1998 Micro Focus Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.