PCC-S-02201 occured while compiling proc file [message #263501] |
Thu, 30 August 2007 03:41 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
nitzany
Messages: 4 Registered: August 2007
|
Junior Member |
|
|
Hi,
My OS is Solrais 8 and the Oracle is Oracle 10g 10.2.0.1.0
I was trying to complie the following proc file :
--------------------------------------------------
#INCLUE <sqlca.h>
typedef char string5_type[5];
typedef string5_type str5_array_type;
void worker_prof(
str5_array_type db_worker_prof,
short* db_worker_prof_ind
)
{
EXEC ORACLE OPTION(char_map=VARCHAR2);
EXEC SQL SELECT(CASE WHEN WORKERS.Kind = 1 THEN (
SELECT 'AAAAA'
FROM DUAL)
ELSE
NULL
END) Prof
INTO :db_worker_prof
INDICATOR:db_worker_prof_ind
FROM WORKERS
WHERE Worker_id = 1;
}
-----------------------------------------------------
While compiling I received the following errors :
Pro*C/C++: Release 10.2.0.1.0
(c) Copyright 2005 Oracle Corporation. All rights reserved
System default option values taken from: /oracle/ora102/precomp/admin/pcscfg.cfg
Syntax error at line 12, column 67, file test.pc: Error at line 12, column 67 in file test.pc
EXEC SQL SELECT(CASE WHEN WORKERS.Kind = 1 THEN (SELECT 'AAAAA' FROM DUAL)
PCC-S-02201, Encountered the symbol "AAAAA" when expecting one of the following:
( ) * + - /. @ | at,day,hour,minute,month,seconds,year
Error at line 0, column 0 in file test.pc
PCC-F-02102, Fatal error while doing C preprocessing
I read a post similar to this one and there it was written :
"It turns out that the problem is that the Oracle 8.1.7.4 precompiler parses the AIX 5.l header files without knowing the default defines that are set for the compiler. Hence the default defines set by the C compiler need to be passed on to the precompiler. The solution is to set DEFINE=__64BIT__ or DEFINE=_LONG_LONG in the precompilation options. We added this setting to our makefile, but there are other ways to set precompilation options as needed. This worked for us!"
I tried to do so by executing the commands :
proc test.pc define=__64BIT__
proc test.pc define=_LONG_LONG but it did not help.
Two remarks :
1 By replacing the "SELECT 'AAAAA' FROM DUAL" to just 'AAAAA'
the problem was solved.
Of course this file code is a sample file
that presents the error and not my real code.
2. my pcscfg.cfg is an empty file.
Anyone ? HELP PLEASE .
[Updated on: Thu, 30 August 2007 08:35] Report message to a moderator
|
|
|
|
|
|
|
|
Re: PCC-S-02201 occured while compiling proc file [message #264216 is a reply to message #263608] |
Sun, 02 September 2007 01:47 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
nitzany
Messages: 4 Registered: August 2007
|
Junior Member |
|
|
hey
I tried running the command with sqlcheck = none(and no) and it raised the same error.
I also tried the select_error parameter(don't realy know it but it looked related) , didn't help either.
Don't you think it's something about the compiler default DEFINEs which the preprocessor doesn't know about?
any other suggestions ?
[Updated on: Sun, 02 September 2007 01:51] Report message to a moderator
|
|
|
|