4GL problem
Posted in 1992
Path: emory!swrinde!cs.utexas.edu!tamsun!lstar31!rjsparks
From: rjsparks@lstar31.tamu.edu (Robert Sparks)
Newsgroups: comp.databases.informix
Message-ID: <7416@tamsun.tamu.edu>
Date: 7 Jan 92 22:53:58 GMT
Sender: usenet@tamsun.tamu.edu
Organization: LoanSTAR
I have a problem thats been stumping me for awhile and since it summarizes,
I thought I'd throw it out to see if maybe I'm doing something stupid.
I have a 4gl program that calls a C function.
Paraphrase of the 4gl code
main
create huge temp table with structure (datetime,smallfloat,smallfloat)
declare spot cursor for select * from that table
let constantfloat = pi
foreach spot into ts,sfloat1,sfloat2
call cfunction(sfloat1,sfloat2,constantfloat) returning sfloat3,sfloat4
update a_different_permanent_table set .... where ....timestamp=ts
end foreach
display done
sleep 120
end main
Paraprase of c function
int cfunction(int nargs)
{
float fl1,fl2,fl3,fl4,const_in;
popflo(&const_in);
popflo(&fl2);
popflo(&fll);
/*Do some calculations that assign values to fl3 and fl4*/
retflo(&fl3);
retflo(&fl4);
return(2);
}
-----------
Now, when the temporary table is small, say 25 records, the thing acts like
I expect it to.
When the temporary table is large, say 6800 records (ok, only sort of large),
it processes the first 80 or so and then spontaneously aborts.
The display and sleep are NOT executed.
No error messages,
no complaints, nothing....
The permanant table gets updated for those 80 or so records.
What's going on. Its not a disk space problem... If I comment out the call
to the C function, the thing runs just fine for the larger temporary table.
The C function does nothing esoteric, just float math, no I/O, not even any
pointer work.
RjS
rjsparks@loanstar.tamu.edu
rjsparks@lstar31.tamu.edu
ugh