Skip to main content

Problem:

How to deploy native applications built with Visual COBOL 2.2 on the network?

Solution:

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

  • the 32-bit software is installed in C:\\Program Files (x86)
  • Windows keeps the 32-bit system files in C:\\Windows\\SysWOW64
  • Windows keeps the 64-bit system files in C:\\Windows\\System32.

On a 32-bit Windows environment, the software is installed in C:\\Program Files, and Windows keeps the system files in C:\\Windows\\System32.

There are two series of preparations to be done on both server and client sides to allow the COBOL applications to be launched from client machines.

Server setup:

1. Install COBOL Server for the intended Visual Studio version (cs201x_22.exe)
2. Go to Start > All Programs > Micro Focus License Manager > License Administration
3. Install the license
4. Click Options > Advanced Configuration
5. Change the value for License Server with the current server's name or IP address
6. Click Save and close License Administration
7. Copy the following files to C:\\Program Files (x86)\\Micro Focus\\COBOL Server 201x\\bin:
   - 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: C:\\ProgramData is hidden by default, so the "Show hidden files, folders, and drives" option under Control Panel > Folder Options has to be enabled to make it visible)
   - C:\\Windows\\SysWOW64\\msvcr100.dll
8. Copy one of the following files (if applicable) from the development machine to C:\\Program Files (x86)\\Micro Focus\\COBOL Server 201x\\bin:
   - C:\\Windows\\SysWOW64\\msvcr110.dll if the COBOL application was built as 32-bit with VS 2012
   - C:\\Windows\\SysWOW64\\msvcr120.dll if the COBOL application was built as 32-bit with VS 2013
9. Copy one of the following files (if applicable) from the development machine to C:\\Program Files (x86)\\Micro Focus\\COBOL Server 201x\\bin64:
   - C:\\Windows\\System32\\msvcr100.dll if the COBOL application was built as 64-bit with VS 2010
   - C:\\Windows\\System32\\msvcr110.dll if the COBOL application was built as 64-bit with VS 2012
   - C:\\Windows\\System32\\msvcr120.dll if the COBOL application was built as 64-bit with VS 2013
10. Create a network share (e.g. COBOLsrv) off C:\\Program Files (x86)\\Micro Focus\\COBOL Server 201x and give read-only access to users

Client setup:

Here is the content of the batch file to launch 32-bit applications:
set COBDIR=\\\\ServerName_Or_IPaddress\\COBOLSRV
set MFCES_INIT_LOCATION=%COBDIR%\\Bin\\ces.ini
rem comment out the following PATH for running 64-bit applications
set PATH=%COBDIR%\\bin;%PATH%
rem uncomment the following PATH for running 64-bit applications
rem set PATH=%COBDIR%\\bin64;%COBDIR%\\bin;%PATH%

rem Checks if MF CES Daemon is running
mfcesdchk.exe >nul
if errorlevel 1 goto startlic
goto startapp

:startlic
rem  Starts MF CES Daemon
start /B mfcesd.exe -b

:checkloop
rem Checks if MF CES Daemon is running
mfcesdchk.exe >nul
if errorlevel 1 goto checkloop

:startapp
rem Run your application