Sven, You are correct. I found that we get an error during compilation whenever the following statement occurs : EXEC SQL WHENEVER NOT FOUND DO break; for... loop.. This error is resolved if this piece of code is modified to: EXEC SQL WHENEVER NOT FOUND DO break; for...loop.. EXEC SQL WHENEVER NOT FOUND CONTINUE; I have been able to compile the code successfully and generate the executable using GCC. Thanks for the advice. Apart from this, there was one more important statement that I had noticed in the IBM website, earlier forwarded by yourself. (http://www-128.ibm.com/developerworks/eserver/articles/gnu.html). IBM mentions that "You cannot use the GNU linker on AIX as this will cause incorrectly linked binaries. By default, the AIX linker is used when using GCC on AIX. You should only use the default AIX linker. ". I modified the linking statement to use the default linker (ld) instead to GCC and was also able to generate the executable. However, as of now, I am looking at one of the GCC make files that could do all these manual activities for me. Could you please let me know whether do we get GCC make file with the GCC compiler? If yes, which is the location that I need to search in? Warm Regards, ______________________________________________ Rachit Verma External: +44 1455 89 5644 ______________________________________________ Sven Eschenberg <eschenb@xxxxxxxxx ankfurt.de> To: Rachit.Verma@xxxxxxxxxxxxx cc: gcc-help@xxxxxxxxxxx 07/06/06 14:03 Subject: Re: Error during Pro*C compilation Hi Rachit, Okay, obviously, from what I can see, there is an exit condition (ocurrance of some sql error) which is supposed to end some iteration (thus the break). What I cannot tell, or am not sure about: It looks like the there is no iterating loop, which the break belongs too, at least not in this source file. On the other hand, from what I know, break is only available within looping control structures. Since I don't know Pro*C and which non standard options it provides, I can only guess that the statement is meant to break out of the function thus avoiding the return value true. So maybe, a simple modification from: if (sqlca.sqlcode == 1403) break; into if (sqlca.sqlcode == 1403) return FALSE; might fix the code and do what is meant to do. But, it's pretty hard to tell, without any surrounding code. So, I guess, you need to dig into the code a little and analyze it to find out, if the break at this position actually resembles a return FALSE. In the Pro*C source you attached, I cannot see any specific error checking after the actual insertion. If the if/break statement was created during conversion, it might just be an error in the conversion process? Regards -Sven Rachit.Verma@xxxxxxxxxxxx wrote: > Sven, > > Thanks a lot of the piece of advice. That helped to solve our problem and > we were successfully able to compile the sample file provided by Oracle. > > Now, while compiling our application related code, we are successfully able > to convert .pc to .c. While compiling .c file, we are getting the following > error: > > Code.c: In function `ProcessSelectList': > Code.c:2240: warning: passing arg 2 of `sqlprc' from incompatible pointer > type > Code.c:2240: warning: passing arg 3 of `sqlprc' from incompatible pointer > type > Code.c: In function `WriteResultToTable': > Code.c:3806: error: break statement not within loop or switch > Code.c: In function `strtok2': > Code.c:4462: warning: comparison of distinct pointer types lacks a cast > > When I saw my Pro*C code, I could not find an equivalent 'break' statement. > Attached below is the Pro*C section of the code where this error is > generated: > > (See attached file: ProC.txt) > > Attached below is the section of the C file that is generated. > > (See attached file: ConvertedC.txt) > > Could you please let us know any work around or rather a possible reason > for this error? Do we need to include any flag in this case also in order > to compile the C file successfully? > > > Warm Regards, > ______________________________________________ > Rachit Verma > External: +44 1455 89 5644 > ______________________________________________ > > > > > > > Sven Eschenberg > <eschenb@xxxxxxxxx > ankfurt.de> To: Rachit.Verma@xxxxxxxxxxxxx > cc: gcc-help@xxxxxxxxxxx > 06/06/06 18:13 Subject: Re: Error during Pro*C compilation > > > Unless expressly stated to the contrary, the views expressed in this email are not necessarily the views of National Grid plc or any of its subsidiaries or affiliates (Group Companies), and the Group Companies, their directors, officers and employees make no representation and accept no liability for its accuracy or completeness. This e-mail, and any attachments are strictly confidential and intended for the addressee(s) only. The content may also contain legal, professional or other privileged information. If you are not the intended recipient, please notify the sender immediately and then delete the e-mail and any attachments. You should not disclose, copy or take any action in reliance on this transmission. You may report the matter by calling us on 0800 085 4806. Please ensure you have adequate virus protection before you open or detach any documents from this transmission. The Group Companies do not accept any liability for viruses. An e-mail reply to this address may be subject to monitoring for operational reasons or lawful business practices.