Prepared statements on 4GL - Linux platform 
Author Message
 Prepared statements on 4GL - Linux platform

I have the following test program:

MAIN

        DEFINE
        prepstr         CHAR(1000)

        LET prepstr = "CREATE TEMP TABLE test (col1 CHAR(8))"
        PREPARE s_0 FROM prepstr

        LET prepstr = "DROP TABLE test"
        PREPARE s_5 FROM prepstr

END MAIN

We are testing 4GL version 7.30.UC1 on Linux.

When we compile the program using c4gl -c test.4gl
we get the following error message:

esqlc: "test.ec", line 50: Warning -33071: The statement id
'I000741E8mbcmb7x0i'
has already been used.
1 warning(s)

I thought all cursors/statements generated are unique.
Has anyone else encountered this problem?

Thanks in advance.  I've included test.ec below.

Candy
 --
Candy McCall
ONLINE Computing, Inc.

Here is test.ec:

#include <sqlfm.h>

#include <decimal.h>
#include <locator.h>
#include <datetime.h>
#include <stdio.h>
#include <fglrep.h>
#define I4GL_SQLCA /* I4GLC1 */
$extern struct
  {
    long sqlcode;
    char sqlerrm[72];
    char sqlerrp[8];
    long sqlerrd[6];
    char sqlawarn[8];
  }  sqlca;
$extern int status;
extern int efcode;
extern int _expcode;
extern short _anyerr;
$extern int int_flag;
$extern int quit_flag;
static char fgl_modname[] = "test.4gl";

main(fgl_argc, fgl_argv)
int fgl_argc;  char *fgl_argv[];

{
$char prepstr[1001];
fgl_init(fgl_argc, fgl_argv);
fgl_siginit();
ixpshhwm();
_anyerr = 0;
pushquote( "CREATE TEMP TABLE test (col1 CHAR(8))" , 37);
popquote(prepstr,1001);
ixrsthwm();
pushlong(475624L);
fgl_mangle(prepstr);
$ prepare I000741E8mbcmb7x0i from  $prepstr;
status = sqlca.sqlcode;
if (status < 0)
{
fgl_fatal(fgl_modname, 9, status);

Quote:
}

pushquote( "DROP TABLE test" , 15);
popquote(prepstr,1001);
ixrsthwm();
pushlong(475624L);
fgl_mangle(prepstr);
$ prepare I000741E8mbcmb7x0i from  $prepstr;
status = sqlca.sqlcode;
if (status < 0)
{
fgl_fatal(fgl_modname, 12, status);

Quote:
}

/*
 * $  exit form mode;
 */
 {
 _efemode();
 }
_autofree(0);
ixrelhwm();
return(0);
Quote:
}



Sat, 20 Mar 2004 05:20:26 GMT
 Prepared statements on 4GL - Linux platform

Hi Candy.

Prepare statement can not allow "CREATE and DROP TABLE" sequence.

See Informix GUIDE to SQL 2-408 and 2-415.

Regards.


Quote:
>I have the following test program:

>MAIN

>        DEFINE
>        prepstr         CHAR(1000)

>        LET prepstr = "CREATE TEMP TABLE test (col1 CHAR(8))"
>        PREPARE s_0 FROM prepstr

>        LET prepstr = "DROP TABLE test"
>        PREPARE s_5 FROM prepstr

>END MAIN

>We are testing 4GL version 7.30.UC1 on Linux.

>When we compile the program using c4gl -c test.4gl
>we get the following error message:

>esqlc: "test.ec", line 50: Warning -33071: The statement id
>'I000741E8mbcmb7x0i'
>has already been used.
>1 warning(s)

>I thought all cursors/statements generated are unique.
>Has anyone else encountered this problem?

>Thanks in advance.  I've included test.ec below.

>Candy
> --
>Candy McCall
>ONLINE Computing, Inc.

>Here is test.ec:

>#include <sqlfm.h>

>#include <decimal.h>
>#include <locator.h>
>#include <datetime.h>
>#include <stdio.h>
>#include <fglrep.h>
>#define I4GL_SQLCA /* I4GLC1 */
>$extern struct
>  {
>    long sqlcode;
>    char sqlerrm[72];
>    char sqlerrp[8];
>    long sqlerrd[6];
>    char sqlawarn[8];
>  }  sqlca;
>$extern int status;
>extern int efcode;
>extern int _expcode;
>extern short _anyerr;
>$extern int int_flag;
>$extern int quit_flag;
>static char fgl_modname[] = "test.4gl";

