Backward Compatibility with Earlier Micro Focus Products

COBOL applications developed and built using previous Micro Focus products can be developed and built with Visual COBOL. However, there are some differences in behavior and in terminology.

Executables requiring recompilation

If you are on the AIX platform, due to an internal change in version 2.0 of your product, you must recompile and/or relink your programs compiled prior to this version, to make them compatible with this run-time system.

Terminfo files

The following terminfo files have been removed:

  • AT&T
    • att605
    • tty5420
  • IBM
    • ibm3151
  • Qume
    • qvt102
  • Wyse
    • wy120
    • wy120-25
    • wy50
    • wy60
    • wy60-w
    • wy75
    • wy85

Diagnostic tools

The FaultFinder tool has been removed from the current version of Visual COBOL. This includes the removal of the following tunables:

  • faultfind_level
  • faultfind_outfile
  • faultfind_recsize
  • faultfind_config
  • faultfind_cache_enable

You should either remove these tunables from your application or set the tunable cobconfig_error_report=false in your configuration file.

You should also remove any calls to the library routine CBL_FFND_REPORT, as this now produces a COBRT107 Operation not implemented in this run-time system (fatal) error.

Backward Compatibility with Studio Enterprise Edition

File Control Description (FCD)
The FCD format for file handling operations in 32-bit applications defaults to FCD3 in Visual COBOL; in Studio Enterprise Edition, it defaulted to FCD2.

Backward Compatibility with the Net Express and Mainframe Express IDE

The main differences between the Net Express, Mainframe Express and Eclipse IDEs are:

  • Perspectives. The COBOL perspective shows the views and menus relevant to COBOL development, such as the COBOL Explorer, Program Outline, Outline and Console views. There are other perspectives for Debugging and CTF.
  • Project > Build automatically. Whenever changes to a resource are saved, an incremental build starts, which rebuilds all the resources modified since the last build. You can force a rebuild by using Project > Clean.
  • Build settings. These are available in three places:
    • Project > Properties > Micro Focus > Project Settings. You can specify any additional directives to be passed to the compiler at build time. These settings do not depend on the active build configuration and are always passed to the compiler.
    • Project > Properties > Micro Focus > Build Configurations. You can have multiple build configurations for different build scenarios and swap between them. You choose the configuration you want to use, by setting it as the current active configuration. This then overrides the project language settings.
    • Properties on the context menu for a single file. To set this, right-click the COBOL file in the COBOL Explorer pane. The settings are specifically for this file and they override the currently active build configuration and the Project Language Settings.
  • Debug and run configurations. You need one of these before you can debug or run a program. They are available from:
    • Project > Properties > Micro Focus > Run-time Configuration. These are the run-time settings for this project, such as run-time arguments, run-time tunables, COBOL switches and so on.
    • Run > Debug Configurations. Like build configurations, you can have multiple debug configurations and swap between them. These override the project run-time configuration.
    • Run > Run Configurations. These behave in the same way as debug configurations, but provide slightly different options.
  • Cheat sheets. These are like tutorials and give step-by-step instructions on how to do a task, together with brief explanations. See Help > Cheat Sheets > COBOL Development. There are cheat sheets to:
    • Create a project to say "Hello COBOL World".
    • Import existing COBOL files into Eclipse
    • Debug a program

Changes in some options and files delivered with the product include:

Treatment of DBCS literals
In Net Express, under the NCHAR directive, if an alphanumeric literal contained only DBCS characters, then the literal was treated as class NCHAR. In Visual COBOL, this is not true, and you are required to prefix literals in the procedure division with N to achieve equivalent behavior (for example: IF N"dbcs-chars" = data-item-1.), which is significant when performing comparisons, where NCHAR literals get padded with double byte spaces. In Visual COBOL, all literals that are surrounded by quotes without any character specified (B", N", etc...) are always treated as alphanumeric.
Note: In the following scenario, the literal is still treated as a NCHAR literal:
01 data-item pic N value "dbcs-charaters".
ADIS
In earlier Micro Focus products, the default location for the ADISCTRL file was $COBDIR. The default location of the file in Visual COBOL is $COBDIR/etc.
Default working mode
In Server Express and in versions of Visual COBOL R4 and earlier, the default working mode set by the COBMODE environment variable was 32-bit. With the current release of Visual COBOL and Enterprise Developer, it is 64-bit.
Format of the index files
In Net Express and Server Express, the default setting of the IDXFORMAT option was 4. With the current release of Visual COBOL, it is 8.
FILEMAXSIZE File Handler configuration option

In Net Express and Server Express, the default setting for FILEMAXSIZE was 4. With the current release of Visual COBOL, it is 8.

