pf_getval problem
Posted in 1996
Hi,
This is a long and sticky mess but this is the jist of it...
I had a solaris 2.3 system on a sun sparc. It had Informix SE 5.x and
isql 4.x and esql 4.x. We upgraded to solaris 2.4 and upgraded our informix to the recommended versions for 2.4(still using 5.x engine). Unfortunately the
isql and esql did not work together. You could not use forms that call C functions. The isql and esql libs can not be linked together. I restored the whole
OS from tape including the old informix. The forms still do not work they
core dump when they call pf_getval.
The compiled exe's work fine but if I recompile any of them, then
they core dump when they call pf_getval. The compiler is not the same.
I use to use the SUNPRO and now I am using gcc. I no longer have a license
for SUNPRO on this system.
This is the error from the debugger...
Program received signal SIGSEGV (11), Segmentation fault
0x28d00 in pf_getval ()
(gdb) where
#0 0x28d00 in pf_getval ()
#1 0x1af10 in bob () at bob.ec:25
#2 0x439e8 in e3exec ()
#3 0x438f4 in e3exfunc ()
#4 0x4243c in _execpmim ()
#5 0x28c48 in chkcontrol ()
#6 0x1fd7c in change ()
#7 0x1b778 in procch ()
#8 0x1b3dc in main ()
The code I am testing with looks like this ...
bob.ec
#include "ctools.h"
#include "acct.h"
$include sqlca;
valueptr bob();
$ int id_num;
$ char col_name[7];
/**********************************************************************
ALL functions must be listed here!
*****************************/
struct ufunc userfuncs[] =
{
"bob", bob,
0,0
};
valueptr bob()
{
pf_getval("lc",col_name, CCHARTYPE,8);
strcpy(col_name, "status");
pf_putval("bob", CCHARTYPE, col_name);
}
****************************************************************************
The form looks like the following...
database cpmmdl
screen
{
TABLES: (1) cust_pros
ID # [cid ] Last Contact [lc ]
}
end
tables
cust_pros
end
attributes
cid = cust_pros.id_num, queryclear;
lc = l_contact, reverse;
instructions
after query of cust_pros
call bob()
end
Any ideas whould be appreciated.
Thanks
Bob