>main(fgl_argc, fgl_argv)
>int fgl_argc;  char *fgl_argv[];

>{
>$char prepstr[1001];
>fgl_init(fgl_argc, fgl_argv);
>fgl_siginit();
>ixpshhwm();
>_anyerr = 0;
>pushquote( "CREATE TEMP TABLE test (col1 CHAR(8))" , 37);
>popquote(prepstr,1001);
>ixrsthwm();
>pushlong(475624L);
>fgl_mangle(prepstr);
>$ prepare I000741E8mbcmb7x0i from  $prepstr;
>status = sqlca.sqlcode;
>if (status < 0)
>{
>fgl_fatal(fgl_modname, 9, status);
>}
>pushquote( "DROP TABLE test" , 15);
>popquote(prepstr,1001);
>ixrsthwm();
>pushlong(475624L);
>fgl_mangle(prepstr);
>$ prepare I000741E8mbcmb7x0i from  $prepstr;
>status = sqlca.sqlcode;
>if (status < 0)
>{
>fgl_fatal(fgl_modname, 12, status);
>}

>/*
> * $  exit form mode;
> */
> {
> _efemode();
> }
>_autofree(0);
>ixrelhwm();
>return(0);
>}

--
Tsutomu Ogiwara

Informix Business Promotion Dept
ITOCHU TECHNO-SCIENCE Corporation
KURITA-KUDAN BLDG., 1-11-15, FUJIMI,
CHIYODA-KU TOKYO,102-0074 JAPAN
Phone:+81-3-5226-1951 Fax:+81-3-5226-1959



Sat, 20 Mar 2004 10:52:10 GMT
 Prepared statements on 4GL - Linux platform

Quote:

> I have the following test program:

> MAIN

>         DEFINE
>         prepstr         CHAR(1000)

>         LET prepstr = "CREATE TEMP TABLE test (col1 CHAR(8))"
>         PREPARE s_0 FROM prepstr

>         LET prepstr = "DROP TABLE test"
>         PREPARE s_5 FROM prepstr

> END MAIN

> We are testing 4GL version 7.30.UC1 on Linux.

> When we compile the program using c4gl -c test.4gl
> we get the following error message:

> esqlc: "test.ec", line 50: Warning -33071: The statement id
> 'I000741E8mbcmb7x0i'
> has already been used.
> 1 warning(s)

> I thought all cursors/statements generated are unique.
> Has anyone else encountered this problem?

I've not seen that one, but it is fairly comprehensively a bug.  I'm not
sure what the most recent version of I4GL is on Linux; it should be
several revisions later than UC1.

Separately, if you prepare a DROP TABLE statement, the table must exist
when you prepare it.  Since the statement to create the table is
prepared (but not executed) a few lines previously, I think you could
expect a run-time error on the second statement.

Quote:
> Thanks in advance.  I've included test.ec below.

And I've chopped most of it...

- Show quoted text -

Quote:
> [...]
> pushquote( "CREATE TEMP TABLE test (col1 CHAR(8))" , 37);
> popquote(prepstr,1001);
> ixrsthwm();
> pushlong(475624L);
> fgl_mangle(prepstr);
> $ prepare I000741E8mbcmb7x0i from  $prepstr;
> status = sqlca.sqlcode;
> if (status < 0)
> {
> fgl_fatal(fgl_modname, 9, status);
> }
> pushquote( "DROP TABLE test" , 15);
> popquote(prepstr,1001);
> ixrsthwm();
> pushlong(475624L);
> fgl_mangle(prepstr);
> $ prepare I000741E8mbcmb7x0i from  $prepstr;
> [...]

--

Guardian of DBD::Informix 1.00.PC1 -- see http://www.cpan.org/
#include <disclaimer.h>


Sat, 20 Mar 2004 13:00:16 GMT
 Prepared statements on 4GL - Linux platform

I'll check my 4GL version on my Linux box at home and give it a whirl.  I believe it's 7.30.uc5.

Quote:

>I have the following test program:

>MAIN

>        DEFINE
>        prepstr         CHAR(1000)

