Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Server Express 2.2 Calling COBOL from C

Status
Not open for further replies.

kitesurf

Programmer
Dec 18, 2002
5
GB
We are currently evaluating Server Express 2.2. We have a couple C programs that we link into a run-time.

When we try and call a COBOL program from a C program using the cobfunc facility, Microfocus comes back with a can't find program in drive/directory.

I know the program is there, since I can call it explicity from a COBOL program.

I've put some displays in the C program to get the environment settings for COBPATH and these are all OK, so it should be able to find the program using the COBPATH.

Although, some people have hinted at the idea that the C program won't use the COBPATH at all for looking up the whereabouts of a COBOL program.

Does anyone have any ideas of how the cobfunc statement works?

We've had this setup before in an OCDS environment without any problems, so it has definitely worked before.

if anyone can help I'd really appreciate it.

thanks
phil
 
A "C" program will search in ${PATH} I presume.
Try
Code:
export PATH=${PATH}:${COBPATH}
The you are sure that the native OS and the cobol runtime will search the same path's for their modules.
 
Yes, I have tried this but without any success. The interesting thing is that we have been running in an OCDS environment without having to put in the COBOL run-time directories in the PATH. So this has definitely worked before.

It must be something simple, just that I can't find it...!

but thanks for the advice anyway.

cheers
phil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top