To run a native COBOL application from a network server

You need to configure the licensing for COBOL Server when running native COBOL applications from a network server.

The following instructions are based on 64-bit Windows environments where:

In 32-bit Windows environments, these locations are as follows:

Your native COBOL program must be compiled in Visual COBOL with the dynamic link setting enabled. You do this as follows:

In Visual Studio:

  1. In Visual Studio, load the project for your application.
  2. Click Project > MyProject Properties.
  3. Click the COBOL Link tab in the properties and then click Dynamic.
  4. Save your changes and rebuild the solution.

In Eclipse:

  1. In Eclipse, open the project for your application.
  2. Click Project > Properties.
  3. Click Micro Focus > Build Configurations > Link.
  4. Click Dynamic and then click OK.
  5. Ensure your project recompiles.

To enable a COBOL application to be launched from the client machine, you need to configure the environment at both the server and the client sides as follows:

Server Side

The following instructions show how to install the entire COBOL Server and configure it so that your application uses its run-time system modules.

Important: You must remove any individual copies of run-time system modules (for example, cblrtsm.dll) that might have been copied into your application’s working directory. This is to avoid issues with running the application such as "245 no valid licenses found" as the run-time system is not loading from the expected location, or where the copied run-time modules are from other versions of the product versions. Removing such modules ensures that any run-time system modules are only loaded from the COBOL Server instance which you have installed following the instructions in this topic.

Perform the following steps on the server:

  1. Ensure is installed.
  2. Start Micro Focus License Administration. COBOL Server

    See To start Micro Focus License Administration for details.

  3. Install the license:
    • Click Options > Advanced Configuration.
    • Click Change on the row for License server field, specify the IP address or the name of the server, and click Save.
    • Close both the Advanced Configuration and the Micro Focus Licensing System Administration dialog boxes.
  4. Copy the following files to the %ProgramFiles(x86)%\Micro Focus\COBOL Server\bin folder:
    • C:\Program Files (x86)\Common Files\Safenet Sentinel\Sentinel RMS License Manager\WinNT\mfcesd.exe
    • C:\Program Files (x86)\Common Files\Safenet Sentinel\Sentinel RMS License Manager\WinNT\mfcesdchk.exe
    • C:\ProgramData\Micro Focus\ces.ini
      Note: By default, the C:\ProgramData folder is hidden. See the Windows help for information about how to make it visible.
    • Copy the following file from the development machine where Visual COBOL is installed:
      • For applications compiled as 64-bit, copy C:\Windows\System32\msvcr110.dll to %ProgramFiles(x86)%\Micro Focus\COBOL Server\bin64.
      • For applications compiled as 32-bit, copy C:\Windows\SysWOW64\msvcr110.dll to %ProgramFiles(x86)%\Micro Focus\COBOL Server\bin.
    • Create a network shared folder, such as MicroFocusSrv from %ProgramFiles(x86)%\Micro Focus\COBOL Server and only give it read-only access for users.
    • If your COBOL application is deployed on the server:
      1. Use a text editor to create a run-time launch file, progname.exe.mfcfg, where progname is the same name as the name of the executable, progname.exe.
        Tip: If there are multiple .exe files, you can instead create one mfdefault.exe.mfcfg file, to be used for all .exe files. When running .int and .gnt files with run.exe, we recommend you do create mfdefault.exe.mfcfg.
      2. Include the following two lines in the launch file:
        SET SERVERPATH=\\ServerName\MicroFocusSrv
        SET CESDYNAMIC=ces.ini

        where:

        • ServerName is the server's name or IP address
      3. Add the run-time launch configuration file in the same folder as the application's .exe file.

Client Side

Perform the following steps on the client machine:

  1. Add the bin subfolder within the COBOL Server shared folder you created on the server, MicroFocusSrv, and the application folder to the PATH environment variable as follows:
    • For COBOL applications compiled as 64-bit:
      PATH=\\ServerName\MicroFocusSrv\bin64;\\ServerName\MicroFocusSrv\bin;<AppFolder>;%PATH%
    • For COBOL applications compiled as 32-bit:
      PATH=\\ServerName\MicroFocusSrv\bin;<AppFolder>;%PATH%

    where:

    • ServerName is the server's name or IP address
    • <AppFolder> is the application folder
  2. If your COBOL application is deployed on the client machine:
    1. Use a text editor to create a run-time launch file, progname.exe.mfcfg, where progname is the same name as the name of the executable, progname.exe.
      Tip: If there are multiple .exe files, you can instead create one mfdefault.exe.mfcfg file, to be used for all .exe files. When running .int and .gnt files with run.exe, we recommend you do create mfdefault.exe.mfcfg.
    2. Include the following two lines in the launch file:
      SET SERVERPATH=\\ServerName\MicroFocusSrv
      SET CESDYNAMIC=ces.ini

      where:

      • ServerName is the server's name or IP address
    3. Add the run-time launch configuration file in the same folder as the application's .exe file.
  3. Run the application.