- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Pro*C error
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2004 06:48 PM
тАО09-12-2004 06:48 PM
Pro*C error
I do not know whether this is the right place for this if no then please bear with me.
I am trying to compile a Pro*C program on hpux which was compiled and was running on tru64. When I compile it on hpux I get the following error:
========================
Precompiling liborah24.pc
/opt/oracle/OraHome1/bin/proc sqlcheck=full userid=scott/tiger@ian mode=ansi `echo -DTRUE=1 -DFALSE=0 | sed "s/-D/define=/g"` `echo -DPOSIX_4D9 -D_OSF_SOURCE -D_XOPEN_SOURCE=500 | sed "s/-D/define=/g"` include=../libgen include=/opt/oracle/OraHome1/precomp/public include=. liborah24.pc
Pro*C/C++: Release 9.2.0.4.0 - Production on Mon Sep 13 10:22:16 2004
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
System default option values taken from: /opt/oracle/OraHome1/precomp/admin/pcscfg.cfg
Error at line 678, column 5 in file liborah24.pc
EXEC SQL
....1
PLS-S-00306, wrong number or types of arguments in call to '>='
Error at line 678, column 5 in file liborah24.pc
EXEC SQL
=================================
Thanks,
Manish.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2004 07:20 PM
тАО09-12-2004 07:20 PM
Re: Pro*C error
do you have a PL/SQL function that returns a boolean or a procedure which has as an OUT or IN OUT boolean parameter?
you may be facing bug 185212.
please let us know.
regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2004 08:25 PM
тАО09-12-2004 08:25 PM
Re: Pro*C error
It is not a PL/SQL returning a boolean. The parameters passed are int and a struct.
Does this problem occur if any element of the struct is a boolean?
manish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-12-2004 08:31 PM
тАО09-12-2004 08:31 PM
Re: Pro*C error
http://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=95532.1
Yes, you must not have any boolean as a function parameter: you can transform the boolean parameter into an integer for exemple...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2004 01:48 AM
тАО09-13-2004 01:48 AM
Re: Pro*C error
more details about the error and solution provided by metalink:
Solution Description
--------------------
BOOLEAN-type variables cannot be passed directly from/to PL/SQL from/to any of the Oracle Programmatic Interfaces, including Pro*C programs.
The BOOLEAN type is unique to pl/sql and since there is no corresponding
database internal type, the conversion routines do not exist.
Solution
--------
Suggestion A:
Modify the PL/SQL routine to pass an INTEGER parameter rather than a BOOLEAN.
Suggestion B:
Use an anonymous block to wrap the call to the procedure which converts the parameters from boolean to integer or number.
e.g.
consider the stored procedure
PROC_WITH_BOOL(P1 IN OUT NUMBER,P2 IN OUT BOOLEAN)
call this from Pro*C in the following way:
int io_param;
int io_bool;
..
/* Intervening code omitted */
..
EXEC SQL EXECUTE
declare
d_param BOOLEAN := TRUE;
begin
if :io_bool = 0 then
d_param = FALSE;
end if;
proc_with_bool(:io_param,d_param);
if d_param = FALSE then
:io_bool := 0;
else
:io_bool := 1;
end if;
end;
END-EXEC;
However since this code works on your tru64, this should most probably be a configuration problem.
Can you try to do a simple pro*c and compile it to see it your pro*c is OK?
regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2004 01:52 AM
тАО09-13-2004 01:52 AM
Re: Pro*C error
a simple make file that you may wish to consider:
==========================================
$(TARGET): $(SOURCE) $(SOURCE:.pc=.c) $(SOURCE:.pc=.o)
$(CC) $(LDFLAGS) -t -o $(TARGET) \
$(SOURCE:.pc=.o) -L$(ORACLE_HOME)/lib $(PROLDLIBS)
include $(ORACLE_PROC_MAKEFILE)
PROCFLAGS= ireclen=255 lines=yes $(PROC_ENV_FLAGS) \
include=$(ORACLE_HOME)/proc/lib
PROFLAGS=$(PROCFLAGS)
CFLAGS=-I. -g $(CC_ENV_FLAGS)
==========================================
regards
Yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-13-2004 05:53 PM
тАО09-13-2004 05:53 PM
Re: Pro*C error
My other ProC programs compile. This is the only one where I am facing the problem.
Thanks for the information and help. The problem still exists.
manish