• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4490
  • Last Modified:

PLS-S-00201 using Pro*C

In my search looking for why sqlcxt is Seg Faulting on me I used the SQLCHECK=FULL when running proc. I get 3 of the same errors on 3 different SQL statements.
SQL:
EXEC SQL SELECT value
INTO :value
FROM existing_table
WHERE name = 'var';

ERROR:
Error at line 96, column 5 in file transactor.pc
96 EXEC SQL SELECT value
96 ....1
96 PLS-S-00201, identifier 'EXISTING_TABLE' must be declared
Error at line 96, column 5 in file transactor.pc
96 EXEC SQL SELECT value
96 ....1
96 PLS-S-00000, SQL Statement ignored
Error at line 96, column 5 in file transactor.pc
96 EXEC SQL SELECT value
96 ....1
96 PCC-S-02346, PL/SQL found semantic errors


The funny part is I have another SQL statement that is exactly the same, but looks for a different 'name'.

0
majorspank
Asked:
majorspank
1 Solution
 
mathavraCommented:
If you stil facing the error and want to solve the problem, then try the following. OR, if you want to get more opinion on why the error is occuring, then please post the other "SQL" statements also.


SOLUTIION:
----------

These errors are always related to the configuration file.
If the configuration file (pcscfg.cfg) has sqlcheck=full, then the following errors will result:

   PCC-F-02209
   PCC-S-02201
   Error at line 0, column 0 in file sample1.pc
   PCC-F-02102, Fatal error while doing C preprocessing
   *** Exit 1
   Stop.
   *** Exit 1

There are incorrect settings for the PRO*C precompiler.

VERIFY ALL SETTINGS IN CONFIGURATION FILE ARE CORRECT AS BELOW.

On Most Unix Platforms
----------------------

This can be resolved by setting:

   sqlcheck=syntax

in the configuration file.

On Digital Unix
---------------

To resolve these errors, make sure that the configuration file (pcscfg.cfg)
has the following entry:

   code=ansi_c

PATH:
-----
($ORACLE_HOME/precomp/admin/pcscfg.cfg).
0
 
majorspankAuthor Commented:
I wasn't very clear.  Originally I had SQLCHECK=SYNTAX, which is the default for proc, but as a further check of my code I used the SQLCHECK=FULL flag to see if it might be an improper SQL statement.  

Are you saying that this will happen regularily on valid SQL statements when the SQLCHECK flag is set to FULL?


Also, my seg fault problem stems from the code generated from proc.  When I run a test on the function I don't get a seg fault, but when I integrate the function into the greater project I get a seg fault on a sqlcxt() call.  The test is just adding a main() to the .pc file and running it stand alone.  Do you know of any issue regarding sqlcxt() crashes?

Thanks for your help.
0
 
MoondancerCommented:
Please update and finalize this old, open question. Please:

1) Award points ... if you need Moderator assistance to split points, comment here with details please or advise us in Community Support with a zero point question and this question link.
2) Ask us to delete it if it has no value to you or others
3) Ask for a refund so that we can move it to our PAQ at zero points if it did not help you but may help others.

EXPERT INPUT WITH CLOSING RECOMMENDATIONS IS APPRECIATED IF ASKER DOES NOT RESPOND.

Thanks to all,
Moondancer - EE Moderator

P.S.  Click your Member Profile, choose View Question History to go through all your open and locked questions to update them.
0
 
MindphaserCommented:
Points refunded and moved to PAQ

** Mindphaser - Community Support Moderator **
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now