The following table lists some features in the Net Express IDE and gives their corresponding names and locations in the Eclipse IDE.

Net Express IDE Eclipse IDE
.app file .cobolProj file
Add files to a project File > Import. See To import existing files
Break on data change Run > Toggle Watchpoint or double-click in the left margin.

Watchpoints are set on data items and the execution of the program suspends when the data item changes.

Breakpoints Run > Toggle Breakpoint or double-click in the left margin.

Breakpoints in Eclipse are set in source files, not in programs (as they are in other Micro Focus products). This means that a single breakpoint may actually be set many times if the source file is used in multiple programs or used multiple times in the same program. See Breakpoints Example

Build settings and build types Project > Properties > Micro Focus > Build Configuration. See Project Properties and Configurations
Build project By default, Project > Build automatically is set. This ensures that whenever a resource changes, an incremental build starts and all resources modified since the last build are rebuilt. To build manually, click Project and uncheck Build Automatically. Then, click Project > Build or Project > Clean.
Call stack The Debug view shows the call hierarchy, showing where the current statement was called from or performed from, and where previous calls and performs came from. It shows all threads. You can move the execution point, by right-clicking a thread and choosing an option from the menu.

The Debug view is shown by default in the Debug perspective at the top left. You can show it by clicking Window > Show View > Debug.

Compile See Build project above.
Compile a single file This is not available in Eclipse. Instead, you compile the whole project. You can suppress compilation of a file, by right-clicking the file and setting Build Action > Ignore.
Copybook paths Project > Properties > Micro Focus > Copybook Paths. The search order here takes precedence over the COBCPY environment variable setting. To add copybook paths to this list, specify the paths as linked resources.
Copybook expansion COBOL Copy View expands the content of copybooks inline in the code of the main program. This view is read only view. To edit a copybook, you need to open it in the COBOL editor.
Data item values Hover over a data item to see its value.
Debug See To debug a COBOL program
Inspect Right-click a data item and click Inspect COBOL.
Main program to debug Run > Debug Configurations and then on the General tab, specify the main program file. To create a debug configuration
Monitor a data item Monitor changes of variables in the Variables view. The Variables view is shown by default in the Debug perspective at the top. You can show it by clicking Window > Show View > Variables.
Project Properties Project > Properties > Micro Focus > Build Configuration. See Project Properties and Configurations and How to
Restart Debugging Right-click in the Stack view of the Debug perspective and click Terminate and Relaunch
Run-time Environment Settings Project > Properties > Micro Focus > Run-time Environment Configuration. See Project Properties and Configurations and To build a COBOL project
Stop Debugging Run > Terminate. You can also click the red square at the top. See To debug a COBOL program
Watch list Right-click > Inspect COBOL > Add to Expressions

The Expressions view is shown by default in the Debug perspective at the top left. You can show it by clicking Window > Show View > Expressions.

Backward Compatibility with Earlier Versions of Visual COBOL

File Locking
In versions prior to Visual COBOL 2.3, the semantics of the sharing phrase specified in an OPEN statement or used within a call to CBL_OPEN_FILE were not correctly applied in some cases on UNIX and Linux platforms. From version 2.3 onwards, the sharing phrase is correctly honored when the tunable strict_file_locking=true is set, which is the default setting.
Example of potential changes in behavior:
  • Process-A opens a file with read-only access and a sharing mode that denies other processes write access (SHARING WITH READ ONLY).
  • Process-B then attempts to open the file with read-only access and a sharing mode that denies other processes read access (SHARING WITH NO OTHER).
With strict_file_locking=true, Process-B is unable to open the file, because Process-A has successfully opened the file allowing only read access.

With strict_file_locking=false, Process-B successfully opens the file.

If your application encounters unexpected OPEN conditions or fails to open files, it might be as a result of the new file locking behavior. In such circumstances, we recommend that you review the file locking and sharing requirements of your application and refactor your source code to work with the default setting. The original file locking and sharing behavior can be restored by setting strict_file_locking=false.
Fileshare through Enterprise Server
Fileshare through Enterprise Server should use the TCP/IP protocol (CCITCP) in preference to CCI Named Pipes (CCINAMPU), because support for CCINAMPU is deprecated.
Updated run-time system

COBOL Server now provides an execution environment capable of running applications that were each built using different development products. A consequence of this is that If your application has a main COBOL executable (.exe) that was built with a version of Visual COBOL prior to version 2.3, you should ensure that the executable is rebuilt and packaged with the new run-time system. You can rebuild from the IDE or the command line.

