IDS 11.0 throws "Warning -33208: Runtime error..."
Posted in 2008
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi, We are using IDS 11.0 under REHL 5.0 When we comipled the ec files that were developed under Informix 5.0, we are getting the below error "Warning -33208: Runtime error is possible because size of 'create_fin_time1' is unknown" When we did google, we found the below information "esqlc:warning -33208 Runtime error is possible because size of host-variable-name is unknown. This message is a warning only; compilation continues. ESQL/C does not know the size of the host character variable. If the variable is used in an INTO clause, memory might be overwritten. Specify the variable as a character array with a numeric size. The numeric size can be a literal value or an ESQL/C macro value" Also we found the below release notes, * This functionality is addressed in Version 6.0. B28011: GLOBAL ARRAYS WITH DEFINES OR ADDITIONS WILL GIVE WARNING 33208 ON COMPILE. LOCAL ARRAYS WORK FINE. This problem may occur if you have a global array in an ESQL/C program defined as: 1. myvar[1 + 1] 2. myvar[MYDEF + 1] where (either #define or ) 3. myvar[MYDEF] where (#define MYDEF & not MYDEF) Is there any way we would like to retain the size variable in a header file and still dont want the esqlc compiler to throw an error. Thanks, Lakshmi
I hope you are getting warnings and not errors (difference in terms of generating executables) during compilation. It also recommends to use "$" instead of "#" for macros. Not sure if its going to help though .. -Shesh "LAKSHMI DEVI PALANISSAMY" <lakshmidevip@hcl.in> Sent by: ids-bounces@iiug.org 17/11/2008 11:53 Please respond to ids@iiug.org To ids@iiug.org cc Subject IDS 11.0 throws "Warning -33208: Runtime error..." [13979] Hi, We are using IDS 11.0 under REHL 5.0 When we comipled the ec files that were developed under Informix 5.0, we are getting the below error "Warning -33208: Runtime error is possible because size of 'create_fin_time1' is unknown" When we did google, we found the below information "esqlc:warning -33208 Runtime error is possible because size of host-variable-name is unknown. This message is a warning only; compilation continues. ESQL/C does not know the size of the host character variable. If the variable is used in an INTO clause, memory might be overwritten. Specify the variable as a character array with a numeric size. The numeric size can be a literal value or an ESQL/C macro value" Also we found the below release notes, * This functionality is addressed in Version 6.0. B28011: GLOBAL ARRAYS WITH DEFINES OR ADDITIONS WILL GIVE WARNING 33208 ON COMPILE. LOCAL ARRAYS WORK FINE. This problem may occur if you have a global array in an ESQL/C program defined as: 1. myvar[1 + 1] 2. myvar[MYDEF + 1] where (either #define or ) 3. myvar[MYDEF] where (#define MYDEF & not MYDEF) Is there any way we would like to retain the size variable in a header file and still dont want the esqlc compiler to throw an error. Thanks, Lakshmi ******************************************************************************* Forum Note: Use "Reply" to post a response in the discussion forum.
Change the #defines to EXEC SQL DEFINE and change the #include of the header file to EXEC SQL INCLUDE so that the ESQL/C preprocessor fills in the values before the ESQL/C compiler sees the array definitions. The earlier ESQL/C versions had the same problem about not knowing the size of arrays defined using C preprocessor featutes, it was just silent about it. The only problem with not getting the warnings (or ignoring them) was/is that the compiler does not know the size of the actual array, so at runtime there may be array overruns if the array is missized or if a column is modified over time to be too large to fit in the host array. Once you fix this, the ESQL/C runtime library and the engine will properly and safely truncate the data returned into the array and note the truncation in any indicator variable you declared for that column (see the ESQL/C Programmers Guide). Art On Mon, Nov 17, 2008 at 1:23 AM, LAKSHMI DEVI PALANISSAMY < lakshmidevip@hcl.in> wrote: > Hi, > > We are using IDS 11.0 under REHL 5.0 > > When we comipled the ec files that were developed under Informix 5.0, > we are getting the below error "Warning -33208: Runtime error is > possible because size of 'create_fin_time1' > is unknown" > > When we did google, we found the below information > "esqlc:warning -33208 Runtime error is possible because size of > host-variable-name is unknown. > This message is a warning only; compilation continues. ESQL/C does not > know the size of the host character variable. If the variable is used > in an INTO clause, memory might be overwritten. Specify the variable > as a character array with a numeric size. The numeric size can be a > literal value or an ESQL/C macro value" > > Also we found the below release notes, > * This functionality is addressed in Version 6.0. > B28011: GLOBAL ARRAYS WITH DEFINES OR ADDITIONS WILL GIVE WARNING > 33208 ON COMPILE. LOCAL ARRAYS WORK FINE. > This problem may occur if you have a global array in an ESQL/C > program defined as: > 1. myvar[1 + 1] > 2. myvar[MYDEF + 1] where (either #define or ) > 3. myvar[MYDEF] where (#define MYDEF & not MYDEF) > > Is there any way we would like to retain the size variable in a header > file and still dont want the esqlc compiler to throw an error. > > Thanks, > Lakshmi > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > -- Art S. Kagel Oninit (www.oninit.com) IIUG Board of Directors (art@iiug.org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Oninit, the IIUG, nor any other organization with which I am associated either explicitly or implicitly. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.
Is it possible to import the database from a raw partition to a file system partition?
I have a header file as "# include <oas.h>". When i changed as "EXEC SQL INCLUDE oas.h", the compiler reported the following error "Error -33002: Syntax error in the ESQL INCLUDE statement."