Sockets from 4GL ??
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
I need to create a socket connection, send and retrieve a message from a remote server. All our code is Informix 4gl ( Version 7.X ). I can call a C program using the RUN command, but I need to get the return message back into the 4gl code. Any ideas would be appreciated. Aaron --------------------------------------------------------------- Aaron A. Brooks Senior Manager, Information Logistics PC Service Source Work: abrooks@pcservice.com Home: abrooks@airmail.net
Aaron Brooks wrote: > I need to create a socket connection, send and retrieve a message from > a remote server. All our code is Informix 4gl ( Version 7.X ). I can > call a C program using the RUN command, but I need to get the return > message back into the 4gl code. You'll probably need to write some C code to do it. There are at least two different sets of C code that you might write. 1. C code which does the socket connection/communication from within the I4GL program - probably some interface functions using the same basic code as in the C program which you call. 2. General purpose I4GL-callable C code which runs another program, reads the output from that program and returns it in a form which I4GL can digest. Neither is particularly complex, though handling arbitrary quantities of output in 2 is painful. -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>
Jonathan Leffler wrote: Aaron Brooks wrote: > I need to create a socket connection, send and retrieve a message from > a remote server. All our code is Informix 4gl ( Version 7.X ). I can > call a C program using the RUN command, but I need to get the return > message back into the 4gl code. you are looking for fglio, find at http://www.ctonline.it/~marcog/misc.htm Ciao, Marco ______________________________________________________________________________ Marco Greco <marco@informix.com> Standard disclaimers apply! Informix faq http://www.iiug.org/techinfo/faq/informix.htm 4glworks http://www.ctonline.it/~marcog Informix on Linux http://www.ctonline.it/~marcog/ifmxlinux.htm