>        LET prepstr = "CREATE TEMP TABLE test (col1 CHAR(8))"
>        PREPARE s_0 FROM prepstr

>        LET prepstr = "DROP TABLE test"
>        PREPARE s_5 FROM prepstr

>END MAIN

>We are testing 4GL version 7.30.UC1 on Linux.

>When we compile the program using c4gl -c test.4gl
>we get the following error message:

>esqlc: "test.ec", line 50: Warning -33071: The statement id
>'I000741E8mbcmb7x0i'
>has already been used.
>1 warning(s)

>I thought all cursors/statements generated are unique.
>Has anyone else encountered this problem?

>Thanks in advance.  I've included test.ec below.

>Candy
> --
>Candy McCall
>ONLINE Computing, Inc.

>Here is test.ec:

>#include <sqlfm.h>

>#include <decimal.h>
>#include <locator.h>
>#include <datetime.h>
>#include <stdio.h>
>#include <fglrep.h>
>#define I4GL_SQLCA /* I4GLC1 */
>$extern struct
>  {
>    long sqlcode;
>    char sqlerrm[72];
>    char sqlerrp[8];
>    long sqlerrd[6];
>    char sqlawarn[8];
>  }  sqlca;
>$extern int status;
>extern int efcode;
>extern int _expcode;
>extern short _anyerr;
>$extern int int_flag;
>$extern int quit_flag;
>static char fgl_modname[] = "test.4gl";

>main(fgl_argc, fgl_argv)
>int fgl_argc;  char *fgl_argv[];

>{
>$char prepstr[1001];
>fgl_init(fgl_argc, fgl_argv);
>fgl_siginit();
>ixpshhwm();
>_anyerr = 0;
>pushquote( "CREATE TEMP TABLE test (col1 CHAR(8))" , 37);
>popquote(prepstr,1001);
>ixrsthwm();
>pushlong(475624L);
>fgl_mangle(prepstr);
>$ prepare I000741E8mbcmb7x0i from  $prepstr;
>status = sqlca.sqlcode;
>if (status < 0)
>{
>fgl_fatal(fgl_modname, 9, status);
>}
>pushquote( "DROP TABLE test" , 15);
>popquote(prepstr,1001);
>ixrsthwm();
>pushlong(475624L);
>fgl_mangle(prepstr);
>$ prepare I000741E8mbcmb7x0i from  $prepstr;
>status = sqlca.sqlcode;
>if (status < 0)
>{
>fgl_fatal(fgl_modname, 12, status);
>}

>/*
> * $  exit form mode;
> */
> {
> _efemode();
> }
>_autofree(0);
>ixrelhwm();
>return(0);
>}

--------------------------------
John Carlson
Informix DBA
EDS/WHSmith USA

#include std_disclaimer.h     /* These are my opinions, not my company's opinion  */



Sat, 20 Mar 2004 21:42:08 GMT
 Prepared statements on 4GL - Linux platform

This is 4GL and not SQL.  We've been using that type
of code for years and it currently works on other Unix
platforms.   We are trying to port our application to the
Linux platform.  Thanks anyway for your input.

Quote:
----- Original Message -----



Sent: Monday, October 01, 2001 9:52 PM
Subject: Re: Prepared statements on 4GL - Linux platform

Hi Candy.

Prepare statement can not allow "CREATE and DROP TABLE" sequence.

See Informix GUIDE to SQL 2-408 and 2-415.

Regards.


>I have the following test program:

>MAIN

>        DEFINE
>        prepstr         CHAR(1000)

>        LET prepstr = "CREATE TEMP TABLE test (col1 CHAR(8))"
>        PREPARE s_0 FROM prepstr

>        LET prepstr = "DROP TABLE test"
>        PREPARE s_5 FROM prepstr

>END MAIN

>We are testing 4GL version 7.30.UC1 on Linux.

>When we compile the program using c4gl -c test.4gl
>we get the following error message:

>esqlc: "test.ec", line 50: Warning -33071: The statement id
>'I000741E8mbcmb7x0i'
>has already been used.
>1 warning(s)

>I thought all cursors/statements generated are unique.
>Has anyone else encountered this problem?

>Thanks in advance.  I've included test.ec below.

>Candy
> --
>Candy McCall
>ONLINE Computing, Inc.

