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 -> Oracle Error - Please Help

Oracle Error - Please Help

From: <NeedaHoliday>
Date: Tue, 25 May 1999 19:11:33 GMT
Message-ID: <374af5bf.16759488@news.pwgsc.gc.ca>


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() */ Received on Tue May 25 1999 - 14:11:33 CDT

Original text of this message

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