VS Cobol runtime with C modules on AIX 3.1

Bjorn Engsig bengsig at oracle.nl
Fri Sep 21 18:01:35 AEST 1990


We have encountered a problem with external C functions together with cobol
runtime systems for unlinked environment.

Given a cobol source a.cbl using a call to a C routine, provided in b.c,
the following will work as specified:

$ cob -u a.cbl
$ cc -c b.c
$ cob -vxe "" -o rtsb b.o

where the verbose output from the last step shows that cobol finds the
external symbols in b.o.  Executing

$ rtsb a

works as expected.

If, however, the object from the C compilation is passed through the linker,
i.e.

$ cc -c b.c
$ ld -r -o b2.o b.o
$ cob -vxe "" -o rtso b2.o

the verbose message from cob says that no external symbols are found in b2.o,
and executing gives the message:

Load error : file 'CFUNC'
error code: 173, pc=DFF85FFC, call=1, seg=0
1203  173 Called program file not found in drive/directory

where 'CFUNC' is the first external C function to be called from the cobol
program.

Did anybody else see this?  Is there a workaround (except not feeding the
stuff through the linker)?

I can provide examples of a.cbl and b.c if necessary.  Thanks for any help.
-- 
Bjorn Engsig,	Domain:		bengsig at oracle.nl, bengsig at oracle.com
		Path:		uunet!mcsun!orcenl!bengsig
		From IBM:	auschs!ibmaus!cs.utexas.edu!uunet!oracle!bengsig



More information about the Comp.unix.aix mailing list