Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Error - Please Help

Re: Oracle Error - Please Help

From: <NeedaHoliday>
Date: Wed, 26 May 1999 17:07:55 GMT
Message-ID: <374f2a11.95689600@news.pwgsc.gc.ca>


I did a grep on the poll_invoice.c file and got the follow

/* EXEC SQL WHENEVER NOT FOUND GOTO end_of_email ; */ if (sqlca.sqlcode == 1403) goto end_of_email; end_of_email:

   if (sqlca.sqlcode == 1403) goto end_of_email;

I am not sure if this tell you something.

I also emailed the source code to you.

Thanks for your help

On Wed, 26 May 1999 15:01:24 GMT, tkyte_at_us.oracle.com (Thomas Kyte) wrote:

>A copy of this was sent to NeedaHoliday
>(if that email address didn't require changing)
>On Wed, 26 May 1999 13:23:35 GMT, you wrote:
>
>>The "char email_addr[25]" did exist in the code. I am running on a
>>solaris machine using Unix. The version is oracle 7.3.4.
>>
>>I also added logic to verify if the label did exist by adding an "C"
>>IF statement in the logic. The label was found. I have narrowed it
>>down to the embedded SQL code. For some reason, the WHENEVER clause
>>is not correct.
>>
>>Is there another way to handle this scenerio. I just want to catch
>>the end of file or no records found logic. I am having difficulty
>>understanding why the logic compiles in one program and not the other.
>>
>>
>>
>>Copyright (c) Oracle Corporation 1979, 1996. All rights reserved.
>>
>>System default option values taken from:
>>/d2/oracle/7.3.4/precomp/admin/pcscfg.h
>>
>>cc -xO2 -Xa -xstrconst -xcg92 -xF -mr -K PIC -DSLXMX_ENABLE
>>-DSLTS_ENABLE -D_R
>>EENTRANT -I. -I/d2/oracle/7.3.4/precomp/public -c poll_invoice.c
>>"poll_invoice.c", line 766: undefined label: end_of_email_list
>>cc: acomp failed for poll_invoice.c
>>*** Error code 2
>>make: Fatal error: Command failed for target `poll_invoice.o'
>>Wed May 26 09:19:25 EDT 1999
>>
>
>Lets see the .pc file. This is a cc error (not even related to pro*c
>whatsoever).
>
>if you "grep end_of_email_list poll_invoice.c" do you see and 'hits' besides the
>gotos?
>
>feel free to email me the .pc file that causes the error so I can look at it.
>
>>____________________________________________________-
>>
>>The compile command:
>>
>>make -f $ORACLE_HOME/precomp/demo/proc/proc.mk build EXE=poll_invoice
>>OBJS=poll_invoice.o \
>>PROCFLAGS="userid=$1/$2 sqlcheck=semantics"
>>
>>
>>I AM TOTALLY STUMPED.
>>
>>
>>
>>
>>On Wed, 26 May 1999 12:00:14 GMT, tkyte_at_us.oracle.com (Thomas Kyte)
>>wrote:
>>
>>>I precompiled this code below (after adding "char email_addr[25]") in 7.1, 7.3,
>>>8.0, and 8.1. I cannot reproduce.
>>>
>>>Perhaps you need to post the example that doesn't precompile -- also platform,
>>>version numbers, etc, etc would help as well.
>>>
>>>A cut and past of the precompile command and errors messages would be very
>>>helpful too.
>>>
>>>A copy of this was sent to NeedaHoliday
>>>(if that email address didn't require changing)
>>>On Tue, 25 May 1999 19:11:33 GMT, you wrote:
>>>
>>>>I keep getting a compilation error with the following code. This code
>>>>resides in two programs. One program compiles and the other doesn't.
>>>>Makes no sense. Can someone help.
>>>>
>>>>The compilation message is "end_of_email_list" label not found.
>>>>
>>>>void error_msg()
>>>>{
>>>> char lc_err_string[151];
>>>>
>>>>
>>>> EXEC SQL WHENEVER SQLERROR DO sql_error("ORACLE error poll
>>>>error_msg() address--\n");
>>>> EXEC SQL DECLARE cemail_cur CURSOR FOR
>>>> SELECT EML_USR_ID
>>>> FROM EMPLOYEE
>>>> WHERE UPPER(USR_LAN_ID) = 'CIMSERR'
>>>> AND EXP_DT IS NULL;
>>>>
>>>> EXEC SQL OPEN cemail_cur; /* open cinv_cur cursor */
>>>> while (TRUE) /* while loop */
>>>> {
>>>> strcpy(email_addr, " ");
>>>> EXEC SQL WHENEVER NOT FOUND GOTO end_of_email_list;
>>>> EXEC SQL FETCH cemail_cur INTO
>>>> :email_addr;
>>>>
>>>> if(email_addr != NULL)
>>>> strcpy(lc_err_string, "");
>>>> strcpy(lc_err_string, "echo \"Please verify ERRTBL \"");
>>>> strcat(lc_err_string, MAIL);
>>>> strcat(lc_err_string, "\" CIMS error has ocurred \"");
>>>> strncat(lc_err_string, COLSPACE, 1);
>>>> strcat(lc_err_string, email_addr);
>>>> system(lc_err_string);
>>>> }
>>>> end_of_email_list:
>>>> EXEC SQL CLOSE cemail_cur;
>>>>
>>>>
>>>>} /* error_msg() */
>>>
>>>
>>>See http://www.oracle.com/ideveloper/ for my column 'Digging-in to Oracle8i'...
>>>
>>>Thomas Kyte
>>>tkyte_at_us.oracle.com
>>>Oracle Service Industries
>>>Reston, VA USA
>
>
>See http://www.oracle.com/ideveloper/ for my column 'Digging-in to Oracle8i'...
>
>Thomas Kyte
>tkyte_at_us.oracle.com
>Oracle Service Industries
>Reston, VA USA
Received on Wed May 26 1999 - 12:07:55 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US