Chapter 6: Directives and Dialects

Many details of the compiler's behavior and of the COBOL language it accepts can be specified by directives. This chapter tells you whether default settings have changed since your previous COBOL system

This chapter also describes directives to help migration from IBM mainframes, including the DIALECT directive, which replaces the USE directive and wb*.dir files of Workbench.

See the chapter Embedded SQL Applications for directives relevant to SQL.

Defaults

All default directive settings in Net Express are the same as in Object COBOL V3.4, Workbench V3.4, Object COBOL V4.0, Workbench V4.0, and Visual Object COBOL V1.0.

Excluded Directives

The following directives are not in Net Express:

The following directives are accepted but do nothing as they are meaningless in Net Express:

Changed Directives

Mainframe Directives

Here is a list of directives in Net Express that make the compiler behave like an IBM mainframe compiler. These directives are not in Visual Object COBOL V1.0, but they are in Workbench V3.4 and Workbench V4.0. They are documented in the manuals you received with Workbench.

  • ADV
  • CMPR2
  • COBOL370
  • DIALECT
  • DOSVS
  • DYNAM
  • FLAGMIG
  • FP-ROUNDING
  • HOSTFD
  • HOST-NUMCOMPARE
  • HOST-NUMMOVE
  • LIBRARIAN
  • MAPNAME
  • ODOOSVS
  • OLDCOPY
  • OSVS
  • PANVALET
  • PROGID-COMMENT
  • PROTECT-LINKAGE
  • RDW
  • SAA
  • TRACE
  • VSC2
  • ZWB

The DIALECT Directive

In Workbench, files of directives (wb*.dir files) are supplied containing sets of directives to make the COBOL accepted by the compiler match particular dialects, and you can use the USE(filename) directive to specify which one to use. This makes it easy to migrate programs originally written for non-Micro Focus COBOL systems, especially for IBM mainframes.

In Net Express these files and the USE directive are replaced by the DIALECT directive. In the DIALECT directive, you specify the dialect you want, and the necessary directives are set for you.

The DIALECT directive is described in the topic DIALECT Compiler directive.

DB2 PASS Compiler Directive

The PASS directive for specifying the user ID and password is not used for the Net Express DB2 ECM interface.

If an application needs to connect to a DB2 database that includes the DB2 ECM, the compiler picks up the user ID and password from a common module MFDB2CON. If a user ID and password is required, that module displays a graphical window requesting a user ID and password.

You have the option to save your user ID and password so that you do not need to be prompted the next time you compile a program using the same database. This information is lost if you re-boot your client machine. You can also remove it by using the following command from a Net Express command prompt:

MFDAEMON CLOSE

The DB2 INIT directive no longer generates blank host variables for LOGON ID and PASSWORD if the DB2 PASS directive is not specified, because DB2 UDB now generates an SQL error when these variables are passed with spaces or low values on CONNECT. Programs compiled with these directive settings will no longer work. We strongly recommend that programs do not use these directives, but instead add a SQL CONNECT statement to their program. This change in behavior affects DB2 UDB V7.2 with FixPack 8 or later.


Copyright © 2009 Micro Focus (IP) Ltd. All rights reserved.