PCC-S-02322, found undefined identifier

From: Alex Vinokur <alexander.vinokur_at_telrad.co.il>
Date: Wed, 13 Oct 1999 08:14:15 GMT
Message-ID: <7u1f0f$93r$1_at_nnrp1.deja.com>



Hi,

I have got a problem while compiling Pro*C++ code. Here is a piece of the code.
Note#1. Here is only a code

        relevant concerning the compilation problem. Note#2. I cannot use parse=full to the pro*C++ command line

        because I receive the following error message:
        PCC-F-02107, You may not specify PARSE = FULL when CODE = CPP

        What is wrong?
        Thanks in advance,
        Alex



//#########################################################
//------------------- Pro*C++ code : BEGIN ----------------
// File ttt.pc

int main ()
{

EXEC SQL BEGIN DECLARE SECTION;
const char *host_statement;
EXEC SQL END DECLARE SECTION; EXEC SQL BEGIN DECLARE SECTION;
EXEC SQL DECLARE stmt1 STATEMENT;
EXEC SQL END DECLARE SECTION; EXEC SQL PREPARE stmt1 FROM :host_statement;

EXEC SQL BEGIN DECLARE SECTION;
EXEC SQL DECLARE curs1 CURSOR FOR stmt1; EXEC SQL END DECLARE SECTION; EXEC SQL OPEN curs1;

EXEC SQL CLOSE curs1;
EXEC SQL FREE :curs1; // Line#22

EXEC SQL FREE :stmt1; // Line#24

        return 0;
}

[Quoted] //------------------- Pro*C++ code : END ------------------

//#########################################################
//------------------- Compilation Results : BEGIN ---------

Pro*C/C++: Release 8.0.5.0.0 - Production on Wed Oct 13 10:4:13 1999

(c) Copyright 1998 Oracle Corporation. All rights reserved.

System default option values taken from:
/home/u01/app/oracle/product/8.0.5/precomp/admin/pcscfg.cfg

Semantic error at line 22, column 16, file ttt.pc: EXEC SQL FREE :curs1;
...............1
PCC-S-02322, found undefined identifier
Semantic error at line 22, column 10, file ttt.pc: EXEC SQL FREE :curs1;
.........1
PCC-S-02319, expression type does not match usage Semantic error at line 22, column 10, file ttt.pc: EXEC SQL FREE :curs1;
.........1
PCC-S-02336, host variable expression has invalid type Semantic error at line 24, column 16, file ttt.pc: EXEC SQL FREE :stmt1;
...............1
PCC-S-02322, found undefined identifier
Semantic error at line 24, column 10, file ttt.pc: EXEC SQL FREE :stmt1;
.........1
PCC-S-02319, expression type does not match usage Semantic error at line 24, column 10, file ttt.pc: EXEC SQL FREE :stmt1;
.........1
PCC-S-02336, host variable expression has invalid type make: *** [doit] Error 1


//------------------- Compilation Results : END -----------

//#########################################################
//------------------- System ------------------------------

  • Oracle 8.0.5
  • Pro*C/C++ : Release 8.0.5.0.0
  • SunOS 5.6

//---------------------------------------------------------

//#########################################################

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Oct 13 1999 - 10:14:15 CEST

Original text of this message