Pro*C 错误的详细信息及解决对策

Pro*C 错误的详细信息及解决对策

Oracle Precompiler: Pro*C/C++ Release 3.0 Messages
PCC-02010: found end-of-file while scanning string literal
Cause: A string in a SQL statement, which should be delimited by single quotation marks, was not terminated properly.

Action: Check that all strings are delimited.

PCC-02011: found identifier greater than 128 characters (truncated)
Cause: The precompiler found an identifier that was too long.

Action: Shorten the identifier. SQL identifiers should be limited to 18 characters.

PCC-02012: did not find a matching quote for CHAR constant
Cause: A character constant with a single quotation mark was not terminated.

Action: Terminate the character constant.


PCC-02013: unknown escape sequence
Cause: The precompiler found an escape sequence that it could not process inside a string literal. This error can arise when multi-byte character strings that can contain shift-in or shift-out escape sequences are used.

Action: Correct the string representation.

PCC-02014: syntax error at line num, column colnam, file name
Cause: The precompiler detected an error in C or embedded SQL syntax. This message is followed by a more specific error message.

Action: Correct the syntax error.

PCC-02015: unable to open include file
Cause: The precompiler could not open a header file that was specified using the #include preprocessor directive or the EXEC SQL INCLUDE statement. This can happen if the file specification is inaccurate or if read permission or read access rights on the file or on one or more of the directories in the path were not granted.

Action: Recheck that the file specification is correct, that the file exists, and that read permission has been granted so that the file can be read.

PCC-02016: include file pathname is too long
Cause: The pathname for include files exceeded the maximum length of 80 characters.

Action: Move the include file, or create an environment variable or logical to shorten the pathname.

PCC-02017: unable to open output file
Cause: The precompiler could not open an output file. This could be a generated code output file (.c file) or a listing file. This message can result from many causes. For example:

A pathname for a specified output file contains a non-existent directory.
An operating-system error occurred because the file system or disk is full.
Write permission on the specified directory or directories in the path do not exist.
Action: Track down the cause of the error, as suggested above, and correct it.

PCC-02018: found end-of-file while scanning comment
Cause: A C comment, either in C code or in an embedded SQL statement, was not terminated.

Action: Find the unterminated comment and terminate it with */.

PCC-02019: preprocessor warning at line num, column colnam, file name
Cause: This message indicates that a warning condition occurred as the precompiler was doing the preprocessor pass. A more specific warning message will follow this message.

Action: Correct the condition according to the action specified for the message that follows.

PCC-02020: preprocessor error at line num, column colnam, file name
Cause: This message indicates that an error condition occurred as the precompiler was in the preprocessing phase. A more specific error message will follow this message.

Action: Correct the error according to the action specified for the message that follows.

PCC-02021: found newline while scanning string literal
Cause: A string constant contains a newline character. For example,

char x[] = "Hello
world";

Action: Remove the newline character.


PCC-02022: found end of file while scanning a SQL statement
Cause: The precompiler encountered an end of file while parsing an EXEC SQL statement.

Action: Add the statement terminator(;) or complete the EXEC SQL statement.

PCC-02023: found end of file while scanning a PL/SQL statement
Cause: The precompiler encountered an end of file while parsing a PL/SQL statement (exec sql execute ...).

Action: Complete the PL/SQL statement.

PCC-02024: NCHAR literals are not permitted inside PL/SQL blocks
Cause: The precompiler found a multi-byte character string in an embedded PL/SQL statement. For example, the offending code might look like

exec sql execute
         declare
              name char(10) := N'Matsuda';
         begin
             ....
        end;
end-exec;

Action: Remove multi-byte character string from the PL/SQL block or rewrite the declaration without using NLS_CHAR.

PCC-02025: NLS_LOCAL should be TRUE when using NCHAR literals
Cause: The precompiler detected a multi-byte character host variable (NCHAR literal) when the option NLS_LOCAL was not set to TRUE on the command line. When NLS_LOCAL=TRUE, the runtime library (SQLLIB) performs blank-padding and blank-stripping for host variables that are of multi-byte types.

Action: Specify NLS_LOCAL=TRUE on the command line.

PCC-02035: CMD-LINE: CONFIG= option is invalid in a config file
Cause: A user configuration file inside a user configuration file cannot be specified. That is, nested configuration files cannot be nested.

Action: If there are nested configuration files, move the options from the nested files to the top-level file.