>Here is test.ec:

>#include <sqlfm.h>

>#include <decimal.h>
>#include <locator.h>
>#include <datetime.h>
>#include <stdio.h>
>#include <fglrep.h>
>#define I4GL_SQLCA /* I4GLC1 */
>$extern struct
>  {
>    long sqlcode;
>    char sqlerrm[72];
>    char sqlerrp[8];
>    long sqlerrd[6];
>    char sqlawarn[8];
>  }  sqlca;
>$extern int status;
>extern int efcode;
>extern int _expcode;
>extern short _anyerr;
>$extern int int_flag;
>$extern int quit_flag;
>static char fgl_modname[] = "test.4gl";

>main(fgl_argc, fgl_argv)
>int fgl_argc;  char *fgl_argv[];

>{
>$char prepstr[1001];
>fgl_init(fgl_argc, fgl_argv);
>fgl_siginit();
>ixpshhwm();
>_anyerr = 0;
>pushquote( "CREATE TEMP TABLE test (col1 CHAR(8))" , 37);
>popquote(prepstr,1001);
>ixrsthwm();
>pushlong(475624L);
>fgl_mangle(prepstr);
>$ prepare I000741E8mbcmb7x0i from  $prepstr;
>status = sqlca.sqlcode;
>if (status < 0)
>{
>fgl_fatal(fgl_modname, 9, status);
>}
>pushquote( "DROP TABLE test" , 15);
>popquote(prepstr,1001);
>ixrsthwm();
>pushlong(475624L);
>fgl_mangle(prepstr);
>$ prepare I000741E8mbcmb7x0i from  $prepstr;
>status = sqlca.sqlcode;
>if (status < 0)
>{
>fgl_fatal(fgl_modname, 12, status);
>}

>/*
> * $  exit form mode;
> */
> {
> _efemode();
> }
>_autofree(0);
>ixrelhwm();
>return(0);
>}

--
Tsutomu Ogiwara

Informix Business Promotion Dept
ITOCHU TECHNO-SCIENCE Corporation
KURITA-KUDAN BLDG., 1-11-15, FUJIMI,
CHIYODA-KU TOKYO,102-0074 JAPAN
Phone:+81-3-5226-1951 Fax:+81-3-5226-1959




Sat, 20 Mar 2004 22:07:13 GMT
 Prepared statements on 4GL - Linux platform

Quote:

>> I have the following test program:

>> MAIN

>>         DEFINE
>>         prepstr         CHAR(1000)

>>         LET prepstr = "CREATE TEMP TABLE test (col1 CHAR(8))"
>>         PREPARE s_0 FROM prepstr

>>         LET prepstr = "DROP TABLE test"
>>         PREPARE s_5 FROM prepstr

>> END MAIN

>> We are testing 4GL version 7.30.UC1 on Linux.

>> When we compile the program using c4gl -c test.4gl
>> we get the following error message:

>> esqlc: "test.ec", line 50: Warning -33071: The statement id
>> 'I000741E8mbcmb7x0i'
>> has already been used.
>> 1 warning(s)

>> I thought all cursors/statements generated are unique.
>> Has anyone else encountered this problem?

>I've not seen that one, but it is fairly comprehensively a bug.  I'm not
>sure what the most recent version of I4GL is on Linux; it should be
>several revisions later than UC1.
>Separately, if you prepare a DROP TABLE statement, the table must exist
>when you prepare it.  Since the statement to create the table is
>prepared (but not executed) a few lines previously, I think you could
>expect a run-time error on the second statement.

The sole purpose of the program is to point out the error.  I eliminated
all other lines of code.  :-)

Candy
--
Candy McCall
ONLINE Computing, Inc.



Sat, 20 Mar 2004 22:16:52 GMT
 Prepared statements on 4GL - Linux platform

Candy

Finally a question I have the answer to ;-)

During my AIX/Linux technical adventure, I had exactly the same problem -
only mine was with all SQL statements.

If you are having this problem with ALL prepared statements (try and prepare
3 or 4 statements inside the same 4gl and see if you experience the same
problem), then try one of the following procedures :

1) export C4GLFLAGS=-globcurs, this will include this flag in each c4gl
compilation and re-make the program as you normally would.

