Executable runs in IDE but errors outside IDE

I'm tasked with migrating some custom NetX 5.1 native Cobol applications to Visual Cobol 3.0 using Eclipse IDE.

When running an executable outside the IDE, I receive the following error:

Load error: file <executable-path>\cblviom.dll

error code: 164, pc=0, call=1, seg=0

164 RRun-Time subprogram not found.

I do have the system and account Path Environmental pointing to the both the \bin and \binn directories.

I moved the cblviom.dll to the application directory to no avail.

This is a 32-bit program with the project settings directives as: IDXFORMAT"3" ODOSLIDE

  • We have just released Visual COBOL 6.0 so 3.0 is a few product versions back at this point.

    Is this a standalone executable or is it calling other programs? If there are other programs, are they all recompiled with  Visual COBOL?

    For a test, open up a Visual COBOL 32-bit command prompt from the Micro Focus Visual COBOL group on the Windows Start menu and try running the application from there.

    Does this work or do you get the same error?

  • Chris,

    Thank you for the quick response.

    I know we're behind in versions but I'm just dealing with what we have.

    Anyway, this is a stand alone program running in a Win10 environment.  It simply reads an ISAM file and sorts the records for ease of further processing.  It is a customized version of a CGI program as part of their Strata simulation solution.

    I did run the app through the Visual Cobol 32-bit command prompt and received the same error.  

  • This error can occur if the run-time system is picking up an improper version of a dependency file such as the COBOL run-time or other .dll which is required by the run-time file.

    We can normally track this down by performing a CTF trace on the application and reviewing the log file that is created.

    Instructions for running CTF:

    Create a CTF config file called ctf.cfg and place it in your application folder.

    Set the following environment variable like:

    set MFTRACE_CONFIG=c:\appdir\ctf.cfg
    replace c:\appdir with the name of your application folder containing ctf.cfg.

    Run your program.

    This should generate a trace file with the extension .log.
    Please attach this to the post so I may review it.

    ctf.cfg should contain the following:


    ## Emitter TEXTFILE

    ## Component Run-time System

  • It seems I cannot produce the log file.  Sorry, I'm getting my feet wet in this environment.

    In the ctf.cfg file I replaced 

    mftrace.emitter.textfile#location=.\ with the directory of the application, i.e.,


    after no log file was produced.

    I set the MFTRACE_CONFIG to C:\Strata51\Conversion\Runtime\ctf.cfg in the General Release Build\Build Configuration\Build Environment.  Then "built all" to recreate the executable.

    When that didn't work, I created an Windows User Account environmental variable and still no log file produced.

    I ran the application using a bat file that sets the input data set to be selected in the program.  I don't know if that has anything to do with it.


  • MFTRACE_CONFIG is an environment variable that needs to be turned on at run-time before running your application. You do not need to recompile anything.

    Open up a Visual COBOL command prompt and enter:

    SET MFTRACE_CONFIG=C:\Strata51\Conversion\Runtime\ctf.cfg

    Then in the same command prompt run your bat file to start your application.

    The trace file should then be produced.

  • The CTF log files that you attached appear to be tracing the COBOL compilation process and not the run of your application. Are you starting the correct .bat file at run-time?

    What is the name of your application? This name should appear in the name of the trace file such as:


    where myapp would be the name of your executable and process-id would be the numeric process-id used when the process was run.

  • Chris,

    I was able to generate a trace log for the program that produces the input for the program at issue.  So, I feel comfortable that the procedure used to produce the logs is fine. 

    At this time, I am not able to produce the logs for the program at issue.  I suspect with all the tweaks that the program it is no longer executing properly.  I plan on re-visiting to debug and run within the IDE to ensure I have a good executable.  Then I will proceed from there.

    Thank you for your assistance to this point.

  • Chris,

    I did re-visit the IDE environment. 

    Running in debug mode on the Generic Debug Build was successful.

    Running the executable in the Generic Release Build was successful.

    The good news is I no longer receive the original run-time error message.  However, now the application does not execute at all.  No matter how I try to execute it, running a bat file from VC command prompt to assign input or hard coding the input and either running the exe from command prompt or double clicking the exe, nothing happens.

    I put some displays at the beginning of the program and they don't appear when trying to run the exe.

    Could it be compiler directives?  I'm not that versed in what directives are required when.

  • Do any errors appear after trying to start the program from the command line?

    After starting the program, does it appear in Task Manager as a running process or is it being ended right away?

    Can you still get a CTF trace file for the application? This might tell us what is going on...