Skip to main content

file not found when running cobol application from file explorer

  • May 23, 2017
  • 15 replies
  • 0 views

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?

15 replies

Chris Glazier
Forum|alt.badge.img+2

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?

COBDATA should be handled the same way regardless of how the application is started. What are you setting COBDATA to? Is it a full path name to a folder on the local drive or a network drive or are you using a relative path name? When you double-click on the executable are you running it from the same startup folder as when you open up a Visual COBOL command prompt?

Are you running on the same machine on which COBOL Server is installed or are you running from a different machine which is mapped to the COBOL Server machine?

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?

cobdata is set to a local drive on the server. D:\\data
I have all my application binaries in D:\\binaries and am running them from there.
Cobol Server is installed on C:\\Program File(x86)\\Micro Focus\\COBOL Server

All of this is running on a windows server VM.

Chris Glazier
Forum|alt.badge.img+2

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?

and COBDATA is being set as a system environment variable under Control Panel, is that correct?

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?

correct

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?


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?

this same behavior occurs on my win 10 machine. When I run a cobol program from Visual studio cobdata is located just fine. When I run it by double clicking the program the program sees the environment variable but throws errors when it tries to access files.

Chris Glazier
Forum|alt.badge.img+2

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?

This works fine here on my system.
What is the file status being returned on the open? Is it a 35?
What type of file is it?
What product version are you using?

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?

error 30

On the server I am running 2.3
On my dev machine I am running 2.3

I've created a program that demonstrates the issue. Shall I open a support ticket for this?

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?

so you are saying that the behavior is the same when a program is run from within visual studio and when executed from the file manager?

Chris Glazier
Forum|alt.badge.img+2

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?

Yes, it works from within VS and File Manager for me. Yes please open up a support incident and we can do a screen share to see what is happening on your end.

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?

ok, I will open an incident

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?

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

Chris Glazier
Forum|alt.badge.img+2

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?

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,

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?

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?

Chris Glazier
Forum|alt.badge.img+2

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?

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.