2) Include the '-globcurs' on each command line compilation as a flag to
'c4gl' and recompile the program.

3) Include the -keep command line option (in C4GLFLAGS or) in the 'c4gl'
command line statement. Then edit the generated 'program-name.ec' file and
modify the generated identifier 'I000741E8mbcmb7x0i' to a unique value for
each iteration of the statement in the code. Then re-link this module into
the 4ge using 'c4gl -o'.

Incidentally, the C4GLFLAGS environment variable can be used to declare any
number of 'c4gl' compilation flags. Since I do not  have access to Unix box
at this moment, this is completely from memory and I'm not sure if the flags
are delimited by commas, spaces or semi-colons and they may even need to be
quoted as a string. I am certain that 2 minutes of experimentation will
reveal the correct procedure.

Furthermore, I'm not really sure why this works (or what other impact it has
on the compilation other than making your cursor identifiers unique to the
entire program and not just the module) as I got this fix from Informix
Technical Support ( Donald(c) ), but it should solve your immediate problem.

Give it a whirl and let us know how it went.

regards
David

Quote:
-----Original Message-----


Sent: Tuesday, October 02, 2001 16:07
To: Tsutomu Ogiwara
Cc: Informix List
Subject: Re: Prepared statements on 4GL - Linux platform

This is 4GL and not SQL.  We've been using that type
of code for years and it currently works on other Unix
platforms.   We are trying to port our application to the
Linux platform.  Thanks anyway for your input.

----- Original Message -----



Sent: Monday, October 01, 2001 9:52 PM
Subject: Re: Prepared statements on 4GL - Linux platform

Hi Candy.

Prepare statement can not allow "CREATE and DROP TABLE" sequence.

See Informix GUIDE to SQL 2-408 and 2-415.

Regards.


>I have the following test program:

>MAIN

>        DEFINE
>        prepstr         CHAR(1000)

>        LET prepstr = "CREATE TEMP TABLE test (col1 CHAR(8))"
>        PREPARE s_0 FROM prepstr

>        LET prepstr = "DROP TABLE test"
>        PREPARE s_5 FROM prepstr

>END MAIN

>We are testing 4GL version 7.30.UC1 on Linux.

>When we compile the program using c4gl -c test.4gl
>we get the following error message:

>esqlc: "test.ec", line 50: Warning -33071: The statement id
>'I000741E8mbcmb7x0i'
>has already been used.
>1 warning(s)

>I thought all cursors/statements generated are unique.
>Has anyone else encountered this problem?

>Thanks in advance.  I've included test.ec below.

>Candy
> --
>Candy McCall
>ONLINE Computing, Inc.

>Here is test.ec:

>#include <sqlfm.h>

>#include <decimal.h>
>#include <locator.h>
>#include <datetime.h>
>#include <stdio.h>
>#include <fglrep.h>
>#define I4GL_SQLCA /* I4GLC1 */
>$extern struct
>  {
>    long sqlcode;
>    char sqlerrm[72];
>    char sqlerrp[8];
>    long sqlerrd[6];
>    char sqlawarn[8];
>  }  sqlca;
>$extern int status;
>extern int efcode;
>extern int _expcode;
>extern short _anyerr;
>$extern int int_flag;
>$extern int quit_flag;
>static char fgl_modname[] = "test.4gl";

>main(fgl_argc, fgl_argv)
>int fgl_argc;  char *fgl_argv[];

>{
>$char prepstr[1001];
>fgl_init(fgl_argc, fgl_argv);
>fgl_siginit();
>ixpshhwm();
>_anyerr = 0;
>pushquote( "CREATE TEMP TABLE test (col1 CHAR(8))" , 37);
>popquote(prepstr,1001);
>ixrsthwm();
>pushlong(475624L);
>fgl_mangle(prepstr);
>$ prepare I000741E8mbcmb7x0i from  $prepstr;
>status = sqlca.sqlcode;
>if (status < 0)
>{
>fgl_fatal(fgl_modname, 9, status);
>}
>pushquote( "DROP TABLE test" , 15);
>popquote(prepstr,1001);
>ixrsthwm();
>pushlong(475624L);
>fgl_mangle(prepstr);
>$ prepare I000741E8mbcmb7x0i from  $prepstr;
>status = sqlca.sqlcode;
>if (status < 0)
>{
>fgl_fatal(fgl_modname, 12, status);
>}

>/*
> * $  exit form mode;
> */
> {
> _efemode();
> }
>_autofree(0);
>ixrelhwm();
>return(0);
>}

