Re: Returning a value from .4gi
Posted in 1994
Topics: Migration, Import/Export & Data Conversion
In article <37MA5N$NNP@NOVA.AVID.COM>, .Chris_Swecker@mac.avid.com writes: > 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. > > The two .4gi files reside in different directories. > > My first thought was to use the following; > > Calling program: > RUN "progname.GO progname.4gi arg1" RETURNING val > > Called program: > EXIT PROGRAM(value) > > Unfortunatly the returned integer value is not the value in the > EXIT PROGRAM(value) > > I come to find out that this is just a status value. > > Any Ideas besides using temp tables and unloading the value to a file? Only the first byte of the exit value is actualy used, so you can't use it to return a whole integer. Also in val you will find the exit value times 256. eg. exit program(1) -> val=256 exit program(2) -> val=512 etc. Note: This is a FAQ. You can find the FAQ written by Kerry Sainsbury at : :Kerry Sainsbury, kerry@kcbbs.gen.nz | THE INFORMIX FAQ :Quanta Systems, Auckland, New Zealand | kcbbs.gen.nz:/informix/* : | mathcs.emory.edu:/pub/informix/faq/* :+64 9 377-4473 (work) 276-5546 (home) | quasar.ucar.edu:/? > > Thanx -- ============================================================================= Bert Barbe | #include <std_disclaimer.h> /* All opinions above are mine */ Email : stud01@cc4.kuleuven.ac.be , GUTEST8@BLEKUL11.BITNET Home : Kasteelstraat 105, B-1853 Strombeek-Bever, Belgium (Europe) Office: Newcom Information Systems, Durletstraat 1, B-2018 Antwerpen, Belgium Phone : (Home) +32-(0)2 267 11 23 (Office) +32-(0)3 248 67 70 CET Fax : (Office) +32-(0)3 248 70 04 =============================================================================