PLS-S-00487, Invalid reference to variable while compiling PRO*C program

Hi,
I am writing a PRO*C code and get an error in compilation.
Code is as below:
+#include <stdio.h>+
+#include <string.h>+
EXEC SQL INCLUDE sqlca.h;
int main(int argc , char **argv)
+{+
int i;
EXEC SQL BEGIN DECLARE SECTION;
VARCHAR connString[100];
struct emp_record
+{+
char name[25];
char dept[10];
int id;
int salary;
int comm;
int tot_sal;
+}e1;+
EXEC SQL END DECLARE SECTION;
strcpy (connString.arr, "abcd/efgh@ijkl");
connString.len = strlen ( connString.arr);
+printf("\n Connection is [%d][%s]",connString.len,connString.arr);+
+EXEC SQL CONNECT :connString;+
+if(sqlca.sqlcode!=0)+
+{+
+printf("\nFailed to Connect, sqlcode is %d\n",sqlca.sqlcode);+
+printf("\nOracle Message = %s", sqlca.sqlerrm.sqlerrmc);+
+exit(-1);+
+}+
+else+
+{+
+printf("\nConnected\n");+
+}+
+EXEC SQL EXECUTE+
+BEGIN+
+emp_calc ( :e1.name,+
+:e1.id,+
+:e1.salary,+
+:e1.tot_sal+
+);+
+END;+
+END-EXEC;+
+if(sqlca.sqlcode!=0)+
+{+
+printf("Oracle Error:[%d][%s]",sqlca.sqlcode,sqlca.sqlerrm.sqlerrmc);+
+}+
+}+
Procedure code is:
+CREATE OR REPLACE PROCEDURE "EMP_CALC" (+
+pi_empname in emp.ename%type,+
+pi_empno in emp.empno%type,+
+pi_sal in emp.sal%type,+
+po_totsal out NUMBER)+
+is+
+begin+
+po_totsal := 1.1 * pi_sal;+
+dbms_output.put_line('Total Salary is:' || po_totsal);+
+end;+
*My main aim is to use elements of a structure in procedure call as parameters*
*But when I compile I get error on such usage as follows:*
Pro*C/C++: Release 11.2.0.3.0 - Production on Tue Apr 30 16:59:22 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
System default option values taken from: /mtsapp1/ora11g/product/11.2.0.3/dbhome_1/precomp/admin/pcscfg.cfg
Error at line 52, column 20 in file singleStructOra.pc
emp_calc ( :e1.name,
...................1
PLS-S-00487, Invalid reference to variable 'E1'
Error at line 52, column 1 in file singleStructOra.pc
emp_calc ( :e1.name,
1
PLS-S-00000, Statement ignored
Semantic error at line 50, column 1, file singleStructOra.pc:
BEGIN
1
PCC-S-02346, PL/SQL found semantic errors
*I would like to know how to resolve this compilation error and how do I use members of structures in such a procedure call.*
Thanks....

Sadly PL/SQL blocks do not understand structs (or arrays). DML statements do understand them.
This is not very clearly stated in the manual, but it does say:
http://docs.oracle.com/cd/E11882_01/appdev.112/e10825/pc_08arr.htm#autoId33
Restrictions on Arrays of Structs
The following restrictions apply to the use of arrays of structs in Pro*C/C++:
Arrays of structs (just as with ordinary structs) are not permitted inside an embedded PL/SQL block.
http://docs.oracle.com/cd/E11882_01/appdev.112/e10825/pc_07pls.htm#autoId13
Do not use C pointer or array syntax in PL/SQL blocks. The PL/SQL compiler does not understand C host-variable expressions and is, therefore, unable to parse them.
Although the example uses an array of structs, simple structs also fail. I have always had to copy the fields to and from simple variables when calling stored procedures.
regards,
David

Similar Messages

  • PLS-00487: Invalid reference to variable ' expression '

    oracle database 10G
    OS unix
    One of procedure is giving error PLS-00487: Invalid reference to variable '<expression>' while compilation in above database while it is compiling
    successfully in other database.
    Is there any database error?

    PLS-00487: Invalid reference to variable "string"
    Cause: A variable was referenced in a way that is inconsistent with its datatype. For example, a scalar variable might have been mistakenly referenced as a record, as follows: DECLARE CURSOR emp_cur IS SELECT empno, ename, sal FROM emp; emp_rec emp_cur%ROWTYPE; my_sal NUMBER(7,2); BEGIN ... total_sal := total_sal + my_sal.sal; -- invalid ...
    Action: Check the spelling of the variable name. Make sure the variable was declared properly and that the declaration and reference are consistent regarding datatype.
    Most probably the compiler "sees" some other type variable with the same name first which in the other database doesn't exist or is out of scope.
    Regards
    Etbin

  • PLS-00487: Invalid reference to variable 'RC_PARAMSGET'

    Oracle 9.2 client ORA 8.1.7 Server:
    Trying to run an SP in SQL navigator ( or PL/SQL)
    I get the following error(s)
    ORA-06550: line 6, column 16:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 6, column 3:
    ++++++++++++++++++++++++++++++++++++++++++++
    Here's the Package and Proc Code with the errors at the end.
    It seems not to like a Ref Cursor, but I'm not experienced enough to know the reason.
    ANy Help would be very appreciated: AJACODE
    ++++++++++++++++++++++++++++++++++++++++++++
    --Package Spec
    Package RPT_NB_GUI_Param_Get_PKG
    IS
    TYPE rc_Params_gettbl IS RECORD (
         o_QueryID          Number,
         o_ParameterID          Number,
         o_Param               VARCHAR2 (20),
         o_Param_Type          VARCHAR2 (50),
         o_Param_QueryID          Number
    TYPE rc_params IS REF CURSOR RETURN rc_Params_gettbl;
    END; -- Package Specification RPT_NB_GUI_Param_Get_PKG
    --+++++++++++++++++++++++++++++++++++++++++
    -- Proc
    Procedure RPT_NB_GUI_Param_Get_PROC
    p_QueryID in Number ,
    rc_ParamsGet IN OUT RPT_NB_GUI_Param_Get_PKG.rc_Params)
    IS
    -- Purpose: To generate Parameters for GUI
    -- MODIFICATION HISTORY
    -- Person           Date      Comments
    -- AJ Grasso           04/11/2003      Created
    BEGIN
    OPEN rc_ParamsGet For
    SELECT
    QP.QueryID
    ,P.ParameterID
    ,P.Parameter
    ,PT.Parameter_Type
    ,PQ.Parameter_QueryID
    FROM
    rpt_Query_Parameter QP, rpt_Parameter P, rpt_Parameter_Type PT, rpt_parameter_query PQ
    WHERE --inner join rpt_Parameter P ON
    (QP.ParameterID = P.ParameterID)
    AND --inner join rpt_Parameter_Type PT  ON
    (QP.Parameter_TypeID = PT.Parameter_TypeID)
    AND --left outer join rpt_parameter_query PQ  ON
    (QP.Parameter_queryID = PQ.parameter_queryID)
    AND (QP.QueryID = p_QueryID) ;
    END; -- RPT_NB_GUI_Param_Get_PROC
    -- ERRORS
    -- +++++++++++++++++
    ORA-06550: line 6, column 16:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 6, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 7, column 16:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 7, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 8, column 16:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 8, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 9, column 16:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 9, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 10, column 16:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 10, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 16, column 74:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 16, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 17, column 78:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 17, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 18, column 71:

    Oracle 9.2 client ORA 8.1.7 Server:
    Trying to run an SP in SQL navigator ( or PL/SQL)
    I get the following error(s)
    ORA-06550: line 6, column 16:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 6, column 3:
    ++++++++++++++++++++++++++++++++++++++++++++
    Here's the Package and Proc Code with the errors at the end.
    It seems not to like a Ref Cursor, but I'm not experienced enough to know the reason.
    ANy Help would be very appreciated: AJACODE
    ++++++++++++++++++++++++++++++++++++++++++++
    --Package Spec
    Package RPT_NB_GUI_Param_Get_PKG
    IS
    TYPE rc_Params_gettbl IS RECORD (
         o_QueryID          Number,
         o_ParameterID          Number,
         o_Param               VARCHAR2 (20),
         o_Param_Type          VARCHAR2 (50),
         o_Param_QueryID          Number
    TYPE rc_params IS REF CURSOR RETURN rc_Params_gettbl;
    END; -- Package Specification RPT_NB_GUI_Param_Get_PKG
    --+++++++++++++++++++++++++++++++++++++++++
    -- Proc
    Procedure RPT_NB_GUI_Param_Get_PROC
    p_QueryID in Number ,
    rc_ParamsGet IN OUT RPT_NB_GUI_Param_Get_PKG.rc_Params)
    IS
    -- Purpose: To generate Parameters for GUI
    -- MODIFICATION HISTORY
    -- Person           Date      Comments
    -- AJ Grasso           04/11/2003      Created
    BEGIN
    OPEN rc_ParamsGet For
    SELECT
    QP.QueryID
    ,P.ParameterID
    ,P.Parameter
    ,PT.Parameter_Type
    ,PQ.Parameter_QueryID
    FROM
    rpt_Query_Parameter QP, rpt_Parameter P, rpt_Parameter_Type PT, rpt_parameter_query PQ
    WHERE --inner join rpt_Parameter P ON
    (QP.ParameterID = P.ParameterID)
    AND --inner join rpt_Parameter_Type PT  ON
    (QP.Parameter_TypeID = PT.Parameter_TypeID)
    AND --left outer join rpt_parameter_query PQ  ON
    (QP.Parameter_queryID = PQ.parameter_queryID)
    AND (QP.QueryID = p_QueryID) ;
    END; -- RPT_NB_GUI_Param_Get_PROC
    -- ERRORS
    -- +++++++++++++++++
    ORA-06550: line 6, column 16:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 6, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 7, column 16:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 7, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 8, column 16:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 8, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 9, column 16:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 9, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 10, column 16:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 10, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 16, column 74:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 16, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 17, column 78:
    PLS-00487: Invalid reference to variable 'RC_PARAMSGET'
    ORA-06550: line 17, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 18, column 71:

  • Error while compiling Pro*C program

    Hi,
    I get the following error while compiling and linking Pro*C program.
    /home/barts/builddir $ make build_get_plc_data
    Making Object files for get_plc_data.c
    /usr/ccs/bin/cc -c +DD64  -I. -I../lib  -I/u01/dba/oracle/product/1012ias/precomp/public get_plc_data.c
    /usr/ccs/bin/cc -o get_plc_data get_plc_data.o -L/u01/dba/oracle/product/1012ias/lib -lclntsh +DD64
    ld: Unsatisfied symbol "sqlcx2t" in file get_plc_data.o
    ld: Unsatisfied symbol "main" in file <no file>
    2 errors.
    *** Error exit code 1 (ignored)
    /bin/rm -f get_plc_data.o
    Please suggest what could be causing this issue?
    Regrads,
    Dhivya

    I don't see a specific Proc or precompiler forum around here.
    Perhaps your best bet would be at [Call interface (OCI)|http://forums.oracle.com/forums/forum.jspa?forumID=67] forum or maybe [SQL and PL/SQL|http://forums.oracle.com/forums/forum.jspa?forumID=75] since it's more of a developers' forum.

  • Error:Invalid reference to variable 'PARTS1.PNUM%TYPE' - how to resolve

    error:
    ERROR at line 29:
    ORA-06550: line 29, column 39:
    PLS-00487: Invalid reference to variable 'PARTS1.PNUM%TYPE'
    ORA-06550: line 29, column 4:
    PL/SQL: SQL Statement ignored
    DECLARE
    cursor c1 is select pnum from parts1;
    TYPE NumTab IS TABLE OF parts1.pnum%TYPE INDEX BY PLS_INTEGER;
    TYPE NumTab1 IS TABLE OF parts1.pnum%TYPE INDEX BY PLS_INTEGER;
    --TYPE NameTab IS TABLE OF parts1.pname%TYPE INDEX BY PLS_INTEGER;
    pnums NumTab;
    pnums1 NumTab1;
    -- pnames NameTab;
    --iterations CONSTANT PLS_INTEGER := 500;
    t1 INTEGER;
    t2 INTEGER;
    t3 INTEGER;
    l_num_index integer := 0;
    BEGIN
    FOR j IN 1..50000 LOOP -- load index-by tables
    insert into parts1 values(j);
    END LOOP;
    commit;
    t1 := DBMS_UTILITY.get_time;
    /* FOR i IN 1..iterations LOOP -- use FOR loop
    INSERT INTO parts1 VALUES (pnums(i));
    END LOOP;
    select pnum bulk collect into pnums from parts1;
    t2 := DBMS_UTILITY.get_time;
    open c1;
    loop
    l_num_index := l_num_index + 1;
    fetch c1 into pnums1(l_num_index).pnum;
    EXIT WHEN c1%notfound;
    end loop;
    close c1;
    t3 := DBMS_UTILITY.get_time;
    DBMS_OUTPUT.PUT_LINE('Execution Time (secs)');
    DBMS_OUTPUT.PUT_LINE('---------------------');
    DBMS_OUTPUT.PUT_LINE('FOR loop: ' || TO_CHAR((t2 - t1)/100));
    DBMS_OUTPUT.PUT_LINE('FORALL: ' || TO_CHAR((t3 - t2)/100));
    COMMIT;
    END;
    thanks,
    vinodh

    The line number in the error message is nearly always a good clue.
    fetch c1 into pnums1(l_num_index).pnum;should be
    fetch c1 into pnums1(l_num_index);

  • Error while compiling Web Dynpro program due to missing JAR files

    Hi Experts,
    I am getting error message while compiling Web Dynpro program. The erring lines are as below:
              Message message = new MimeMessage(session);
              try {
                   message.setFrom(new InternetAddress(fromMailId));
                   message.addRecipient(
                        Message.RecipientType.TO,
                        new InternetAddress(toMailId));
                   message.setSubject(mailSubject);
                   message.setText(mailBody);
                   message.setHeader("X-Mailer", "E-Mail");
                   message.setSentDate(new Date());
                   Transport.send(message);
    The error messages are:
    Message.ReceipientType can not be resolved
    The method send(Message) is undefined for the type Transport
    The method setFrom(InternetAddress) is undefined for the type Message
    The method setHeader(String, String) is undefined for the type MessageThe method setSentDate(Date) is undefined for the type Message
    The method setSubject(String) is undefined for the type Message
    The method setText(String) is undefined for the type Message
    Type mismatch: cannot convert from MimeMessage to Message
    Can you please help me in resolving the issue. It seems that some API is missing. I believe if some one can tell me the name of JAR file / API then I will be able to sort out the issue. I will add these JAR file in my program.
    Thanks,
    S

    HI Stuart,
    you are missing the jar files required for sending mail in java
    Installing JavaMail
    You will need the latest version of JavaMail (Version 1.2) available here:
    http://java.sun.com/products/javamail/
    Download and unzip the file, in the newly created top level JavaMail directory you will find a number of jar files,
    these need adding to your classpath.
    To do this in Eclipse, right click on your project in the tree view, select properties, select the libraries tab.
    Now click the 'Add external jars' button, navigate to your JavaMail directory and click on the jars.
    The tutorial also makes use of the Java Activation Framework, which is available here:
    http://java.sun.com/products/javabeans/glasgow/jaf.html
    Instalation of JAF is identical to JavaMail
    activation.jar / mail.jar are 2 distinct names i remember rest you will get above
    P.S: close the question to assist other users narrow the search and find solutions
    Message was edited by:
            Armin Reichert

  • Java error while compiling Web Dynpro program

    Hi Experts,
    I am getting following error message while compiling Web Dynpro program. The erring lines are as below:
              Message message = new MimeMessage(session);
              try {
                   message.setFrom(new InternetAddress(fromMailId));
                   message.addRecipient(
                        Message.RecipientType.TO,
                        new InternetAddress(toMailId));
                   message.setSubject(mailSubject);
                   message.setText(mailBody);
                   message.setHeader("X-Mailer", "E-Mail");
                   message.setSentDate(new Date());
                   Transport.send(message);
    The error messages are:
    Message.ReceipientType can not be resolved
    The method send(Message) is undefined for the type Transport
    The method setFrom(InternetAddress) is undefined for the type Message
    The method setHeader(String, String) is undefined for the type MessageThe method setSentDate(Date) is undefined for the type Message
    The method setSubject(String) is undefined for the type Message
    The method setText(String) is undefined for the type Message
    Type mismatch: cannot convert from MimeMessage to Message
    Can you please help me in resolving the issue. It seems that some API is missing. I believe if some one can tell me the name of JAR file / API then I will be able to sort out the issue. I will add these JAR file in my program.
    Thanks,
    S

    Hi,
    Have you imported the required JavaMail jar?
    Please tell me what API you are using for the same.
    Also check Barcode Printing from EP --using barcode4J (Gurus kindly help me) forum to check how to add external jar files into WebDynpro project
    Let me know if you need more help on it.
    Regards,
    Ashutosh

  • XMLTRANSORM - LPX-00607: Invalid reference - xsl:variable

    Hi,
    I'm working on Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit.
    I have a problem using XMLTRANSFORM method with variable (ie. SenderDN).
    There is a table "ma_table" with three columns : "id", "data_xml" and "data_xsl".
    Here is the query used :
    SELECT XMLTRANSFORM (data_xml, data_xsl) FROM ma_table WHERE id = 64;Here is the data to transform :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <SOSTA xmlns="http://www.xxxxxx.com/yyyy/pipo">
         <infos>
              <generated>2009-08-19T16:23:56</generated>
              <reference_tech>ABCD123456789</reference_tech>
         </infos>
         <RECEDEP>AAAAAAAA</RECEDEP>
         <SENDERM>BBB</SENDERM>
         <REFSEND>5100161753</REFSEND>
         <QUALIFI>N</QUALIFI>
         <REFINTE>0010000934487</REFINTE>
         <TYPSTAT>IPRC</TYPSTAT>
         <STAREMT>REJT</STAREMT>
         <RAISON>DSEC</RAISON>
         <NARRA>blablabla</NARRA>
         <NARRA1>blablabla</NARRA1>
         <NARRA2/>
         <CENTRDT>20090819</CENTRDT>
         <STTLMDT>00000000</STTLMDT>
         <TYPSORA>SOU</TYPSORA>
         <INDMONT>O</INDMONT>
         <QUANTFI/>
         <SEAMMNT>10941,19</SEAMMNT>
         <CLIEDEV>EUR</CLIEDEV>
         <IFICODI>EEEEEEEEEE</IFICODI>
         <IFILIBE/>
         <IDCPTIT>123456789456132</IDCPTIT>
         <routage>
              <feuille name="tagada">
                   <Destinataire>dest</Destinataire>
                   <Priority>Normal</Priority>
                   <IsNotificationRequested>false</IsNotificationRequested>
                   <Service>dervice</Service>
              </feuille>
         </routage>
    </SOSTA>And here is the stylesheet :
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
         xmlns:yyyy="http://www.xxxxxx.com/yyyy/pipo">
         <xsl:output method="xml" encoding="UTF-8" indent="yes"/>
         <xsl:variable name="SenderDN">sender dn</xsl:variable>
         <xsl:variable name="SenderBIC8">bic height</xsl:variable>
         <xsl:template match="/*">
              <DataPDU xmlns="urn:swift:saa:xsd:saa.2.0">
                   <Header>
                        <Message>
                             <SenderReference>
                                  <xsl:value-of select="./yyyy:infos/yyyy:reference_tech"/>
                             </SenderReference>
                             <MessageIdentifier>
                                  <xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:MessageIdentifier"/>
                             </MessageIdentifier>
                             <Format>MX</Format>
                             <Sender>
                                  <DN>
                                       <xsl:value-of select="$SenderDN"/>
                                  </DN>
                                  <FullName>
                                       <X1>
                                            <xsl:value-of select="$SenderBIC8"/>
                                            <xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:SenderBranchCode"/>
                                       </X1>
                                  </FullName>
                             </Sender>
                             <Receiver>
                                  <DN>
                                       <xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:ReceiverDN"/>
                                  </DN>
                                  <FullName>
                                       <X1>
                                            <xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:ReceiverBIC11"/>
                                       </X1>
                                  </FullName>
                             </Receiver>
                             <InterfaceInfo>
                                  <UserReference>
                                       <xsl:value-of select="./yyyy:infos/yyyy:reference_tech"/>
                                  </UserReference>
                             </InterfaceInfo>
                             <NetworkInfo>
                                  <Service>
                                       <xsl:value-of select="./yyyy:routage/yyyy:feuille/yyyy:Service"/>
                                  </Service>
                             </NetworkInfo>
                        </Message>
                   </Header>
                   <Body>
                        <AppHdr>
                             <MsgRef>
                                  <xsl:value-of select="./yyyy:infos/yyyy:reference_tech"/>
                             </MsgRef>
                             <CrDate>
                                  <xsl:value-of select="./yyyy:infos/yyyy:generated"/>
                             </CrDate>
                        </AppHdr>
                        <Document> </Document>
                   </Body>
              </DataPDU>
         </xsl:template>
    </xsl:stylesheet>And I get this error message :
    ORA-31011: XML parsing failed
    ORA-19202: Erroroccured in XML processing
    LPX-00607: Invalid reference: 'SenderDN'Why this error?
    How to use this variable?
    Thanks,
    -Dominique

    Hi,
    I'va found the solution by modifying the <xsl:stylesheet> like this :
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
         xmlns:yyyy="http://www.xxxxxx.com/yyyy/pipo"
         xmlns="urn:swift:saa:xsd:saa.2.0">(adding xmlns="urn:swift:saa:xsd:saa.2.0")
    But I don't understand why it work fine now ???
    If anyone have an explanation?
    Thanks,
    -Dominique

  • Error while compiling pro*c code in oracle 11gR2 on AIX6.1 (64bit)..

    Hi ,
    We are migrating from oracle 10gR2 on AIX 5.3 to oracle 11gR2 on AIX 6.1 (64bit Kernal) . As pat of this , we need to migrate all the pro*c codes and for that we are trying to complie those files on the new server . But while compiling , we are getting error as :
    *1586-119 (U) The 32-bit file "/lib/crt0_64.o" is being linked in 64-bit mode, or vice versa.*
    We have only one library in $ORACLE_HOME which is lib..Lib32 is not present .
    Could you please help me in resolving this error ?
    The details , that I feel will be helpful ,is provided below :
    COMP_PROC ]>echo $ORACLE_HOME
    */data/oracle/product/11.2.0.2*
    */COMP_PROC ]>echo $LD_LIBRARY_PATH*
    */data/oracle/product/11.2.0.2/lib*
    COMP_PROC ]>echo $LIBPATH
    */data/oracle/product/11.2.0.2/lib*
    COMP_PROC ]>echo $PATH
    */data/oracle/product/11.2.0.2:/data/oracle/product/11.2.0.2/bin:/applications/tf3/bin:/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/bin:.::/dbjobs/utils/adsm:.:/applications/tf3/bin:/applications/tf3/bin/ctm/source:/usr/vac/bin:/applications/tf3/bin:/usr/lib:/tshome/tfapp:/tshome/tfapp/app/genio::/tshome/tfapp/app/genio/odbc:/tshome/tfapp/app/genio/odbc/lib:/data/oracle/product/11.2.0.2/lib:/data/oracle/product/11.2.0.2/bin:/tshome/tf01/:/usr/bin:/etc:/usr/sbin:/usr/ucb:/tshome/tfapp/bin:/usr/bin/X11:/sbin*
    Compiler version :
    COMP_PROC ]>cc -v
    exec: /usr/bin/pg(/usr/bin/pg,/usr/vac/exe/default_msg/vac.help,NULL)
    C for AIX Compiler, Version 6
    os version :
    COMP_PROC ]>uname -a
    AIX 1 6 00F6249E4C00
    Make file :
    # File : makeheader.h #
    # Description : #
    # The target 'build' puts together an executable $(EXE) from the .o files
    # in $(OBJS) and the libraries in $(PROLDLIBS). It is used to build the
    # c sample programs. The rules to make .o files from .c and .pc files are
    # later in this file.
    # ($(PROLDLIBS) includes the client shared library, and $(STATICPROLDLIBS) does
    # not.)
    # Here are some rules for converting .pc -> .c -> .o and for .typ -> .h.
    # If proc needs to find .h files, it should find the same .h files that the
    # c compiler finds. We use a macro named INCLUDE to hadle that. The general
    # format of the INCLUDE macro is
    # INCLUDE= $(I_SYM)dir1 $(I_SYM)dir2 ...
    # Normally, I_SYM=-I, for the c compiler. However, we have a special target,
    # pc1, which calls $(PROC) with various arguments, include $(INCLUDE). It
    # is used like this:
    # $(MAKE) -f $(MAKEFILE) <more args to make> I_SYM=include= pc1
    # This is used for some of $(SAMPLES) and for $(OBJECT_SAMPLE).
    USERID=xxxxx/yyyyy@zzzzzzz
    SHELL=/bin/ksh
    MQMLIBS=/usr/lpp/mqm/lib/libmqm.a
    MQMCLIENTLIBS=/usr/lpp/mqm/lib/libmqic.a
    #MQMLIBS=/pvcs/compile/proc/libmqm.a
    CONVLIBS=/usr/lib/libiconv.a
    NETWORKHOME=$(ORACLE_HOME)/network/
    PLSQLHOME=$(ORACLE_HOME)/plsql/
    #INCLUDE=$(I_SYM). $(I_SYM)$(PRECOMPHOME)public $(I_SYM)$(RDBMSHOME)public $(I_SYM)$(RDBMSHOME)demo $(I_SYM)$(PLSQLHOME)public $(I_SYM)$(NETWORKHOME)public
    I_SYM=-I
    AS_EXT=s
    LIB_EXT=a
    OBJ_EXT=o
    PLB_EXT=plb
    SO_EXT=so
    LOCK_EXT=lk
    SQL_EXT=sql
    SYM_EXT=sym
    LIB_PREFIX=lib
    LDLIBFLAG=-l
    LDPATHFLAG=-L
    AS=as
    AWK=awk
    CAT=cat
    CC=/usr/vac/bin/cc
    CD=cd
    CHMOD=chmod
    CP=cp
    CPP=cpp
    DATE=date
    ECHO=echo
    ECHON=echo -n
    EXEC=exec
    FIND=find
    FOLLOW=-follow
    NOLEAF=-noleaf
    GREP=grep
    KILL=kill
    SLEEP=sleep
    LD=ld
    LMAKE=make
    LN=ln
    LNS=ln -s
    MKDIR=mkdir
    MKDIRP=mkdir -p
    MV=mv
    NM=nm
    PERL=perl
    RM=rm
    RMF=rm -f
    RMRF=rm -rf
    SED=sed
    SORT=sort
    TOUCH=touch
    XARGS=xargs
    LS=ls
    SPFLAGS=
    MATHLIB=-lm
    LOCALLIBS=
    OPTIMIZE=-O5
    OTHERLIBS = `cat $(ORACLE_HOME)/lib/sysliblist`
    CCFLAGS= -g
    SO=a
    LLIBTHREAD=-lpthreads
    EXOSLIBS=
    LIBBSD=
    SECLIBS=
    M6LIBS=
    LIBHOME=$(ORACLE_HOME)/lib
    VER =11
    BASENAME =n
    NETWORKHOME = $(ORACLE_HOME)/network/
    NETWORKLIB = $(NETWORKHOME)lib/
    RONAME=${BASENAME}ro${VER}
    PFLAGS=
    PFLAGS= $(INCLUDE) $(SPFLAGS) $(LPFLAGS)
    RDBMS_VERSION = 11
    LIBSERVERNAME=server$(RDBMS_VERSION)
    LIBSERVER=$(LIBHOME)$(LIB_PREFIX)$(LIBSERVERNAME).$(LIB_EXT)
    LLIBSERVER=$(LDLIBFLAG)$(LIBSERVERNAME)$(LIB_SUFFIX)
    LIBCLIENTNAME=client$(RDBMS_VERSION)
    LIBCLIENT=$(LIBHOME)$(LIB_PREFIX)$(LIBCLIENTNAME).$(LIB_EXT)
    LLIBCLIENT=$(LDLIBFLAG)$(LIBCLIENTNAME)
    LIBGENERICNAME=generic$(RDBMS_VERSION)
    LIBGENERIC=$(LIBHOME)$(LIB_PREFIX)$(LIBGENERICNAME).$(LIB_EXT)
    LLIBGENERIC=$(LDLIBFLAG)$(LIBGENERICNAME)
    LIBDSBTSHNAME=dsbtsh$(RDBMS_VERSION)
    LIBDSBTSH=$(RDBMSLIB)$(LIB_PREFIX)$(LIBDSBTSHNAME).$(SO_EXT)
    LIBSKGXPNAME=skgxp$(RDBMS_VERSION)
    LIBSKGXP=$(LIBHOME)$(LIB_PREFIX)$(LIBSKGXPNAME).$(SKGXP_EXT)
    LLIBSKGXP=$(LDLIBFLAG)$(LIBSKGXPNAME)
    LIBCOMMONNAME=common$(RDBMS_VERSION)
    LIBCOMMON=$(LIBHOME)$(LIB_PREFIX)$(LIBCOMMONNAME).$(LIB_EXT)
    LLIBCOMMON=$(LDLIBFLAG)$(LIBCOMMONNAME)
    LIBVSNNAME=vsn$(RDBMS_VERSION)
    LIBVSN=$(LIBHOME)$(LIB_PREFIX)$(LIBVSNNAME).$(LIB_EXT)
    LLIBVSN=$(LDLIBFLAG)$(LIBVSNNAME)
    LIBAGENTNAME=agent$(RDBMS_VERSION)
    LIBAGENT=$(LIBHOME)$(LIB_PREFIX)$(LIBAGENTNAME).$(LIB_EXT)
    LLIBAGENT=$(LDLIBFLAG)$(LIBAGENTNAME)
    LIBDBTOOLSNAME=dbtools$(RDBMS_VERSION)
    LIBDBTOOLS=$(RDBMSLIB)$(LIB_PREFIX)$(LIBDBTOOLSNAME).$(LIB_EXT)
    #DEF_ON= $(RDBMSLIB)kpudfo.$(OBJ_EXT)
    #DEF_OFF= $(RDBMSLIB)kpundf.$(OBJ_EXT)
    #DEF_OPT= $(RDBMSLIB)defopt.$(OBJ_EXT)
    LIBSLAXNAME=slax8
    LIBSLAX=$(LIBHOME)$(LIB_PREFIX)$(LIBSLAXNAME).$(LIB_EXT)
    LLIBSLAX=$(LDLIBFLAG)$(LIBSLAXNAME)
    LIBSQLNAME=sql11
    LIBSQL=$(LIBHOME)/$(LIB_PREFIX)$(LIBSQLNAME).$(LIB_EXT)
    LLIBSQL=$(LDLIBFLAG)$(LIBSQLNAME)
    #SCOREPT = $(LIBHOME)/scorept.$(OBJ_EXT)
    #SSCOREED = $(LIBHOME)/sscoreed.$(OBJ_EXT)
    LIBORA=$(LIBCLIENT) $(LIBCOMMON) $(LIBGENERIC)
    LLIBORA=$(LLIBCLIENT) $(LLIBCOMMON) $(LLIBGENERIC)
    LIBSQLNET = $(LDFLAGSLIST) $(ANOLIBD) $(PROTOCOLLIBD) $(NATIVELIBD) $(NATIVESYSLIBD) $(LIBNETWORK) $(LIBNL)
    LLIBSQLNET = $(LDFLAGSLIST) $(ANOLIBS) $(PROTOCOLLIBS) $(NATIVELIBS) $(NATIVESYSLIBS) $(LLIBNETWORK) $(LLIBNL)
    LIBRPC = $(LIBHOME)$(LIB_PREFIX)$(RONAME).$(LIB_EXT)
    LLIBRPC = $(LDLIBFLAG)$(RONAME)
    NETLIBS = $(LLIBSQLNET) $(LLIBRPC) $(LLIBSQLNET)
    NETLIBD = $(LIBSQLNET) $(LIBRPC)
    LDFLAGSFILE=$(NETWORKLIB)ldflags
    LDFLAGSLIST=`$(CAT) $(LDFLAGSFILE)`
    LDFLAGSLIST=
    LIBNLSRTLNAME = nls11
    LIBNLSRTL= $(LIBHOME)$(LIB_PREFIX)$(LIBNLSRTLNAME).$(LIB_EXT)
    LLIBNLSRTL= $(LDLIBFLAG)$(LIBNLSRTLNAME)$(LIB_SUFFIX)
    CORE_LIB_VER = 11
    CORE_LIB_NAME = core
    LIBCORE = $(LIBHOME)$(LIB_PREFIX)$(CORE_LIB_NAME)$(CORE_LIB_VER).$(LIB_EXT)
    LLIBCORE = $(LDLIBFLAG)$(CORE_LIB_NAME)$(CORE_LIB_VER)
    RDBMSHOME=$(ORACLE_HOME)/rdbms/
    RDBMSLIB=$(RDBMSHOME)lib/
    RDBMSADMIN=$(RDBMSHOME)admin/
    LIBCLNTSHNAME=clntsh
    LIBCLNTSH=$(LIBHOME)$(LIB_PREFIX)$(LIBCLNTSHNAME).$(SO_EXT)
    LLIBCLNTSH=$(LDLIBFLAG)$(LIBCLNTSHNAME)
    LIBAGTSHNAME=agtsh
    LIBAGTSH=$(LIBHOME)$(LIB_PREFIX)$(LIBAGTSHNAME).$(SO_EXT)
    LLIBAGTSH=$(LDLIBFLAG)$(LIBAGTSHNAME)
    LIBKNLOPTNAME=knlopt
    LIBKNLOPT=$(RDBMSLIB)$(LIB_PREFIX)$(LIBKNLOPTNAME).$(LIB_EXT)
    LLIBKNLOPT=$(LDLIBFLAG)$(LIBKNLOPTNAME)
    #LIBTRACENAME=trace9
    #LIBTRACE=$(LIBHOME)$(LIB_PREFIX)$(LIBTRACENAME).$(LIB_EXT)
    #LLIBTRACE=$(LDLIBFLAG)$(LIBTRACENAME)$(LIB_SUFFIX)
    #LIBEPC=$(LIBHOME)$(LIB_PREFIX)$(LIBTRACENAME).$(LIB_EXT)
    #LLIBEPC=$(LDLIBFLAG)$(LIBTRACENAME)$(LIB_SUFFIX)
    CORELIBS = $(LLIBNLSRTL) $(LLIBCV6) $(LLIBCORE) $(LLIBNLSRTL) $(LLIBCORE) \
    $(LLIBNLSRTL)
    OTHERLIBS=`cat $(ORACLE_HOME)/lib/sysliblist`
    DEVTTLIBS=$(NETLIBS) $(LLIBORA) $(NETLIBS) $(LLIBORA) $(LIBPLSHACK) \
    $(LLIBEPC) $(CORELIBS) $(SPLIBS) $(LOCALLIBS) $(EXOSLIBS) $(LIBBSD) `cat $(ORACLE_HOME)/lib/sysliblist` $(MATHLIB)
    CC=/usr/vac/bin/cc
    PCC=proc
    PROC=proc CODE=ANSI_C define=_64BIT_ define=_IBM_C define=_LONG_LONG sqlcheck=full userid=$(USERID) oraca=yes mode=oracle unsafe_null=yes dbms=v8
    PCCINCLUDE=include=$(ORACLE_HOME)/precomp/lib
    PCCFLAGS=$(PCCINCLUDE) sqlcheck=full ltype=none parse=full userid=$(USERID) lines=yes unsafe_null=yes dbms=v8
    CFLAGS= $(GFLAG) -qmaxmem=8192 $(OPTIMIZE) $(CDEBUG) $(CCFLAGS) $(QACCFLAGS) $(PFLAGS) $(SHARED_CFLAG) $(ENV_FLAGS) -L$(LIBHOME)
    ECHO=
    STATICPROLDLIBS=$(LLIBCLIENT) $(LIBSQL) $(SCOREPT) $(SSCOREED) $(DEF_ON) $(DEVTTLIBS) $(LLIBTHREAD)
    PROLDLIBS=$(LLIBCLNTSH) $(STATICPROLDLIBS)
    Tail of make.log :
    [applications/tf3/bin/COMP_PROC ]>echo $ORACLE_HOME
    /data/oracle/product/11.2.0.2
    [applications/tf3/bin/COMP_PROC ]>cd $ORACLE_HOME
    [data/oracle/product/11.2.0.2 ]>cd install
    [data/oracle/product/11.2.0.2/install ]>tail -15 make.log
    mv: cannot rename /data/oracle/product/11.2.0.2/bin/nmo to /data/oracle/product/11.2.0.2/bin/nmo0:
    No such file or directory
    mv /data/oracle/product/11.2.0.2/sysman/lib/nmo /data/oracle/product/11.2.0.2/bin/
    make: The error code from the last command is 1.
    make: Ignored error code 1 from last command.
    /bin/make -f /data/oracle/product/11.2.0.2/sysman/lib/ins_emagent.mk relink_exe EXENAME=nmhs
    ld -b64 -o /data/oracle/product/11.2.0.2/sysman/lib/nmhs -L/data/oracle/product/11.2.0.2/lib/ -L/data/oracle/product/11.2.0.2/sysman/lib/ -lld -lm `cat /data/oracle/product/11.2.0.2/lib/sysliblist` -lm /data/oracle/product/11.2.0.2/sysman/lib/s0nmhs.o -lnmhs -lcore11 -lld -lm `cat /data/oracle/product/11.2.0.2/lib/sysliblist` -lm
    rm -f /data/oracle/product/11.2.0.2/bin/nmhs.0
    cp /data/oracle/product/11.2.0.2/sysman/lib/nmhs /data/oracle/product/11.2.0.2/bin/nmhs.0
    mv -f /data/oracle/product/11.2.0.2/bin/nmhs /data/oracle/product/11.2.0.2/bin/nmhs0
    mv: cannot rename /data/oracle/product/11.2.0.2/bin/nmhs to /data/oracle/product/11.2.0.2/bin/nmhs0:
    No such file or directory
    make: The error code from the last command is 1.
    make: Ignored error code 1 from last command.
    mv /data/oracle/product/11.2.0.2/sysman/lib/nmhs /data/oracle/product/11.2.0.2/bin/
    Edited by: Minu on Dec 3, 2011 12:36 AM

    Apparently you are trying to mix 32-bit code and 64-bit code. You must ensure that the 32-bit or 64-bit option is used consistently on every command, compiling and linking. The form of the option can depend on the version of the C compiler you are using, and whether you are on an x86 or sparc system. Consult the Pro*C and C compiler documentation.

  • Error While compiling Pro*C in sun solaris

    hi,
    i am using solaris 5.8 , Pro*C - 1.6 and Oracle-7.3 versions.i am not able to compile a proc program in these combination of versions.
    pls give the details regarding the compilation scripts and the configurations to be done prior to the compilation.
    rgds
    Dileep.S

    Pro*C is Oracle's Precompiler Product.
    You probably should ask the vendor.
    Rose

  • /usr/ccs/bin/ld: Unsatisfied symbols: while compiling PRO*C

    I have a PROC*C program that I am trying to compile and I get this error:
    /usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (daemon.o) was detected. The linked output may not run on a PA 1.x system.
    /usr/ccs/bin/ld: Unsatisfied symbols:
    line (data)
    print_header (code)
    bmargin (data)
    pagesize (data)
    lmargin (data)
    *** Error exit code 1
    Stop.
    The program exits with 1, but it also generates the executable which works fine.
    Am I missing something ? How can I get it to compile with any errors.
    Thanks,
    GP

    I don't see a specific Proc or precompiler forum around here.
    Perhaps your best bet would be at [Call interface (OCI)|http://forums.oracle.com/forums/forum.jspa?forumID=67] forum or maybe [SQL and PL/SQL|http://forums.oracle.com/forums/forum.jspa?forumID=75] since it's more of a developers' forum.

  • Error while compile .Java to .class

    I am new in java card. I have some problem when compile java card applet.
    1. I installed j2sdk1.4.2_07 and java_card_kit- 2_2_2 to build a sample java card. I set the environment as:
    @echo off
    set JC_HOME=C:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2
    set JAVA_HOME=c:\j2sdk1.4.2_07
    set PATH=.;%JC_HOME%\bin;%JAVA_HOME%\bin;%PATH%
    I created a java applet and saved in C\STCard, and I use windows command to compile, the command is:
    c:\java_card_kit-2_2_2-windows\java_card_kit-2_2_2\samples>javac -g -classpath c:\STCard;..\lib\api.jar;..lib\installer.jar c:\STCard\*.java
    but the error is: "cannot access javacard.framework.APDU"
    What am I wrong?
    2. I use eclipse 3.3.2, eclipse jcde 0.1, java_card_kit-2_2_2, jdk1.6.0 to compile java card applet. The compilation from .java to .class was no problem, but from the .class to .cap has problem:
    java com.sun.javacard.converter.Converter -config .\converter2.opt
    error: stcard.STCard: unsupported class file format of version 50.0.
    What should I do to convert from .class to .cap?
    Thx all

    I have a typically problem , I am a student and learning core java am just a beggineer in java,i have sucessfully installed my JavaEE1.5 software on my computer but have got a problem while compiling my Java programs ,while passing the commands in my command prompt i am encounteering a problem ,am geeting an error message in my command prompt" 'javac' is not recoginized as an internal or external command ,operable program or batch file".i had also tried my own software cd of JavaEE1.5 version and installed at others computers it is running sucessfully but can i know Why it is not geeting in to my Pc & giving compilation error while compiling my java programs. so kindly sujjest me my remedy of my problem.

  • Invalid Switch Executive References (once in while)

    Hi there,
    a colleague of mine is using a self-written little LV-sequencer to do UUT testing. At the beginnig of his "test sequence" he opens the corresponding SE-Session and does not close it before having performed the last test on the last UUT. He takes the reference form the Open Session-VI and puts it in a global variable. When switching, he accesses this global in order to get back the reference and put it to the Open / Close Routes-VIs. Every once in a while, the SE-VIs return an error: the reference is not valid.
    So we tried to do a workaraound: after read access, the refernece is checked using the LabVIEW "Not a refnum"-VI. If the ref should be void, we wanted to re-open the SE session. To keep it short.... nice idea, but we failed.....
    In order to getting the SE to work again, we even have to shutdown LabVIEW!
    I remember seeing a phenomenon (invalid references) like that with TestStand 3.1 and SE2.0. But only on very rare occasions, so I decided to ignore that
    We're using WinXP, LV 7.1.1, SE2.1.
    Any ideas?
    Cheers
    Oli
    Programming languages don't create bad code, programmers create bad code....

    Hi Brian,
    up to now, your tip seems to have fixed the porblem, thank you very much! The first overnight-test looks promising.
    Do you have an idea, why LabVIEW wants to unload the global from time to time? I'm a bit confused that this only happens only every once in a while....
    Cheers
    Oli
    Programming languages don't create bad code, programmers create bad code....

  • APP-FND-00798 invalid reference

    hi all
    while ctreating sales order i am getting this error
    APP-FND-00798 invalid reference
    AR_SRS_LOC_STRUCT_ID_BYSYSPAR in value set attached to segment gk.
    please check the where clause of your table validetedvalue sets.
    does anybody has an idea of this ...
    pls help ,
    naveen

    I research and can't find an exact match on the metalink for the issue you are experiencing regarding AR_SRS_LOC_STRUCT_ID_BYSYSPAR with APP-FND-00798. I think you need to log a TAR for this issue.

  • Issue with variable while in a PSSession connected to an end point

    Ok so Ive put together a simple script that will allow our helpdesk to look at permissions on a specified folder or share adn display in a nice html page.  I need it to run under different credentials so I set up an endpoint which I can connect to remotely
    and run the script.  The issue is in the variable that needs to get set.  It prompts for the folder location and once you put it in, it just freezes up.  If I run the script locally its fine and works perfectly.  but running it in the remote
    session connected to an end point, it just doesnt do anything once you put in the information after it prompts you.  For testing also I set the $folderpath to a specific path  and it does run fine through a remote session so its just an issue passing
    that input back to the variable while in the remote session.  Any idea?
    $a = "<style>"
    $a = $a + "BODY{background-color:peachpuff;}"
    $a = $a + "TABLE{border-width: 0px;border-style: solid;border-color: black;border-collapse: collapse;}"
    $a = $a + "TD{border-width: 3px;padding: 5px;border-style: solid;border-color: black;background-color:PaleGoldenrod}"
    $a = $a + "</style>"
    $folderpath = Read-Host -Prompt "Enter full folder path here"
    $cname ="Permissions for $folderpath : "
    Get-Acl $folderpath | select access -ExpandProperty access| select identityReference | ConvertTo-HTML -head $a -body "<H2>$CNAME</H2>"  | Out-File \\server\PermReports\perms.html

    Here's some napkin code, FWIW
    On the user side:
    $Session = New-PSSession -ComputerName remoteservername -ConfigurationName checkperms
    $ADIdentityReference =
    #Coax an AD identity reference out of the button monkey
    Invoke-Command -ScriptBlock { .\PermissionsScript.ps1 } -Session $session -Argumentlist $ADIdentityReference |
    ForEach-Object {
    #Ask for more input, or quit
    Remove-PSSession $Session
    and on the remote end:
    Param ($IdentityReference)
    Try {
    Get-ADSomething -Identity $IdentityReference -EA Stop |
    foreach-object {
    Do-SomeStuff
    Catch {
    #Return validation fail message
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

Maybe you are looking for