Highlighted
Absent Member.
Absent Member.
2210 views

file not found when running cobol application from file explorer

Jump to solution

i am running cobol server. I have COBDATA set as an environment variable system wide (this is a development box). my project is managed code multiple output. If I open a Visual Cobol command prompt and execute the program, the files that the programs references are found. If I double click the program to run it cannot find the files even though it can see COBDATA. 

Is this normal behavior?

0 Likes
15 Replies
Highlighted
Absent Member.
Absent Member.
so, I copied a few of the environment variables that were present when a visual cobol command prompt is opened.
the Path variable had three lines pointing to bin, binn64 and bin64. Now the cobol program will run from the file explorer

View solution in original post

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert
After reviewing the incident I can see that you were actually trying to open up files in RM format and not MF format which is what I tested with. Since the operation to open RM files is actually passed onto a different file handler, it is most likely that this file handler itself and not the actual data files is what could not be found. Including the bin folders in the PATH would allow this file handler to be called successfully.

Thanks,

View solution in original post

0 Likes
Highlighted
Absent Member.
Absent Member.
Sorry, I forgot to mention that I was working with RM files. Is the file handler for MF files not in the same location as the handler for RM files?
0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert
Since this is a managed code application file I-O for MF files will be directed to the managed MF file handler which is MicroFocus.COBOL.FileHandler which is a .NET assembly which is installed into the Global Assembly Cache under the C:\Windows\Microsoft.Net folder. This is located without the use of a PATH setting.

There is no managed version of the RM file handler so file I-O for RM files will be directed to the native RM file handler acufh.dll which is in the bin folder and does require a PATH setting in order for it to be located.

View solution in original post

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.