PCC-02040: CMD-LINE: Option selected, but no value provided
Cause: An option on the command line was specified, but a value for it was not included. For example, the offending code might look like:

proc ina=sample1 oname=

could trigger this error message.

Action: Provide a value for the option.


PCC-02041: CMD-LINE: Option does not exist:
Cause: A non-existent option on the command line was specified.

Action: See the Programmer's Guide to the Oracle Precompilers for a list of the valid command-line options and their possible values.

PCC-02043: CMD-LINE: Option syntax is incorrect
Cause: A value for a command-line option was incorrectly specified.

Action: See the Programmer's Guide to the Oracle Precompilers for the correct syntax for specifying command-line option values.

PCC-02044: CMD-LINE: Illegal or out of range value for option: option string
Cause: A value specified for a command-line option was not within the accepted range. For example, the range for the MAXOPENCURSORS option is 5 to 256. If a value outside this range is specified, this message is triggered.

Action: See the Programmer's Guide to the Oracle Precompilers for the ranges that option values can take.

PCC-02045: CMD-LINE: Option is not unique: option name
Cause: An option name was partially specified on the command line that made it non unique. For example, in the command line

proc in=t.pc

the "in" option can imply either the iname or include option.

Action: Provide sufficient characters on the command line to make the option name unique.

PCC-02046: CMD-LINE: Unable to open config file: filename
Cause: A non-existent user configuration file was specified on the command line with the config option.

Action: Provide a valid filename for the configuration file.

PCC-02047: CMD-LINE: Option is not allowed inline: option string
Cause: An option was entered inline that can only be entered on the command line or in a configuration file. For example, the offending code might look like

EXEC ORACLE option (nls_char=<name>;);

The nls_char option can only be entered on the command line or in a configuration file.

Action: Remove the option from the source file, and specify it on the command line.

PCC-02066: CMD-LINE: Could not find or could not open system config file
Cause: The system configuration file has a standard name (pmscfg.h) and a location that is operating-system dependent. On UNIX systems, it is located in the $ORACLE_HOME/proc directory. If a file named pmscfg.h is not found in the standard location, this warning message is issued.

Action: Create a system configuration file in the standard location. The file can be empty. See also the operating system-specific Oracle documentation.

PCC-02081: CMD-LINE: Unterminated option value list or value list was truncated
Cause: An option that takes a list of values was entered. The value list did not have a closing parenthesis. This error may also occur if the list of values entered on a single line was too long and Pro*C truncated it.

Action: Ensure that all value lists are terminated with a closing parenthesis. Split long value lists into individual entries.

PCC-02100: unable to initialize PL/SQL
Cause: The precompiler connected to Oracle but could not invoke the PL/SQL engine. This error can result if an earlier release of Oracle is used without the Procedural Option.

Action: To use PL/SQL, upgrade to a more recent release of Oracle.

PCC-02101: unable to open input file
Cause: The precompiler could not open the input file. This is the .pc file specified in the INAME= option. This means that the file does not exist, that a directory was incorrectly specified in the pathname, or that the person running the precompiler does not have read permission for the file.

This message could also result from operating-system errors. For example, an unmounted file system or disk I/O errors, could trigger this error.

Action: Check that permission to read the file exists and that the full pathname has been specified correctly. Check for operating system-specific problems. See also the operating system-specific Oracle documentation.

PCC-02102: fatal error while doing C preprocessing
Cause: The precompiler issues this message after a more specific message.

Action: Correct the problem specified in the previous message or messages.

PCC-02103: please enter your password:
Cause: The username was specified on the command line without a password. For example:

proc sqlcheck=full iname=sample1.pc userid=scott/

Action: Re-enter the command line, and include the password.

PCC-02104: unable to connect to Oracle
Cause: The precompiler could not connect to Oracle with the username, password, and, if applicable, database link that was supplied. Note that this is a precompiler message, not a run time message. This means that the USERID option value, either on the command line or in a configuration file, was incorrect.

Action: Check that the username and password are current and correct. Run SQL*DBA or SQL*Plus and verify that connection can be made using that username and password.

PCC-02105: unable to open list file
Cause: The precompiler could not open the listing file. This message can result from many causes. For example:

A pathname for a specified listing file contains a non-existent directory.
An operating-system error occurred because the file system or disk is full.
Write permission on the specified directory has not been granted.
Action: Track down the cause of the error, as suggested above, and correct it.

