RE: Need code help-4GL to Linux Conversion
Posted in 2001
Mike Wrote> > Here is the code that fails immediately on executing > by .4ge . .. > SQL Statement error number -481 >Invalid statement name of statement was not PREPAREd If you check the SQLCA.SQLCODE status after the prepare statement you'll probably find it failed. It follows then that when you try declare it the error is 'statement was not PREPAREd'. To fix this (first add sqlca checking after your prepare statement) then try setting the following environment variable before compilation : export C4GLFLAGS=-globcurs I think this is the flag I used. If this does not work mail me back so I can confirm it for you on my system. I had a similar problem doing a port of 4gl apps from AIX to RedHat 6.2. The compilation failed with errors about the 'length of identifiers' etc in the ESQLC generated code. The '-globcurs' flag seems to do the trick (though beware executing cursors when using this flag!) BTW, C4GLFLAGS can be used to add any number of command line C-compiler directives. Credit for this solution to Informix Technical Support. HTH. Dave -- Friends help you move, REAL friends help you move bodies...