Other COBOL subprograms built with previous versions of Visual COBOL are not required to be rebuilt.

JVM COBOL
Visual COBOL for Eclipse now ships with Eclipse 4.7 (Oxygen). A consequence of this is that if your application contains JVM COBOL code that was built with a version of Visual COBOL prior to version 2.3, those parts of your application must be rebuilt; otherwise you will experience errors at either compilation or run time.
Calling program search order
In previous versions of Visual COBOL (and earlier Micro Focus products) you could use a run-time tunable to define a specific order in which the run-time system searches for called sub-programs. Due to changes in the run-time system, there is only one viable specific search order, and therefore the program_search_order tunable is no longer available; remove the tunable from any configuration you have set. The default (and only) order used is:
  • If the sub-program is already loaded, or is statically linked, it is located and the search ends.
  • On UNIX platforms, if you are calling shared objects (.so), without a specific path, the LD_LIBRARY_PATH or LIBPATH environment variable is searched.
  • If COBPATH is set, the list of paths in the variable are searched, in order; if COBPATH is not set, the current directory is searched.
  • The path of the calling program is searched.

If the sub-program cannot be located using one of the above methods, a run-time error is produced.

Using parentheses in member reference
In managed COBOL syntax, you may only use parentheses when referencing methods. You can no longer specify parentheses when referencing fields or properties, as this will produce a syntax error.

For example:

set intLength to testString::Length()

must change to:

set intLength to testString::Length
Calling RM/COBOL compatible library routines
Previously, to call an RM/COBOL compatible library routine, you had to set the DIALECT"RM" Compiler directive, which ensured the correct call-convention was used. To set this functionality now, you must explicitly use the correct call-convention in the CALL statement.
DIALECT"ENTCOBOL"
DIALECT"ENTCOBOL" now sets NSYSMBOL"NATIONAL"; previously, this set NSYMBOL"DBCS".
JVMDECIMAL
Note: This is applicable to JVM COBOL only.
This Compiler directive now controls how the following items are exposed in Java:
  • Data items of type DECIMAL
  • Non-integral data items exposed as the result of ILSMARTLINKAGE
  • Non-integral data items exposed as the result of a PROPERTY keyword
Previously, these items would each be exposed as a ScaledInteger, which is still possible using JVMDECIMAL, but the directive's default is to expose each item as a BigDecimal.
IDXFORMAT
The default setting of the IDXFORMAT option has changed since version of Visual COBOL Development Hub R4 from 4 to 8.
ILREF
Previously, you could specify .jar files and other formats as a parameter when using this Compiler directive. Now, you can only specify .class files.
ILUSING
If you set this Compiler directive using the $set command, the imported namespace is only applicable to programs, classes and referenced copybooks in that file. If you set the directive through the IDE or from the command line, the imported namespace is applicable to all programs and classes in the project or specified on the command line.
FLAGCD
This Compiler directive is no longer available in Visual COBOL. Remove it from your code, otherwise you receive a COBCH0053 Directive invalid or not allowed here error.
CALLFH
If your code specifies the ACUFH parameter, it may now produce adverse effects when used. You should replace it with the methods described in Configuring Access to Vision Data Files or Configuring Access to RM/COBOL Data Files. Both of these methods offer a fuller-functioning solution to handling these types of data files.
Compatible ACUCOBOL-GT file handling environment variables
The following environment variables, introduced for ACUCOBOL-GT compatibility, have been replaced with other environment variables or configuration options that you add to your File Handler configuration file. No other ACUCOBOL-GT file handling environment variables are supported.
Redundant variable Replaced with
FILE_CASE FILECASE configuration option
FILE_PREFIX COBDATA environment variable
FILE_SUFFIX FILESUFFIX configuration option
APPLY_FILE_PATH n/a
FILE_ALIAS_PREFIX dd_ mapping

Setting these environment variables will have no effect.

Coexisting with Earlier Micro Focus Products

Run-time system error due to COBCONFIG
A run-time system error occurs if the COBCONFIG environment variable is set when you run Visual COBOL applications or when you use Visual COBOL to edit or create projects and the configuration file it refers to contains entries that are not valid for Visual COBOL.

For example, this might happen if you have Studio Enterprise Edition installed and COBCONFIG is set for it.

To work around this issue, ensure that Visual COBOL is not running and then modify the configuration file by doing one of the following:

  • If the invalid tunable is not needed by another application, remove it from the run-time configuration file.
  • Add the following as the first line in the configuration file:
    set cobconfig_error_report=false
  • Unset COBCONFIG or set it to another configuration file that does not contain the invalid tunable for the particular session you are running in.