Highlighted
Absent Member.
Absent Member.
3626 views

Error 173, How can i fix it?

I use Visual COBOL for Visual Studio 2010, my problem is when I have two cobol programs the first calls the second but when the first program calls the second appears on the screen:

Load error : file 'IncCl'

error code : 173, pc-0, call=1, seg=0

173  Called program file not found in drive/directory 

Please, I need one solution very fast, can anyone help me?  (One image to show the error are attached)

0 Likes
5 Replies
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Error 173, How can i fix it?

This error simply means that the program name in the call statement, cannot be found.

It looks like you are trying to call a program called IncCl.

Is this program located in a different project that the calling program?

Is this the name of the .dll to call or a name of an entry point within a .dll?

Is this a managed project or a native project?

If it is in a different project then you most likely have to tell it where to find it because by default the output folders of different projects are relative to the project itseld which means the output folder for the calling project is different than the output folder of the project containing the program you are trying to call.

You can remedy this by adding a reference to the .dll that you are trying to call if it is a native project or adding a reference to the project that contains the program to be called if this is a managed project.

Make sure that you set the Copy Local property for the file to true.

You can also add the location of the program to be called to the PATH which can be set at the system level or within an app.config file in the main program's project.

If this is the name of an entry point within a .dll but is not the actual name of the .dll then you will have to load the .dll first in order to make the entry point visible.

You can do this by either calling the main entry point of the .dll to load it or by setting a procedure-pointer to entry of the .dll name.

01 pp procedure-pointer.

  set pp to entry "mydllname"

You might want to take a look at the tutorial here which covers this topic in detail:

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Error 173, How can i fix it?

Is this program located in a different project that the calling program?

Answer: The two programs is located on the same project

Is this the name of the .dll to call or a name of an entry point within a .dll?

Answer:  Name of the dll

Is this a managed project or a native project?

Answer: native

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Error 173, How can i fix it?

So the calling program and the program to be called are in the same project.

Are the programs in the same .dll or is this project set to be a multi-output project where a .dll is being generated for each COBOL program in the project?

What does the call statement look like?

Is it a call "literal" or a dynamic call data-name?

If the file IncCl.dll exists in the output folder and the .dll of the calling program is in this same folder then there is no reason that it would not be found.

Can you confirm that this .dll does exist and it is in the same folder as the calling program?

Thanks.

0 Likes
Highlighted
Absent Member.
Absent Member.

RE: Error 173, How can i fix it?

Are the programs in the same .dll or is this project set to be a multi-output project where a .dll is being generated for each COBOL program in the project?

Answer: multi-output project

What does the call statement look like?

Answer:  call "Prog2"

Is it a call "literal" or a dynamic call data-name?

Answer: literal, I think

Can you confirm that this .dll does exist and it is in the same folder as the calling program?

Answer: Yes, in case I am using .exe, but if I use .dll will still have the error (I have tried to use .dll)

0 Likes
Highlighted
Micro Focus Expert
Micro Focus Expert

RE: Error 173, How can i fix it?

I would like to review what you are doing

Would it be possible for you to zip up your project folder and send it to me at chris.glazier@microfocus.com?

Thanks.

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.