[comp.databases] QUERY INGRES C/PROCEDURES

ferrario@irst.UUCP (Lorenza Ferrario) (08/09/89)

A problem in writing an Embedded C procedure in ABF:

...
FILE *fp, *fopen();
...

This declaration causes a syntax error, even if I include <stdio.h> file
in procedure's code.
Maybe INGRES does'nt handle "FILE" type? Or what else?

	Thanks in advance for your suggestions
	
		LORENZA FERRARIO


-- 

	Lorenza Ferrario

bg0l+@andrew.cmu.edu (Bruce E. Golightly) (08/10/89)

Actually, similar problems occur in any I/O type operation, and are NOT due
to a real conflict between ABF and C. It turns out that ABF ignores the
declaration of LNK$LIBRARY in building an executbale. The solution is to
define ING_ABFOPT1 as pointing to a file which contains the line
SYS$LIBRARY:VAXCRTL.OLB/LIB. This assumes VMS 4.7 or later and VAX C 3.x.

This is very poorly documented in the ABF manual. It wasn't until I left
SET VERIFY on by accident that I got a handle on where the problem really was.

I can't promise that this is a solution. We have not had occassion to do
"real" I/O from inside ABF using C. It did, however, resolve problems related
to attempts to use sprintf.