PCC-02106: USERID only used when SQLCHECK=FULL, userid ignored
Cause: The USERID option was specified on the command line, but SQLCHECK was not equal to FULL or SEMANTICS. The USERID has no effect, unless SQLCHECK=FULL or SQLCHECK=SEMANTICS.

Action: This is a warning message only.

PCC-02107: you may not specify PARSE = FULL when CODE = CPP
Cause: The PARSE=FULL and CODE=CPP options were both specified on the command line. The PARSE=FULL option invokes the C parser, which does not understand any C++ constructs generated by the precompiler with CODE=CPP option.

Action: Set the PARSE option to either NONE or PARTIAL if the CODE=CPP option is specified.

PCC-02108: UNSAFE_NULL=YES allowed if MODE=ORACLE and DBMS=V7 or V8
Cause: UNSAFE_NULL=YES was specified on the command line, but either the MODE option was not ORACLE or the DBMS option was not V7 or V8.

Action: Specify MODE=ORACLE and DBMS=V7 or V8 when using UNSAFE_NULL=YES.

PCC-02109: SQLCHECK=NONE is not yet supported, using SYNTAX
Cause: SQLCHECK=NONE was specified on the command line but is not supported in this release. SQLCHECK=SYNTAX was used instead.

Action: This is a warning message only. To avoid this warning, specify SQLCHECK=SYNTAX or SQLCHECK=SEMANTICS.

PCC-02110: DBMS=V6_CHAR is deprecated. Use CHAR_MAP=VARCHAR2, DBMS=V7 instead
Cause: DBMS=V6_CHAR was specified on the command line but is a no longer supported option. The options CHAR_MAP=VARCHAR2 andDBMS=V7 were used instead.

Action: This is a warning message only. To avoid this warning, specify CHAR_MAP=VARCHAR2 and, if required, DBMS=V7.

PCC-02111: CHAR_MAP option ignored. Only CHAR_MAP=VARCHAR2 allowed for DBMS=V6
Cause: DBMS=V6 was specified, and CHAR_MAP was specified with a value other than VARCHAR2. The CHAR_MAP value is ignored.

Action: This is a warning message only. To avoid this warning, specify a DBMS value other than DBMS=V6 or use CHAR_MAP=VARCHAR2.

PCC-02112: OBJECTS option ignored. OBJECTS=YES is not allowed for DBMS=V6 or V7.
Cause: OBJECTS=YES was specified on the Pro*C command line, but the DBMS option value was not valid.

Action: This is a warning message only. To avoid this warning for OBJECTS=YES, use DBMS=V8 or DBMS=NATIVE with a V8 database.

PCC-02129: CMD-LINE: Client supplied static options table is invalid
Cause: This is an internal error message not usually issued.

Action: Call Oracle customer support.


PCC-02132: CMD-LINE: Could not allocate memory
Cause: This is an internal error message not usually issued.

Action: Call Oracle customer support.


PCC-02133: CMD-LINE: Error processing string function
Cause: This is an internal error message not usually issued. It indicates that a C string function, such as strcpy or strlen, returned an error.

Action: Call Oracle customer support.

PCC-02134: CMD-LINE: Null option supplied
Cause: A zero length option was specified on the command line.

Action: Re-enter the command line with a valid option.

PCC-02135: CMD-LINE: User asked for help
Cause: This is a final message that the precompiler issues when information about the command-line options has been requested. For example, if the command

proc ?

is issued to get a list of the current default values for the command-line options, this message appears at the end of the list.

Action: No action required.

PCC-02138: CMD-LINE: Internal consistency error
Cause: This is an internal message for program exceptions. An unexpected condition was encountered by the command-line processor and a consistency check failed. Some possible causes of this message include:

invalid command-line options
memory corruption
Action: Report this error to Worldwide Support after gathering the following information:

the events that led to the error
the attempted operations that led to the error
any unusual circumstances prior to this error
PCC-02144: CMD-LINE: Blank characters are not allowed on either side of an equal sign (=)
Cause: An equal sign (=) was either immediately preceded or followed by a blank character.

Action: Precompile your program again without blank characters on either side of any equal sign (=) on the command line.

PCC-02150: error at line num, column num in file name
Cause: An error was encounter at the given location.

Action: Check the named source file and correct the error using the additional information which follows this error message.

PCC-02151: line num column num file name:
Cause: An error was encounter at the given location.

Action: Check the listed source file and correct the error using the additional information which follows this error message.

PCC-02152: unable to open file name to display or list the source line num
Cause: The file contains an error, but could not be reopened to list or display the incorrect line.

