Re: Returning a value from .4gi
Posted in 1994
>From: .Chris_Swecker@mac.avid.com (Chris) >Subject: Returning a value from .4gi >Date: 14 Oct 1994 16:04:07 GMT >X-Informix-List-Id: <news.9257> >I am trying to return an integer value from one .4gi to another ie; > RUN "progname.GO progname.4gi arg1" >The progname.4gi allows the user to select a record. I would like to >return a specific integer value back to the calling program and use this >integer value. My first thought was to use the following; > >Calling program: >RUN "progname.GO progname.4gi arg1" RETURNING val > >Called program: >EXIT PROGRAM(value) > >Unfortunately the returned integer value is [...] just a status value. >Any Ideas besides using temp tables and unloading the value to a file? (1) This can be made to work as long as (a) you only need to communicate values in the range 0..255, and (b) you divide the returned value by 256. It is not orthodox, but should work. (2) Using temporary tables won't work -- you have two different programs, so they use disjoint temporary tables. (3) You would therefore have to use permanent tables. You would probably need some way of identifying process IDs for the data in the table if more than one person might be using the programs at the same time. I would probably arrange for the calling program to pass its process ID to the called program, and the called program would use that value in the data it inserted into the communication table. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>