Skip to main content

Problem:

Determining the EXE to start the program is easy.

- The windows explorer can be used to start it.

- If an icon on the desktop is uses, its properties give the path

- If the command prompt is used, the EXE is in the actual directory, or ...

Here the difficulties - or better say for this paragraph "possibilities" - begin:

Examining the environment variable PATH will give the answer. If there are two, the first one is used.

In the normal world of programs the EXE will not be the only file used by the application.

The EXE may

- need a COBOL runtime system

-- which may need a _COBCONFIG.cfg configuration file

- use self programmed DLLs, COBOL INTs and GNTs

- start other EXEs, e.g. by CBL_EXEC_PROGRAM

- uses DialogSystem screen sets

--- which may need an *.ICN file

- open user files

-- which may need an EXTFH.cfg configuration file

...

The strategies to find the files are manifold. Environment variables like PATH, COBDIR, and others, registry entries and also mapperfiles are used.

With some look, the EXE complains, that a file cannot be found.

But it will result in false results, if the false file is found.

A configuration file may be present and has the correct content, but may unused by a false setting of an environment variable.

The EXTFH.cfg configuration file may contain

[XFH-DEFAULT]

FILEMAXSIZE=8

but opening a large IDXFORMAT"8" file may result in a file status 9/194,

because the EXTFH.cfg was not found, e.g. by a unintended setting of the environment variable EXTFH.cfg bound to the application or could not be opened by a missing permission to access EXTFH.cfg.

The following resolution describes, how to use the Microsoft tool Filemon (former by Sysinternals) to determine the file operations done to find and use EXTFH.cfg. Filemon can also be used for any other file, including the COBOL runtime file CBLRTSS.dll, cobconfig.cfg, or even YourFile.IDX.

Resolution:

Using Filemon to ensure that the correct version of EXTFH.cfg is in use:

1. Please download the tool Filemon.exe, to find at the end of the page:

    http://www.microsoft.com/technet/sysinternals/utilities/filemon.mspx

2. Unzip the downloaded file

3. Execute Filemon.exe

4. As Filemon reports very very many file accesses, so it is necessary to use a filter:

4.1. The filter can be found as the sevens icon (funnel) in the toolbar

4.2. Click on this icon

4.3. Type in EXTFH.cfg as "include", or the name of the file, which should be monitored

4.4. It isn't necessary to add a path specification here

4.5. Delete the existing protocol entries by either the fifth icon or  Edit/Clear-Display  or  Crtl X

4.6. Under Volumes activate All Volumes which can be accessed by setting a hook

     

5. Start the program, which needs the EXTFH.cfg file

6. Filemon continues the protocol of file accesses but only with the filtered file EXTFH.cfg

7. Finish the program, which needs the EXTFH.cfg file

8. Review the protocol, if an EXTFH.cfg is found and if it is the intended one

9. The protocol can be saved by clicking on File, Save as, and select a directory and choose a filename

Old KB# 1226

#ServerExpress
#COBOL
#netexpress
#AcuCobol
#RMCOBOL