PreviousClass Library Embedded SQL ToolkitNext

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 Toolkit for directives relevant to SQL.

6.1 Defaults

All default directive settings in NetExpress 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 NetExpress:

BROWSE EXTINDEX OLDSTRSUB STRUCT XNIM

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

INCLUDE-FILLER MFOO REF

6.3 Changed Directives

Specifying NODBSPACE CONVSPACE in a $SET in your source code in NetExpress 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 NetExpress 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 AMODE CMPR2 COBOL370 CONVERTPTR DIALECT DOSVS DYNAM DYNAMICFD FLAGMIG FP-ROUNDING HOST-NUMCOMPARE LIBRARIAN MAPNAME ODOOSVS OLDCOPY OSVS PANVALET PROGID-COMMENT PROTECT-LINKAGE RDEFPTR 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 NetExpress 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.


Copyright © 1998 Micro Focus Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.
PreviousClass Library Embedded SQL ToolkitNext