Action: Check that the file is intact and it has read permission. Then rerun the operation.

PCC-02153: open file: name
Cause: A new source file was opened while producing the list file.

Action: No action required; this is an informational message.

PCC-02154: close file: name
Cause: A source file was closed while producing the list file.

Action: No action required; this is an informational message.

PCC-02200: found unrecognized punctuation sequence
Cause: This error indicates that the precompiler parser encountered a badly-formed identifier or keyword.

Action: Correct the syntax.

PCC-02201: found syntax error
Cause: This general message precedes one or more specific messages that detail the nature of the error.

Action: No action required. Correct the errors diagnosed in the following message(s).

PCC-02202: no TYPEDEF name was given
Cause: The precompiler parser encountered a TYPEDEF statement that had no name after the type specification. For example

typedef int;

Action: Correct the syntax.

PCC-02203: found end of file when not expected
Cause: The parser can emit this message when a general syntax error occurs, for example, an unmatched `{' or `('.

Action: Correct the syntax.

PCC-02204: EXEC SQL INCLUDE not permitted from within an included file
Cause: EXEC SQL INCLUDE statements cannot be nested. Also, an EXEC SQL INCLUDE statement cannot be put inside a file that is included using the #include preprocessor command.

Action: Recode the program so that the nested include statement is not required.

PCC-02205: parser error at line num, column colnam, file name
Cause: The precompiler parser encountered a syntax error, either in C code or in SQL code. A more specific message should follow.

Action: No action required for this message. Take the appropriate action for any following messages.


PCC-02206: host variables are not permitted within a DDL statement
Cause: A Data Definition Language statement cannot use host variables. For example, the statement

CREATE TABLE :table_name (c1 char(10));

is illegal, because the name of the table in a CREATE TABLE statement cannot be represented using a host variable.

Action: Use dynamic SQL to create the names of database objects (tables, views, columns, etc.) at runtime. See the Programmer's Guide to the Oracle Precompilers for information about dynamic SQL.

PCC-02207: invalid macro name
Cause: The precompiler parser encountered a #DEFINE directive that had no macro name associated with it. For example,

#define

Action: Correct the syntax.


PCC-02208: no filename specified in #include statement
Cause: The precompiler parser encountered a #INCLUDE directive that had no filename associated with it. For example,

#include

Action: Specify appropriate filename with the #INCLUDE directive, or correct the syntax.

PCC-02209: macro invocation has incorrect number of arguments
Cause: A macro invocation in the source does not have the same number of arguments as the macro definition in the #DEFINE line.

Action: Correct the macro reference or the macro definition.

PCC-02210: C++ punctuation sequences are not permitted
Cause: C++ punctuation sequences are not supported by the Pro*C/C++ precompiler.

Action: Rewrite your C++ code without using punctuation sequences and precompile it again.

PCC-02301: cannot open input file for reading
Cause: The semantic analysis phase of the precompiler could not re-open the input file to generate output code.

Action: Check that the input file and its directory's protections and privileges do not change during precompilation.

PCC-02302: cannot open code generation output file name
Cause: The precompiler was not able to open one or both of the temporary files that are required for code generation. The user executing the precompiler must have write permission (and/or the appropriate privileges) on the current directory.

Action: Check that permission exists to create files in the directory where you precompile.


PCC-02303: cannot open include file
Cause: The precompiler was not able to open a header file specified using the #INCLUDE preprocessor directive or the EXEC SQL INCLUDE statement. This can happen if the file specification is inaccurate or if read permission or read-access rights on the file or on one or more of the directories in the path have not been granted.

Action: Recheck that the file specification is correct, that the file exists, and that read permission has been granted so that the file can be read.


PCC-02304: invalid declaration of C function
Cause: A C function using invalid syntax was declared.

Action: Consult a C programming manual and correct the declaration.

PCC-02305: illegal mixing of new and old style C function declarations
Cause: All C functions using either the traditional style (K&R style) function declarations or the new (ANSI) style must be declared; the two styles cannot be mixed.

Action: Adopt a consist declaration style for functions.

PCC-02306: illegal name of C function
Cause: A C function was declared with a name that is not a legal C identifier.

Action: Use legal C identifiers for all function names.

PCC-02307: void can only be used when single parameter
Cause: A function can be declared or defined using the following syntax:

int func1(void)

to indicate that the function has no parameters. void can be used only once in this case.

Action: Remove the extra voids in the function definition or declaration.


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值