PreviousClass Library Embedded SQL ApplicationsNext

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.

6.1 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.

6.2 Excluded Directives

The following directives are not in Net Express:

AMODE BROWSE CONVERTPTR EXTINDEX OLDSTRSUB RDEFPTR STRUCT XNIM

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

INCLUDE-FILLER MFOO REF

6.3 Changed Directives

Specifying NODBSPACE CONVSPACE in a $SET in your source code in Net Express does not make the File Handler convert DBCS space x"8140" to x"2020". To get this effect you must specify it in the project settings or on the command line.

This is because it works by setting COBSW=+Z, and this needs to be done before the source file is opened.

6.4 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 DYNAMICFD FLAGMIG FP-ROUNDING HOST-NUMCOMPARE LIBRARIAN MAPNAME ODOOSVS OLDCOPY OSVS PANVALET PROGID-COMMENT PROTECT-LINKAGE RDW SAA TRACE VSC2 ZWB

6.5 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.

6.5.1 Definition

The DIALECT directive is defined below.


Dialect

Makes the compiler accept a specified dialect. Sets other directives to enable run-time and compile-time behaviour appropiate to that dialect.

Syntax:

>>----------DIALECT(dialect)-------><

Parameters:
dialect Possible values: ANS85 COBOL370 DOSVS ISO2000 MF OSVS SAA1 SAA2 VSC21 VSC22 VSC23 VSC24

Properties:

Default: NODIALECT

$SET: initial

Comments

There is no explicit NODIALECT setting. DIALECT(dialect) is equivalent to USE(WBdialect.dir) in other Micro Focus COBOL systems. The various settings of the parameters set directives as follows.

6.6 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.


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

PreviousClass Library Embedded SQL ApplicationsNext