--
Tsutomu Ogiwara

Informix Business Promotion Dept
ITOCHU TECHNO-SCIENCE Corporation
KURITA-KUDAN BLDG., 1-11-15, FUJIMI,
CHIYODA-KU TOKYO,102-0074 JAPAN
Phone:+81-3-5226-1951 Fax:+81-3-5226-1959




Sun, 21 Mar 2004 01:57:04 GMT
 Prepared statements on 4GL - Linux platform

Hi again.

Oh... Sorry.
UNIX platform works it, I don't know.

So I tested following plogram in my PC.

But error does not occur.

Upgrade your 4GL to 7.30.UC6 or HIGHER.

Here is my environment.


INFORMIX-4GL Version   7.30.UC6


kernel-2.2.14-5.0
glibc-2.1.3-15

Red Hat Linux release 6.2 (Zoot)
Kernel 2.2.14-5.0 on an i686

Regards.


Quote:
>This is 4GL and not SQL.  We've been using that type
>of code for years and it currently works on other Unix
>platforms.   We are trying to port our application to the
>Linux platform.  Thanks anyway for your input.

>----- Original Message -----



>Sent: Monday, October 01, 2001 9:52 PM
>Subject: Re: Prepared statements on 4GL - Linux platform

>Hi Candy.

>Prepare statement can not allow "CREATE and DROP TABLE" sequence.

>See Informix GUIDE to SQL 2-408 and 2-415.

>Regards.


>>I have the following test program:

>>MAIN

>>        DEFINE
>>        prepstr         CHAR(1000)

>>        LET prepstr = "CREATE TEMP TABLE test (col1 CHAR(8))"
>>        PREPARE s_0 FROM prepstr

>>        LET prepstr = "DROP TABLE test"
>>        PREPARE s_5 FROM prepstr

>>END MAIN

>>We are testing 4GL version 7.30.UC1 on Linux.

>>When we compile the program using c4gl -c test.4gl
>>we get the following error message:

>>esqlc: "test.ec", line 50: Warning -33071: The statement id
>>'I000741E8mbcmb7x0i'
>>has already been used.
>>1 warning(s)

>>I thought all cursors/statements generated are unique.
>>Has anyone else encountered this problem?

>>Thanks in advance.  I've included test.ec below.

>>Candy
>> --
>>Candy McCall
>>ONLINE Computing, Inc.

>>Here is test.ec:

>>#include <sqlfm.h>

>>#include <decimal.h>
>>#include <locator.h>
>>#include <datetime.h>
>>#include <stdio.h>
>>#include <fglrep.h>
>>#define I4GL_SQLCA /* I4GLC1 */
>>$extern struct
>>  {
>>    long sqlcode;
>>    char sqlerrm[72];
>>    char sqlerrp[8];
>>    long sqlerrd[6];
>>    char sqlawarn[8];
>>  }  sqlca;
>>$extern int status;
>>extern int efcode;
>>extern int _expcode;
>>extern short _anyerr;
>>$extern int int_flag;
>>$extern int quit_flag;
>>static char fgl_modname[] = "test.4gl";

>>main(fgl_argc, fgl_argv)
>>int fgl_argc;  char *fgl_argv[];

>>{
>>$char prepstr[1001];
>>fgl_init(fgl_argc, fgl_argv);
>>fgl_siginit();
>>ixpshhwm();
>>_anyerr = 0;
>>pushquote( "CREATE TEMP TABLE test (col1 CHAR(8))" , 37);
>>popquote(prepstr,1001);
>>ixrsthwm();
>>pushlong(475624L);
>>fgl_mangle(prepstr);
>>$ prepare I000741E8mbcmb7x0i from  $prepstr;
>>status = sqlca.sqlcode;
>>if (status < 0)
>>{
>>fgl_fatal(fgl_modname, 9, status);
>>}
>>pushquote( "DROP TABLE test" , 15);
>>popquote(prepstr,1001);
>>ixrsthwm();
>>pushlong(475624L);
>>fgl_mangle(prepstr);
>>$ prepare I000741E8mbcmb7x0i from  $prepstr;
>>status = sqlca.sqlcode;
>>if (status < 0)
>>{
>>fgl_fatal(fgl_modname, 12, status);
>>}

>>/*
>> * $  exit form mode;
>> */
>> {
>> _efemode();
>> }
>>_autofree(0);
>>ixrelhwm();
>>return(0);
>>}

