Compile Your Existing Programs without a Project

Enterprise Developer includes a lot of enhancements and changes and this is why applications that were compiled using earlier Micro Focus products must be recompiled from the sources using Enterprise Developer.

Micro Focus recommends you first compile without a project as you would have done in Server Express. This will help you focus on resolving any compilation issues following the changes in the environment. Then, you can look at creating a Enterprise Developer project in order to take advantage of all the benefits offered by the IDE.

To compile your existing programs from a terminal window directly on the UNIX machine:

  1. Ensure that Micro Focus Enterprise Developer UNIX Components is installed on the remote machine where you store your existing COBOL programs.
  2. Log onto the remote machine and from a terminal window, configure the environment and compile your programs using the cob command or the build scripts or makefiles used to build the application with Server Express.

Most programs created with Server Express should compile cleanly using your existing build scripts and makefiles without any changes to your code, as Enterprise Developer also provides the cob utility to create .int, .gnt or .o files.

Fixing compilation issues

Because Micro Focus continues to enhance the COBOL language, you might encounter some problems when compiling your existing Server Express applications in Enterprise Developer.

For example, the list of reserved COBOL words changes with each new level of the COBOL language, so an application created with an older Micro Focus product might use data names that are now reserved keywords in Enterprise Developer. If this happens, a COBOL syntax error COBCH0666 ("Reserved word used as data name or unknown data description qualifier") occurs. See Reserved Words Table in this product help for a comprehensive list of reserved words and the levels at which they are supported.

Also, these Server Express Compiler directives are no longer supported:

  • 01SHUFFLE
  • 64KPARA
  • 64KSECT
  • AUXOPT
  • CHIP
  • COBIDY
  • DATALIT
  • EANIM
  • EDITOR
  • ENSUITE
  • EXPANDDATA
  • FIXING
  • FLAG-CHIP
  • MASM
  • MODEL
  • OPTSIZE
  • OPTSPEED
  • PARAS
  • PROTMODE
  • REGPARM
  • SEGCROSS
  • SEGSIZE
  • SIGNCOMPARE
  • SMALLDD
  • TABLESEGCROSS
  • TRICKLECHECK
  • WB2
  • WB3
  • WB
and the pseudovariables of the following Server Express environment variables are obsolete and can't be used.
  • BASENAME
  • FILENAME
  • PATH
  • TARGETDIR

You should consider using the following methods to solve such issues:

  • Rewrite the source to avoid using these keywords in your code and directives files.
  • Use the REMOVE Compiler directive to remove individual keywords from the reserved words list.
  • Use the MF or MFLEVEL compiler directive to select an earlier version of Micro Focus COBOL that your code is compatible with. For example, setting MFLEVEL"12" ensures compatibility with Mainframe Express 3.0 and 3.1, Net Express 4.0, 5.0, and 5.1, and Server Expresss 4.0, 5.0, and 5.1. Refer to Reserved Words Table in this product help for the value to use to ensure support for your existing reserved words.

To use REMOVE from the terminal window (or later in the editor in Eclipse), type the following:

cobol myprogram.cbl remove(title) ;

The command above removes TITLE as a keyword from the language so you can use it as an identifier in a COBOL program.

To use the set of reserved words that was used for Server Express v5.1 WrapPack 5, use this command line:

cobol myprogram.cbl mflevel"15" ;

To set either one of the directives in your source code, type the following starting with $ in the indication area of your COBOL program:

$set remove "title"

Or:

$set mflevel"15"