Highlighted
Valued Contributor.
Valued Contributor.
204 views

ERROR CODE 173 CALLED PROGRAM NOT FOUND IN DIRECTORY

Jump to solution

GOOD MORNING EVERYONE

I have a problem and have not been able to fix it. Working with Windows 10, single user environment

Microsoft Visual  Studio 19

Micro Focus COBOL Version 5.0

Working Directory is called G2, on drive C

All source, executable, data, copy members are in that directory. We are able to compile properly, and execute the programs individually ; however, if program A, calls program B, then the error occurs .

 

We installed, repaired, deleted an reinstalled the compiler but still get the same error. Investigating via the internet, we found some comments about the %path% not being set properly, and the recommended solution is to use REGEDIT and eliminate the quotes "" from the %path%. We reviewed the register and there are not quotes in the path. 

 

Could someone help?

 

Thanks in advance

0 Likes
1 Solution

Accepted Solutions
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: ERROR CODE 173 CALLED PROGRAM NOT FOUND IN DIRECTORY

Jump to solution

An .EXE cannot call another .EXE as they will run in separate processes.
Your main program should be compiled as an .EXE and the subprograms should be compiled as .DLLs.

You can create a DLL using cbllink -d progname

int and gnt files can call each other without an issue.

 

View solution in original post

0 Likes
6 Replies
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Betreff: ERROR CODE 173 CALLED PROGRAM NOT FOUND IN DIRECTORY

Jump to solution

How do you call your programs?

call 'abcd' using xyz

cancel 'abcd'

are your program-Directory in %cobdir% ?

From wich Directory start you your application?

0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Betreff: ERROR CODE 173 CALLED PROGRAM NOT FOUND IN DIRECTORY

Jump to solution
cobdir=c:\g2;%cobdir%

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: ERROR CODE 173 CALLED PROGRAM NOT FOUND IN DIRECTORY

Jump to solution

The quotes in the PATH was a problem under Windows 7 with earlier product releases.

How are you compiling your programs?
Are they compiled to .int, .gnt, exe or .dll?
Does the program name in the CALL statement match the name of the file on disk?
Are you running from within the IDE or outside of the IDE from a command prompt?

 

0 Likes
Highlighted
Valued Contributor.
Valued Contributor.

Re: ERROR CODE 173 CALLED PROGRAM NOT FOUND IN DIRECTORY

Jump to solution

Hello Chris,

The programs are compiled and linked the following way, obtaining an EXE.

COBOL progrname

CBLLINK progname

This is done from the G2 directory, using a W64 Command Prompt. The programs are called one of two ways

1. Call progname.

2. Call progname using progparams.

 

The programs are executed from the W64 Command Prompt.

From the IDE (MS Visual Studio 19) we manage the code, and build (ie. Compile) the source to get an .int and verify that source is correct. The G2 is an old system we developed with a prior version of MF (1996) and are rebuilding it for commercial purposes.

 

Hope this information is enough. Let me know what we are doing wrong so we can accelerate system test.

Thanks in advance for your help.

Best regards

 

Rafael Diaz

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

Re: ERROR CODE 173 CALLED PROGRAM NOT FOUND IN DIRECTORY

Jump to solution

An .EXE cannot call another .EXE as they will run in separate processes.
Your main program should be compiled as an .EXE and the subprograms should be compiled as .DLLs.

You can create a DLL using cbllink -d progname

int and gnt files can call each other without an issue.

 

View solution in original post

0 Likes
Highlighted
Valued Contributor.
Valued Contributor.

Re: ERROR CODE 173 CALLED PROGRAM NOT FOUND IN DIRECTORY

Jump to solution

Hi Chris,

thanks a lot for your answer. IT WORKS, As I mentioned earlier, we are reviving some systems created during the 1996/2000 period, using the MF version available back then. We did not have to take care of DLLs and many other current requirements. 

We have been able to start integrating, updating and testing.

 

Great Advice

0 Likes
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.