Re: IDS 11.0 throws "Warning -33208: Runtime error
Posted in 2008
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
EXEC SQL INCLUDE oas.h; /* Don't forget the semi-colon! */ From my myschema utility source: EXEC SQL INCLUDE myschema.eh; /* I name it .eh because there are ESQL defs in there and there is a C specific version of the header named myschema.h */ Art On Tue, Nov 18, 2008 at 8:50 AM, LAKSHMI DEVI PALANISSAMY < lakshmidevip@hcl.in> wrote: > 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." > > > > ******************************************************************************* > 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.
Thanks for your inputs. But still i am getting other errors where the function definition is starting.. :-(
On Tue, Nov 18, 2008 at 11:12 PM, LAKSHMI DEVI PALANISSAMY <lakshmidevip@hcl.in> wrote: > Thanks for your inputs. > > But still i am getting other errors where the function definition is > starting.. :-( OK; how about giving us enough context to help you? What errors or warnings are you getting now? What does the code 5 lines either side of the first warning look like? -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2008.0513 -- http://dbi.perl.org/ "Blessed are we who can laugh at ourselves, for we shall never cease to be amused." NB: Please do not use this email for correspondence. I don't necessarily read it every week, even.
I did a mistake by using C header file. Let me explain the problem exactly. I have a C header file "oas.h". Some code from my header file #define DELETE_UNRD_PLATE 2 #define MAN_INV_RD_PLATE 3 #define MAN_INV_RD_WELL 4 #define REREAD_INV_RD_PLATE 5 #define ADD_ASSAY 6 #define DELETE_ASSAY 7 #define UNDELETE_ASSAY 8 #define MARK_MISS_UNRD_WELL 9 #define UNMARK_MISS_UNRD_WELL 12 #define ADD_USER 13 #define DELETE_USER 14 #define EDIT_USER 15 #define EDIT_SYSTEM_VARS 16 #define EDIT_KITLOT 17 #define DELETE_KITLOT 18 #define ADD_KITLOT 19 #define ADD_INST 20 #define EDIT_INST 21 #define DELETE_INST 22 #define ADD_ASSAY_SEC 23 #define DELETE_ASSAY_SEC 24 #define ADD_GLOBAL 28 This oas.h header file i am referring in the EC file by using #include "oas.h" Hence the constants mentioned in the header file gives the run time error. I dont want to create anotherESQL/C header file. Instead i used to play around with C header file. Hope i have explained you correctly!!!!!!!
OK, this gets hinky and is VERY hard to get right. It is FAR better to maintain two separate header files one for ESQL/C and one for pure C. There is one easy way to use a single header: Just make the 'C' header. Then, when you compile ESQL/C, add the '-cp' flag to the compile line. That will cause the esql script to run the normal 'C' preprocessor BEFORE running the esql/c preprocessor steps so that all of your #defines and #includes will be resolved before ESQL/C sees them. Only one rub: There can be very little reference in the C header file that requires any ESQL/C definitions as those will not be resolved until AFTER the preprocessor is run. I won't descibe the hard way as it involved carefully interleaving #if ... and EXEC SQL IF...; constructs which are dependent on the proper #define's and EXEC SQL DEFINE's in each file in which the header is included identifying it as C or ESQL/C. More trouble than it's worth and there are situations where it just won't work, especially if there are multiple headers. Ping me directly if you need to try that. Have fun. Art On Fri, Nov 21, 2008 at 4:52 AM, LAKSHMI DEVI PALANISSAMY < lakshmidevip@hcl.in> wrote: > I did a mistake by using C header file. > > Let me explain the problem exactly. > > I have a C header file "oas.h". Some code from my header file > #define DELETE_UNRD_PLATE 2 > #define MAN_INV_RD_PLATE 3 > #define MAN_INV_RD_WELL 4 > #define REREAD_INV_RD_PLATE 5 > #define ADD_ASSAY 6 > #define DELETE_ASSAY 7 > #define UNDELETE_ASSAY 8 > #define MARK_MISS_UNRD_WELL 9 > #define UNMARK_MISS_UNRD_WELL 12 > #define ADD_USER 13 > #define DELETE_USER 14 > #define EDIT_USER 15 > #define EDIT_SYSTEM_VARS 16 > #define EDIT_KITLOT 17 > #define DELETE_KITLOT 18 > #define ADD_KITLOT 19 > #define ADD_INST 20 > #define EDIT_INST 21 > #define DELETE_INST 22 > #define ADD_ASSAY_SEC 23 > #define DELETE_ASSAY_SEC 24 > #define ADD_GLOBAL 28 > > This oas.h header file i am referring in the EC file by using > #include "oas.h" > > Hence the constants mentioned in the header file gives the run time error. > > I dont want to create anotherESQL/C header file. Instead i used to play > around > with C header file. > > Hope i have explained you correctly!!!!!!! > > > > ******************************************************************************* > 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.