Re: Passing a parameter from a C program to an Informix 4gl program
Posted in 1998
Aaron Gatzke wrote: > > Problem: We are trying to pass a parameter, such as an invoice > number, from a C program to a 4gl program. The variable > is of datatype INTEGER. > > Info: We have an existing front end application written > in C but are adding new modules written in Informix 4gl. > We are running HPUX and use the korn shell. > > We have tried two methods: > 1. Pass a parameter through a C function to a Unix script. > Our problem is that the eoj() function can only accept values > up to 255. Also, we are not C programmers and don't know > enough to create our own function or how to extend the > functionality of the existing function. [SNIP] > > 2. Try to set an environment variable that GETENV can access. > The problem is that the environment variable doesn't exist > after the C program quits. > C program main () [SNIP] > Any suggestions? We appreciate all advice. > Thanks. > > Aaron Uhmm, if the 4GL module doesn't have to be a separate program, you can use 4GL modules mixed with C code. (RTFM) Or you can write the data to a flat file, and have the second program read the flat file. You have to remember if you write the variable to the environment shell, you are writing them to a new shell. Once your C code ends, the shell is gone. and the parent shell which executes your shell doesn't have the variables. -HTH Mikey -- #include <std_disclaimer.h> /* Mike Segel (MS385) */ #include <No_Spam.h> #ifdef OFFENDED_BY_CONTENT The author takes no responsibility for this post. Any resembalence to a coherent rational thought is purely coincidence. -The Management. #endif ***************************** * Attention * -*- Due to AGIS's Refusal to Act Responsibly -*- Due to ACSI's Refusal to Act Responsibly We are blocking all of their domains at the packet level. This block will exist until they modify their policies to conform to existing RFCs and net community standards. We encourage all ISPs and domain holders to do the same. *****************************