ERROR CODE 173 CALLED PROGRAM NOT FOUND IN DIRECTORY

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

  • 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?

  • 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?

     

  • 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

  • Verified Answer

    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.

     

  • 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