>--
>Tsutomu Ogiwara

>Informix Business Promotion Dept
>ITOCHU TECHNO-SCIENCE Corporation
>KURITA-KUDAN BLDG., 1-11-15, FUJIMI,
>CHIYODA-KU TOKYO,102-0074 JAPAN
>Phone:+81-3-5226-1951 Fax:+81-3-5226-1959


--
Tsutomu Ogiwara

Informix Business Promotion Dept
ITOCHU TECHNO-SCIENCE Corporation
KURITA-KUDAN BLDG., 1-11-15, FUJIMI,
CHIYODA-KU TOKYO,102-0074 JAPAN
Phone:+81-3-5226-1951 Fax:+81-3-5226-1959



Sun, 21 Mar 2004 12:41:08 GMT
 Prepared statements on 4GL - Linux platform

see below . . .

Quote:

>I'll check my 4GL version on my Linux box at home and give it a whirl.  I believe it's 7.30.uc5.

no problems on 7.20.ud7 . . . . all cursor names were uniquely mangled.  My home system is a bit older than what I anticipated.

--------------------------------
John Carlson
Informix DBA
EDS/WHSmith USA

#include std_disclaimer.h     /* These are my opinions, not my company's opinion  */



Sun, 21 Mar 2004 23:21:44 GMT
 Prepared statements on 4GL - Linux platform
John Carlson schrieb:

Quote:


> see below . . .


> >I'll check my 4GL version on my Linux box at home and give it a whirl.  I believe it's 7.30.uc5.

> no problems on 7.20.ud7 . . . . all cursor names were uniquely mangled.  My home system is a bit older than what I anticipated.

> --------------------------------
> John Carlson
> Informix DBA
> EDS/WHSmith USA

> #include std_disclaimer.h     /* These are my opinions, not my company's opinion  */

I think 7.30UC1 had lots of bugs on all platforms. We had some strange problems
on Unixware 7.1.1
with prepared statements too. Tech Support told us to define the string that
contained the
statement as char(4096). With this workaround the problem was gone. But there
are some other
{*filter*} bugs in this version. I would try to get an update. The latest version for
Linux seems
to be 7.30UC5.

Regards

Roland



Mon, 22 Mar 2004 00:08:32 GMT
 Prepared statements on 4GL - Linux platform
Later 4gl version (on Soalris 2.6)
is 7.30.UC6P1.

Not sure what the P1 does!

7.30.UC7 is not due out till the end of the month.


Quote:

> Hi again.

> Oh... Sorry.
> UNIX platform works it, I don't know.

> So I tested following plogram in my PC.

> But error does not occur.

> Upgrade your 4GL to 7.30.UC6 or HIGHER.

> Here is my environment.


> INFORMIX-4GL Version   7.30.UC6


> kernel-2.2.14-5.0
> glibc-2.1.3-15

> Red Hat Linux release 6.2 (Zoot)
> Kernel 2.2.14-5.0 on an i686

> Regards.


> >This is 4GL and not SQL.  We've been using that type
> >of code for years and it currently works on other Unix
> >platforms.   We are trying to port our application to the
> >Linux platform.  Thanks anyway for your input.

> >----- Original Message -----



> >Sent: Monday, October 01, 2001 9:52 PM
> >Subject: Re: Prepared statements on 4GL - Linux platform

> >Hi Candy.

> >Prepare statement can not allow "CREATE and DROP TABLE" sequence.

> >See Informix GUIDE to SQL 2-408 and 2-415.

> >Regards.


> >>I have the following test program:

> >>MAIN

> >>        DEFINE
> >>        prepstr         CHAR(1000)

> >>        LET prepstr = "CREATE TEMP TABLE test (col1 CHAR(8))"
> >>        PREPARE s_0 FROM prepstr

> >>        LET prepstr = "DROP TABLE test"
> >>        PREPARE s_5 FROM prepstr

> >>END MAIN

