PreviousCompatibility Directives Compatibility with RM/COBOLNext

Chapter 3: Compatibility with DG Interactive COBOL

This chapter describes how to convert your DG Interactive COBOL application so that it is suitable for input to this COBOL system.

3.1 Overview

You need to take the steps listed below in order to convert your DG Interactive COBOL application so that it is suitable for input to this COBOL system:

  1. Reformat the DG Interactive COBOL source programs

  2. Submit your DG Interactive COBOL source programs to this COBOL system

3.1.1 DG Interactive COBOL Source Programs

Your COBOL system includes certain language enhancements that enable you to submit programs written in DG Interactive COBOL directly to this COBOL system. Provided your DG Interactive COBOL source programs conform to the standard file format for your operating system, there should be no problems in submitting most of these programs to this COBOL system. You should ensure that the expansion of tab characters in literals is not significant to the operation of your program before it is processed by this COBOL system.

However, if your program is written in DG CRT format, you must reformat the source file before you submit it to your COBOL system.

You must set the DG directive when you submit your source code to this COBOL system if your source code contains DG Interactive COBOL features that are not supported in the standard Micro Focus COBOL language, or if user-defined words are reserved words in the Micro Focus COBOL language. Refer to the Language Reference help for a list of Micro Focus COBOL reserved words, and for a full definition of all the syntax supported in the standard Micro Focus COBOL language. This manual also contains a full list of the additional DG Interactive COBOL features enabled in the Micro Focus COBOL language when you set the DG system directive. See the chapter Compatibility Directives for details of the DG directive.

3.1.2 Enhancing your Converted Application

Once you have successfully submitted your DG Interactive COBOL source programs to this COBOL system, you may wish to take advantage of some of the advanced features offered to you by the system. These features include:

Full details on these features and their associated syntax can be found in the Language Reference help.

In order to use these features you must specify certain Compiler directives, when you submit your source programs to this COBOL system. For example, you must set the ANS85 directive if you use ANSI '85 syntax in your source programs.

NetExpress:
See the Compiler Directives help for full details of all Compiler directives, and the features they enable.

Server Express:
See your Server Express User's Guide for full details of all Compiler directives, and the features they enable.

3.2 Compatibility with DG Interactive COBOL Source

All of the DG Interactive COBOL syntax as defined in revision 02, dated August 1984, of The Data General Interactive COBOL Programmer's Reference Manual is supported by your COBOL system, with the exception of:

UNDELETE RECORD

Support is not guaranteed for any of the syntax of the DG Interactive COBOL language that is not documented in the above revision of The Data General Interactive COBOL Programmer's Reference Manual.

If your DG Interactive COBOL programs perform any screen-handling operations you must run the Adiscf facility and select the DG screen-handling configuration option before you run them.

NetExpress:
See your NetExpress help for details on Adiscf.

Server Express:
See your Programmer's Guide to Creating User Interfaces for full details of this utility.

3.2.1 The DG Directive

Your DG Interactive COBOL source programs can contain:

In either case you must specify the DG Compiler directive when you submit such source programs to this COBOL system.

NetExpress:
See the Compiler Directives help for full details of all Compiler directives, and the features they enable.

Server Express:
See your Server Express User's Guide for full details of all Compiler directives, and the features they enable.

The Language Reference contains the DG syntax which is not found in the standard Micro Focus COBOL language. When you set the DG directive, the DG syntax is enabled in the Micro Focus COBOL language.

Features which are syntactically the same as Micro Focus COBOL features but have different behavior at run time, are described in the following sections of this chapter. Unless you set the DG directive at the time the object code is produced, this syntax behaves in the standard Micro Focus COBOL manner, as documented in the Language Reference. You do not need to amend DG Interactive COBOL source programs which contain these features, but if you try to submit them to this COBOL system without setting the DG directive they might not behave as you expect.

3.2.2 Reserved Words

The Language Reference lists all the words that are reserved in your version of the COBOL system. If you have included any of these words as user-defined words in your DG Interactive COBOL program, we advise that you use the REMOVE directive to disable the relevant reserved words in this COBOL system.

NetExpress:
See the Compiler Directives help for full details of all Compiler directives, and the features they enable.

Server Express:
See your Server Express User's Guide for full details of all Compiler directives, and the features they enable.

3.2.3 DG International Character Set

The environment dependent feature of DG Interactive COBOL which allows you to use an extra 69 characters in addition to the 96 characters in the ASCII set, is not supported by this COBOL system.

3.2.4 DG File Status and other Exception Values

DG Interactive COBOL file status and other exception values are not supported by this COBOL system, as they are environment dependent. If you wish to maintain a common source for programs used by both systems, you should maintain COPY-files of the file status values returned by each system.

3.2.5 Calls

DG Interactive COBOL system calls are environment dependent, and are not supported by this COBOL system. Under this COBOL system you cannot pass a switch in a CALL statement; you should use Linkage Section items to communicate between programs.

3.2.6 Linkage Section Access

DG Interactive COBOL allows a main program to access its Linkage Section but this facility is not supported by this COBOL system. We recommend that if a program is to be accessed as a main program, you transfer the Linkage Section entries into Working-Storage.

3.2.7 Arithmetic of Group Level Items

DG Interactive COBOL allows arithmetic of group level items, but this is not supported by this COBOL system. We recommend that you redefine such fields into numeric items to overcome this problem.

3.2.8 Run-time Switches

DG Interactive COBOL run-time switches A to Z, inclusive, are mapped onto switches 1 to 26, respectively, in this COBOL system.

NetExpress:
See Run-time Configuration in your on-line help for details of the run-time switches.

Server Express:
See your Server Express User's Guide for full details of the run-time switches.

3.2.9 Program Identification and Data-names

The DG Interactive COBOL system allows the Program-ID and a data item in that program to have the same name. However, this COBOL system does not allow the use of the same name for the Program-ID and a data item in a program, requiring instead that each should be unique. We recommend that you either change the program-name in the Program-ID and in any programs that call this program, or change the name of the data item.

3.3 Reformatting a DG COBOL Source File

Source programs written in DG Interactive COBOL CRT format cannot be accepted by this COBOL system unless you first amend the format, using a formatter or editor. This must alter the margins in these programs, and split any lines in them containing more than 72 characters, into lines of 72 characters or fewer.

3.3.1 Reformatting Rules

You should amend your source program according to the following rules:

  1. If the character in column 1 is an indicator (*/-), append six spaces to the beginning of a line.

  2. If the character in column 1 is any non-space character not mentioned in rule 1, append seven space characters to the beginning of the line.

  3. If area A (columns 1 to 4 inclusive) contains all spaces, append seven additional space characters to the beginning of the line. However, if the entire line contains spaces, it outputs a single 72 character line containing spaces.

  4. If a line is too long to fit onto a single 72 character line, break it onto subsequent lines, up to a maximum of three. Where possible, these breaks occur at a space character to preserve the program's readability.

  5. If a line is expanded beyond 132 characters, truncate the line to 132 characters. This prevents any pseudo-comment areas from being included in the program source.


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

PreviousCompatibility Directives Compatibility with RM/COBOLNext