Jose,
telepac.pt doesn't know who you are -- I cannot send you email...
----- Transcript of session follows -----
Connected to mailhost.telepac.pt:
}>> RCPT To:<josevribeiro@telepac.pt>
<<< 550 <josevribeiro@telepac.pt>... User unknown
550 <josevribeiro@telepac.pt>... User unknown
No! sqlexit() is an ESQL/C function, not an I4GL function.
You have to provide a function with the correct I4GL interface:
int fgl_sqlexit(int n)
{
if (n != 0) fgl_fatal(__FILE__, __LINE__, -1318);
retint(sqlexit());
return(1);
}
And you encode that in fgiusr.c:
{ "fgl_sqlexit", fgl_sqlexit, 0 },
I prefer the braces around the initializers, though the sample code
excludes them.
You use: LET retval = fgl_sqlexit()
This applies to both p-code and c-code; you cannot directly call any
regular C function from I4GL unless it is written explicitly for use with
I4GL because the C calling convention is radically different from the I4GL
calling convention.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>
}Date: Thu, 11 Jan 1996 23:18:19 GMT
}From: josevribeiro@telepac.pt (Jose Vitorino Barata Ribeiro)
}
}In article <4d26rn$gm@cssun.mathcs.emory.edu>, johnl@informix.com
}says...
}>
}>extern int sqlexit(void);
}>
}>0 => OK
}><0 => Failed.
}>
}>Reading the 7.10 ESQL/C manual, but it probably hasn't changed.
}>
}>Yours,
}>Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>
}>
}>>From: josevribeiro@telepac.pt (Alberto Barata Ribeiro)
}>>Date: 10 Jan 1996 21:51:43 GMT
}>>X-Informix-List-Id: <news.20175>
}>>
}>>What are the parameters and return codes (if any!) of the
}>>Informix sqlexit() function on the AIX Operative system?
}>>
}>>(Informix RDS 4,12, Informix OnLine 5.01)
}>>
}>>Thanks in advance
}>
}What about the fgiusr.c file to create a custom runner?
}
}are tollowin lines OK?
}
}.
}int sqlexit() /* declare the function....*/
}
}.
}
} "sqlexit",sqlexit,0, /* in array... */
}
}Thanks in advance!