> >>We are testing 4GL version 7.30.UC1 on Linux.

> >>When we compile the program using c4gl -c test.4gl
> >>we get the following error message:

> >>esqlc: "test.ec", line 50: Warning -33071: The statement id
> >>'I000741E8mbcmb7x0i'
> >>has already been used.
> >>1 warning(s)

> >>I thought all cursors/statements generated are unique.
> >>Has anyone else encountered this problem?

> >>Thanks in advance.  I've included test.ec below.

> >>Candy
> >> --
> >>Candy McCall
> >>ONLINE Computing, Inc.

> >>Here is test.ec:

> >>#include <sqlfm.h>

> >>#include <decimal.h>
> >>#include <locator.h>
> >>#include <datetime.h>
> >>#include <stdio.h>
> >>#include <fglrep.h>
> >>#define I4GL_SQLCA /* I4GLC1 */
> >>$extern struct
> >>  {
> >>    long sqlcode;
> >>    char sqlerrm[72];
> >>    char sqlerrp[8];
> >>    long sqlerrd[6];
> >>    char sqlawarn[8];
> >>  }  sqlca;
> >>$extern int status;
> >>extern int efcode;
> >>extern int _expcode;
> >>extern short _anyerr;
> >>$extern int int_flag;
> >>$extern int quit_flag;
> >>static char fgl_modname[] = "test.4gl";

> >>main(fgl_argc, fgl_argv)
> >>int fgl_argc;  char *fgl_argv[];

> >>{
> >>$char prepstr[1001];
> >>fgl_init(fgl_argc, fgl_argv);
> >>fgl_siginit();
> >>ixpshhwm();
> >>_anyerr = 0;
> >>pushquote( "CREATE TEMP TABLE test (col1 CHAR(8))" , 37);
> >>popquote(prepstr,1001);
> >>ixrsthwm();
> >>pushlong(475624L);
> >>fgl_mangle(prepstr);
> >>$ prepare I000741E8mbcmb7x0i from  $prepstr;
> >>status = sqlca.sqlcode;
> >>if (status < 0)
> >>{
> >>fgl_fatal(fgl_modname, 9, status);
> >>}
> >>pushquote( "DROP TABLE test" , 15);
> >>popquote(prepstr,1001);
> >>ixrsthwm();
> >>pushlong(475624L);
> >>fgl_mangle(prepstr);
> >>$ prepare I000741E8mbcmb7x0i from  $prepstr;
> >>status = sqlca.sqlcode;
> >>if (status < 0)
> >>{
> >>fgl_fatal(fgl_modname, 12, status);
> >>}

> >>/*
> >> * $  exit form mode;
> >> */
> >> {
> >> _efemode();
> >> }
> >>_autofree(0);
> >>ixrelhwm();
> >>return(0);
> >>}

> >--
> >Tsutomu Ogiwara

> >Informix Business Promotion Dept
> >ITOCHU TECHNO-SCIENCE Corporation
> >KURITA-KUDAN BLDG., 1-11-15, FUJIMI,
> >CHIYODA-KU TOKYO,102-0074 JAPAN
> >Phone:+81-3-5226-1951 Fax:+81-3-5226-1959

> --
> Tsutomu Ogiwara

> Informix Business Promotion Dept
> ITOCHU TECHNO-SCIENCE Corporation
> KURITA-KUDAN BLDG., 1-11-15, FUJIMI,
> CHIYODA-KU TOKYO,102-0074 JAPAN
> Phone:+81-3-5226-1951 Fax:+81-3-5226-1959




Tue, 23 Mar 2004 05:13:56 GMT
 
 [ 11 post ] 

 Relevant Pages 

1. linux execute prepared statement

2. performance question : prepared statement or statement?

3. informile to compile the 4gl and runx-4gl and linux

4. Question about Constructs and Prepares in Informix 4GL

5. Question about Constructs and Prepares in Informix 4GL

6. preparing select in 4GL problem

7. PREPARE/EXECUTE core dumps in 4GL

8. case 787122: Problem after FREEING prepared stmt in Dynamic-4GL

9. case 787122: Problem after FREEING prepared stmt in Dynamic-4GL

10. Accessing 4GL cursors with prepared & executed SQL

11. 4GL Prepare vs Stored Procedure ?


 
Powered by phpBB® Forum Software