Problem in compiling pro * c program

Hi
Greetings ,
I am new to proc, i wrote a small sample program while compiling this program in vc++ 6.0 i am getting the following error
c:\proheaderfiles\database.c(24) : error C2061: syntax error : identifier 'SQL'
c:\proheaderfiles\database.c(24) : error C2059: syntax error : ';'
c:\proheaderfiles\database.c(24) : error C2054: expected '(' to follow 'TYPE'
can anyone help me in this regard
Thanks in advance

First compile the proc programe through
windows version proc ,generate the *.cpp file;
Second : add the *.cpp file to visual c++ project
Then compile with visual c++;

Similar Messages

  • 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.

  • Problem in compiling and running programs in Java3D

    Dear Friends,
    I'm newly installed Java 3D in my c:\ alreadey I'm havind jdk1.3 but java 3D created a new folder namely jdk1.2.2 in c:\. Now I am trying to compile my first program through javac but it couldn't find the libraries. In documentation this is given that don't set any path for java 3d. I've tried to run the demo programs through appletviewer but it couldn't. It is some what happening while I'm clicking the links to run. but it is very sluggish in ie5.
    Pl. give me the needed solution, eigther here or at : [email protected]
    Thanks,
    K.Ranganathan.

    follow the installtion guide for java3d on this site (java.sun.com)
    To summarise it.... Java3D 1.2 is designed for Java1.2.2, however if, when installing it, u install it to the Java1.3 dir it should work fine...... mine does ;-P
    AbU5e,

  • Problem compiling Pro*C programs

    Hello Pro*C experts,
    I am checking my Pro*C on my server where we just installed
    9iAS. The following error message when i try to compile one of
    the demos:
    ============================================================
    L1000: d05/9iAS/6iserver/precomp/demo/proc>make -f demo_proc.mk
    sample9
    /usr/ccs/bin/make -
    f /d05/9iAS/6iserver/precomp/demo/proc/demo_proc.mk
    OBJS=sample9.o EXE=sample9 build
    /usr/ccs/bin/make -
    f /d05/9iAS/6iserver/precomp/demo/proc/demo_proc.mk
    USER=scott/tiger SCRIPT=calldemo sqlplus_
    # You must run the .sql script, calldemo,
    # before precomping this sample.
    proc sqlcheck=full userid=scott/tiger iname=sample9
    Pro*C/C++: Release 8.0.6.3.0 - Production on Tue Nov 27 14:19:34
    2001
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    System default option values taken
    from: /d05/9iAS/6iserver/precomp/admin/pcscfg.cfg
    INTERNAL ERROR: Failed assertion [PGE Code=90105]
    sh: 21550 Bus error
    *** Error exit code 138
    Stop.
    *** Error exit code 1
    Stop.
    ============================================================
    any idea?
    regards
    Yogeeraj

    it's ok now.
    The problem was with the environment of the user who was trying
    to compile the programs. Oracle environments were not well set.
    Sqlplus itself was not working!!
    thanks for your time
    kind regards
    yogeeraj

  • Problem with compiling STL using program with Forte C++ 6 update 1 in compat mode

    I try to compile SGI STL using program with Forte C++ 6 update 1 and I get an errror
    ld -L/opt/SUNWspro/WS6U1/lib -liostream test.o -o test
    Undefined first referenced
    symbol in file
    __0oNIostream_initctv test.o
    __0oNIostream_initdtv test.o
    Iostream_init - declared as a static class CC4/iostream.h, but nm libiostream.a produce
    __1cNIostream_init2T6M_v_
    __1cNIostream_init2t6M_v_
    and program can't link.
    What's wrong?
    Thank you for any comments

    Hi!
    I experienced the same problem and the solution looks like the following: in sunpro6.mak file there is a variable STL_INCL that has the following value: -I. -I${PWD}/../stlport
    Change that to -I. -I${PWD}/../stlport/SC5 and the problem vanishes. The reason is that stlport/SC5 contains files *.SUNWCCh which are used by SUNpro C++ compiler as standard headers and contain correct STLPort namespace information.
    Regars,
    Art

  • Problems with compiling the BlackJackServer program

    hello.
    this is james mcfadden. I have developed a multiplayer BlackJack card game in Java. the game consists of six programs: BlackJack.java, BlackJackServer.java, BlackJackClient.java, Card.java, Deck.java, and Hand.java. i got most of the game code from http://www.netsoc.tcd.ie/~duncan/dev/java/games/blackjack/. When i compile the server i get the following errors (i've also included the source code in this message):
    ----jGRASP exec: javac -g X:\NETPROG\Assignment2\BlackJackServer.java
    BlackJackServer.java:56: cannot find symbol
    symbol : method getSource()
    location: class BlackJack
    bj.getSource();
    ^
    BlackJack.java:176: cannot find symbol
    symbol : method getCodeBase()
    location: class BlackJack
    card_images[current_card_loading]=getImage(getCodeBase(),"cards/"+(current_card_loading+1)+".gif");
    ^
    BlackJack.java:197: cannot find symbol
    symbol : constructor Deck(BlackJack,java.awt.Image[])
    location: class Deck
    deck=new Deck(this,card_images);//Create a new deck object
    ^
    3 errors
    ----jGRASP wedge2: exit code for process is 1.
    ----jGRASP: operation complete.
    how do i go about fixing these errors?
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class BlackJack extends JFrame implements ActionListener,Runnable{
       private Deck deck;//The deck
         private Hand player_hand;//player hand
         private Hand dealer_hand;//dealer hand
         private JButton bHit=new JButton("Hit");
         private JButton bStay=new JButton("Stay");
         private JButton bRestart=new JButton("New Game");
         //lets do some double buffering
         Image offIm=null;
         Graphics offGraphics=null;
         Dimension offDimension=null;
         Image[] card_images=new Image[52];
         private boolean cards_loaded=false;
         private int current_card_loading=0;
         String message;//print a message
         int width;//The width of the applet
         int height;//The height of the applet
         int card_width=-1;
         int card_padding=-1;//How much should we pad the cards by?
         private int games=-1;//How many games have been played?
       public BlackJack(){
              Thread card_loader=new Thread(this);
          card_loader.start();
       public static void main(String[] args){
          JFrame frame=new JFrame("BlackJack");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setSize(500,500);
          frame.setLocation(200,200);
          BlackJack bj=new BlackJack();
          frame.setContentPane(bj);
          frame.setVisible(true);
         public void newGame(){
              bHit.setEnabled(true);
              bStay.setEnabled(false);
              player_hand=new Hand();//Create new hands
              dealer_hand=new Hand();
              //shuffle the deck.
              deck.shuffleCards();
              games++;
         public void hit(){
              bStay.setEnabled(true);
              player_hand.addCard(deck.dealCard());
              if(player_hand.getValue()>21){
                   message="You loose! (score:"+player_hand.getValue()+")";
                   //disable the hit and stay buttons...
                   bHit.setEnabled(false);
                   bStay.setEnabled(false);
                   return;
              message="Score: "+player_hand.getValue();     
         public void stay(){
              while(dealer_hand.getValue()<17){
                   dealer_hand.addCard(deck.dealCard());
              if(dealer_hand.getValue()<=21&&player_hand.getValue()<dealer_hand.getValue()){
                   message="You loose! ("+player_hand.getValue()+" - "+dealer_hand.getValue()+")";
              else if(player_hand.getValue()==dealer_hand.getValue()){
                   message="You draw! ("+player_hand.getValue()+")";
              else{
                   message="You win! ("+player_hand.getValue()+" - "+dealer_hand.getValue()+")";
              bHit.setEnabled(false);
              bStay.setEnabled(false);
         public void actionPerformed(ActionEvent e){
              if(e.getSource()==bRestart){
                   newGame();
              else if(e.getSource()==bHit){
                   hit();
              else if(e.getSource()==bStay){
                   stay();
              repaint();
         public void paint(Graphics g){
              update(g);
         public void update(Graphics g){
              //lets sord out double buffering
              if(offGraphics==null){
                   offIm=createImage(getSize().width,getSize().height);
                   offGraphics=offIm.getGraphics();
              if(!cards_loaded){
                   //display a message saying we're loading the cards...
                   offGraphics.setFont(new Font("Arial",Font.PLAIN,14));
                   offGraphics.setColor(new Color(171,205,239));
                   offGraphics.fillRect(0,0,getSize().width,getSize().height);
                   offGraphics.setColor(Color.black);
                   offGraphics.drawString("Loading cards... ",5,20);
                   offGraphics.drawRect(15,40,102,10);
                   offGraphics.drawRect(13,38,106,14);
                   offGraphics.setColor(new Color(171,205,239));
                   offGraphics.fillRect(0,0,150,35);
                   offGraphics.setColor(Color.black);
                   offGraphics.fillRect(15,40,(current_card_loading)*2,10);
                   offGraphics.drawString("Loading card: "+current_card_loading+1,15,20);
              else{
                   Image currentCard;
                   while(card_width==-1){
                        card_width=deck.getCard(0).getImage().getWidth(this);
                   if(card_padding==-1){
                        card_padding=(width-(card_width*2)-4)/4;
                   //clear the background
                   offGraphics.setColor(Color.blue);
                   offGraphics.fillRect(0,0,width,height);
                   offGraphics.setColor(Color.black);
                   offGraphics.fillRect(1,1,width-2,height-2);
                   offGraphics.setColor(Color.white);
                   offGraphics.drawString("PLAYER:",card_padding,40);
                   offGraphics.drawString("DEALER:",(width/2)+card_padding,40);
                   offGraphics.drawString(message,5,height-20);
                   if(games>0){
                        offGraphics.drawString(games+" game(s) played...",5,height-10);
                   //Draw the players hand
                   for(int i=0;i<player_hand.getCardCount();i++){
                        currentCard=player_hand.getCards().getImage();
                        offGraphics.drawImage(currentCard,card_padding,70+(20*(i-1)),this);
                   //now draw the dealers hand
                   for(int i=0;i<dealer_hand.getCardCount();i++){
                        currentCard=dealer_hand.getCards()[i].getImage();
                        offGraphics.drawImage(currentCard,(width/2)+card_padding,70+(20*(i-1)),this);
              //draw buffered image
              g.drawImage(offIm,0,0,this);
    public void run(){
              MediaTracker t=new MediaTracker(this);
              System.out.println("Frame getting cards...");
              for(current_card_loading=0;current_card_loading<52;current_card_loading++){
                   card_images[current_card_loading]=getImage(getCodeBase(),"cards/"+(current_card_loading+1)+".gif");
                   if(card_images[current_card_loading]==null){
                        System.out.println("Null card... ["+current_card_loading+"]");
                   else{
                        t.addImage(card_images[current_card_loading],0);
                   try{
                        t.waitForID(0);
                   catch(InterruptedException e){
                        System.err.println("Interrupted waiting for images..>");
                   //lets show our new status
                   repaint();
              //create the deck object now
              deck=new Deck(this,card_images);//Create a new deck object
              card_width=deck.getCard(0).getImage().getWidth(this);
              bHit.addActionListener(this);
              bStay.addActionListener(this);
              bRestart.addActionListener(this);
              bHit.setEnabled(false);
              bStay.setEnabled(false);
              width=getSize().width;
              height=getSize().height;
              this.add(bHit);
              this.add(bStay);
              this.add(bRestart);
              player_hand=new Hand();//Create the hands
              dealer_hand=new Hand();
              //make sure that the buttons appear properly
              this.validate();
              message="";
              cards_loaded=true;
              System.out.println("End of thread...");
              repaint();
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.awt.*;
    import javax.swing.*;
    public class BlackJackServer extends JFrame{
       //Text area for displaying contents
       private JTextArea jta=new JTextArea();
       public static void main(String[] args){
          new BlackJackServer();
       public BlackJackServer(){
          //Place text area on the frame
          setLayout(new BorderLayout());
          add(new JScrollPane(jta),BorderLayout.CENTER);
          setTitle("BlackJack Server");
          setSize(500,300);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setVisible(true);//It is necessary to show the frame here!
          try{
             //Create a server socket
             ServerSocket serverSocket=new ServerSocket(8000);
             jta.append("Server started at "+new Date()+'\n');
             //Listen for a connection request
             Socket socket=serverSocket.accept();
             //Create data input and output streams
             DataInputStream inputFromClient=new DataInputStream(socket.getInputStream());
             DataOutputStream outputToClient=new DataOutputStream(socket.getOutputStream());
             while(true){
                //Receive bet from the client
                float bet=inputFromClient.readFloat();
                //Compute double the bet
                float doublebet=bet+bet;
                //Send double the bet back to the client
                outputToClient.writeFloat(doublebet);
                jta.append("Bet received from client: "+bet+'\n');
                jta.append("Double the bet found: "+doublebet+'\n');
          catch(IOException ex){
             System.err.println(ex);
              BlackJack bj=new BlackJack();
              bj.getSource();
    }//end class BlackJackServer
    import java.io.*;
    import java.net.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class BlackJackClient extends JFrame{
       //Text field for receiving bet
       private JTextField jtf=new JTextField();
       //Text area to display contents
       private JTextArea jta=new JTextArea();
       //IO streams
       private DataOutputStream toServer;
       private DataInputStream fromServer;
       public static void main(String[] args){
          new BlackJackClient();
       public BlackJackClient(){
          //Panel p to hold the label and text field
          JPanel p=new JPanel();
          p.setLayout(new BorderLayout());
          p.add(new JLabel("Enter bet"),BorderLayout.WEST);
          p.add(jtf,BorderLayout.CENTER);
          jtf.setHorizontalAlignment(JTextField.RIGHT);
          setLayout(new BorderLayout());
          add(p,BorderLayout.NORTH);
          add(new JScrollPane(jta),BorderLayout.CENTER);
          jtf.addActionListener(new ButtonListener());//Register listener
          setTitle("BlackJack Client");
          setSize(500,300);
          setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          setVisible(true);//It is necessary to show the frame here!
          try{
             //Create a socket to connect to the server
             Socket socket=new Socket("localhost",8000);
             //Create an input stream to receive data from the server
             fromServer=new DataInputStream(
             socket.getInputStream());
             //Create an output stream to send data to the server
             toServer=new DataOutputStream(socket.getOutputStream());
          catch(IOException ex){
             jta.append(ex.toString()+'\n');
       private class ButtonListener implements ActionListener{
          public void actionPerformed(ActionEvent e){
             try{
                //Get the bet from the text field
                float bet=Float.parseFloat(jtf.getText().trim());
                //Send the bet to the server
                toServer.writeFloat(bet);
                toServer.flush();
                //Get double the bet from the server
                float doublebet=fromServer.readFloat();
                //Display to the text area
                jta.append("Bet is "+bet+"\n");
                jta.append("Double the bet received from the server is "+doublebet+'\n');
             catch(IOException ex){
                System.err.println(ex);
    }//end class BlackJackClient
    import java.awt.*;
    class Card{
       Image image;
       int value;
       /*Constructor*/
       public Card(Image image,int value){
          this.image=image;
          this.value=value;
       /*Return the image associated with the card*/
       public Image getImage(){
          return image;
       /*Return the current value of the card*/
       public int getValue(){
          return value;
       /*Change the value of the card*/
       public void setValue(int value){
          this.value=value;
    import java.awt.*;
    //import java.applet.*;
    import java.net.*;
    import java.io.*;
    class Deck{
         Card[] cards=new Card[52];
         int currCard;
         public Deck(/*Blackjack myApplet,*/Image[] card_images){
              //These are the (initial) values of all the cards
              int[] values={11,2,3,4,5,6,7,8,9,10,10,10,10,11,2,3,4,5,6,7,8,9,10,10,10,10,11,2,3,4,5,6,7,8,9,10,10,10,10,11,2,3,4,5,6,7,8,9,10,10,10,10};
              //Make all the cards, getting the images individually
              for(int i=0;i<52;i++){
                   cards=new Card(card_images[i],values[i]);
              //Shuffle the cards
              shuffleCards();
         public void shuffleCards(){
              Card temp;
              //loop through each card in the deck and swap it with some random card
              for(int i=0;i<52;i++){
                   int rand=(int)(Math.random()*52);
                   temp=cards[51-i];//take the current card
                   cards[51-i]=cards[rand];//and swap it with some random card
                   cards[rand]=temp;
              //now, reset the currentCard to deal
              currCard=0;
         public Card dealCard(){
              Card card=cards[currCard];
              currCard++;
              return card;
         public Card getCard(int i){
              return cards[i];
    class Hand{
         private Card cards[]=new Card[10];
         private int count;
         private int value;
         public void Hand(){
              count=0;
              value=0;
         public Card[] getCards(){
              return cards;
         public int getCardCount(){
              return count;
         public void addCard(Card c){
              cards[count]=c;
              value+=cards[count].getValue();
              if(c.getValue() == 11 && value > 21){//got and ace, so decrement the value of the hand by 10,if it would have been above 21
                   value-=10;
              count++;
         public int getValue(){
              return value;
         public boolean ace(){
              int aceIndex=0;
              boolean result=false;
              for(int i=0;i<count;i++){
                   if (cards.getValue()==11){
                        value-=10;
                        return true;
              return false;

    Why are you posting this yet again after I told you what the problem was 2 days ago:
    http://forum.java.sun.com/thread.jspa?threadID=5147720
    Nobody likes to repeat themselves, nor what others have already told you.

  • Problem in compiling aa servlet program

    I have installed jsdk1.4.2_13
    And also installed tomcat 5.0.28
    I have set
    CATALINA_HOME==C:\Program Files\Tomcat\jakarta-tomcat-5.0.28
    JAVA_HOME ==C:\j2sdk1.4.2_13
    CLASS_PATH==
    C:\Program Files\Tomcat\jakarta-tomcat-5.0.28\common\lib\servlet-api.jar;
    C:\Program Files\Tomcat\jakarta-tomcat-5.0.28\common\lib\jsp-api.jar
    PATH ==C:\j2sdk1.4.2_13\bin;C:\Program Files\Tomcat\jakarta-tomcat-5.0.28\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
    -->My java programs are compiling
    -->I can run tomcat server , And also can see starting page of "http://localhost:8080/"
    But I am not able to compile servlet program
    MY sevlet program is
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class HelloServlet extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String docType =
    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
    "Transitional//EN\">\n";
    out.println(docType +
    "<HTML>\n" +
    "<HEAD><TITLE>Hello</TITLE></HEAD>\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1>Hello</H1>\n" +
    "</BODY></HTML>");
    ERRORS are:
    Pakage javax.servlet does not exist
    Pakage javax.servlet.http does not exist
    cannot resolve symbol HttpServletRequest
    and similar errors
    can anyone guide me?
    Message was edited by:
    Learn

    it's not CLASS_PATH, it's CLASSPATH.
    Directory paths with spaces in them are problematic. Surround them with double quotes.
    I think the best thing is not a CLASSPATH environment variable. Better to use the -classpath option on javac.exe when you compile.
    So your command to compile might look something like:
    javac -classpath .;"C:\Program Files\Tomcat\jakarta-tomcat-5.0.28\common\lib\servlet-api.jar" *.java%

  • 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

  • Error compiling a pro c program

    I am having the following error when I compile a pro c program. Any hints will be appreciated
    diamond:/home/rechever$ make -f $BANNER_HOME/general/c/sctproc.mk rzrload CHECKOPT='sqlcheck=full userid=baninst21/xxxxx'
    proc iname=rzrload.pc ireclen=132 oreclen=132 lines=y select_error=no hold_cursor=no release_cursor=no maxopencursors=255 maxliteral=160 ltype=none include=/u02/sct/banner/bandev2/general/c/ include=/u02/sct/banner/bandev2/general/c/ dbms=v8 unsafe_null=yes sqlcheck=full userid=baninst21/xxxxx
    Pro*C/C++: Release 10.2.0.3.0 - Production on Wed Oct 29 16:40:31 2008
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    System default option values taken from: /u01/app/oracle/product/OH4/10g/precomp/admin/pcscfg.cfg
    INTERNAL ERROR: Failed assertion [PGE Code=90105]
    make: 1254-059 The signal code from the last command is 11.
    Edited by: user648177 on Oct 29, 2008 2:04 PM
    Edited by: user648177 on Oct 29, 2008 2:05 PM

    That's Pro*C's way of telling you that you don't have write access to the directory you're precompiling in.

  • How to compile and execute a Pro*C program on Unix?

    Hello Gurus,
    I am new to Pro*C. I just wrote a sample Pro*C program 'first.pc' to read some information from some tables and print it on screen.
    I am not sure how to compile it and execute it to see the output of my very first program.
    After searching a lot I tried following ..
    -- Step 1 compile the program into .c program
    $->ls -lrt first.pc
    -rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
    $->proc first.pc
    Pro*C/C++: Release 8.1.7.0.0 - Production on Sat Oct 31 05:43:35 2009
    (c) Copyright 2000 Oracle Corporation.  All rights reserved.
    System default option values taken from: /oracle/app/oracle/product/8.1.7/precomp/admin/pcscfg.cfg
    $->ls -lrt first*
    -rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
    -rw-r--r--    1 sqloper4 staff             0 Oct 31 05:43 first.lis
    -rw-r--r--    1 sqloper4 staff          6648 Oct 31 05:43 first.c
    $->
    -- Step 2 Generate the .o file
    $->cc -I${ORACLE_HOME}/precomp/public -c first.c
    first.c: In function 'main':
    first.c:154: warning: return type of 'main' is not 'int'
    $->
    $->ls -lrt first*
    -rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
    -rw-r--r--    1 sqloper4 staff             0 Oct 31 05:43 first.lis
    -rw-r--r--    1 sqloper4 staff          6648 Oct 31 05:43 first.c
    -rw-r--r--    1 sqloper4 staff          3709 Oct 31 05:45 first.o
    $->
    -- Step 3 After that link the .o to libraries and produce the exe
    $->cc -o exe_name -L $ORACLE_HOME/lib -lclntsh
    ld: 0711-317 ERROR: Undefined symbol: .main
    ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
    collect2: ld returned 8 exit status
    $->
    $->ls -lrt first*
    -rwxrwxrwx    1 sqloper4 staff          1069 Oct 31 03:39 first.pc
    -rw-r--r--    1 sqloper4 staff             0 Oct 31 05:43 first.lis
    -rw-r--r--    1 sqloper4 staff          6648 Oct 31 05:43 first.c
    -rw-r--r--    1 sqloper4 staff          3709 Oct 31 05:45 first.o
    $->After all above still I am not sure how to proceed and 'execute' the program.
    Could you please help me with the steps to 'Compile and execute' a Pro*C program ?
    Oracle DB Version : Oracle8i Enterprise Edition Release 8.1.7.4.0 - Production
    OS : Unix
    Thanks in advance!

    Hi All,
    After reading Pro*C Question thread I have tried below steps to compile my .C program, but failed with the given errors
    $->cc -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib first.c -o sample
    ld: 0711-317 ERROR: Undefined symbol: .sqlcxt
    ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
    collect2: ld returned 8 exit statusAfter receiving above error I tried below command as an alternative
    $->cc -I$ORACLE_HOME/precomp/public -L$ORACLE_HOME/lib first.c -o first -lclntsh -lsql10
    collect2: library libsql10 not foundCould you please help in resolving above error? Whats missing exactly?

  • How to compile and run PRO*C programs in Linux

    Hi all,
    This is my first post in this forum.
    I have Oracle 9i installed in linux platform .
    How can i compile and run Pro*C programs in linux.(i mean any commands or procedure to run these programs)
    please help me in this regard.
    Thanks in advance,
    Trinath Somanchi,
    Hyderabad .

    (1) How to compile the Pro*c program U got to have a makefile to compile a Pro*c program. It helps u in compiling and creating an excutable. Once U have created a makefile , just call "make" and it will do the compilation and create the executable as well.
    For a sample makefile visit
    http://asktom.oracle.com/~tkyte/proc_makefile/
    (2) How to run the Pro*c program ? and Once U have created an executable, U shall call that directly as any other linux command. Make sure U have the permissions to run the executable. If not give the permissions using chmod 777 executable
    (3)How to get the output of the program ?Question 2 and 3 are the same. I mean running and getting a output are the same

  • Problem compiling my first program; Please Help me!

    Please HELP, what am I doing wrong?
    For over 5hours I have been trying to figure out how to compile a simple Hello world program using sdk1.3.1_02/j2re1.3.1_02 and I am getting the following errors: helloworld.java:2 cannot resolve symbol
    symbol : class string
    location : class helloworld
    cannot reolve the string symbol
    symbol : class out
    location : package system
    I want to program in java so badly but I am trying to get my environment set so that I can take off. To compile my first program has been a disaster!!
    This is my path:
    SET PATH=C:\WINDOWS;C:\WINDOWS\COMMAND;C:\JDK1.3.1_02\BIN
    Thanks very much in advance
    ::(

    Java is case sensitive,
    use String instead of string. and System.out instead of system.out
    Sudha

  • Can not query from v$instance and v$session from within Pro*C program

    Hi there,
    We have Oracle 10.2.0.1 enterprise edition running on Linux (Red Hat 4 ES)
    Our Pro*C developer tries to query the version from v$instance view and is getting errors when compiling his Pro*C programs.
    The related Oracle user account has the SELECT ANY DICTIONARY privilege, so if he tries from the sqlplus, he has no problem querying the v$instance or v$session views. His problem is when he is trying to compile his Pro*C program against the very same Oracle account.
    Any help/input is greatly appreciated.
    R/ Zafer
    Here are the errors he is getting:
    Pro*C/C++: Release 10.2.0.1.0 - Production on Thu Jun 24 12:54:04 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    System default option values taken from:
    /home/oracle/product/10.2.0/Linux6
    4/precomp/admin/pcscfg.cfg
    Error at line 150, column 4 in file ../database.pc
    EXEC SQL SELECT version INTO :inputLine FROM V$INSTANCE;
    ...1
    PLS-S-00201, identifier 'V$INSTANCE' must be declared
    Error at line 150, column 4 in file ../database.pc
    EXEC SQL SELECT version INTO :inputLine FROM V$INSTANCE;
    ...1
    PLS-S-00000, SQL Statement ignored
    Semantic error at line 150, column 4, file ../database.pc:
    EXEC SQL SELECT version INTO :inputLine FROM V$INSTANCE;
    ...1
    PCC-S-02346, PL/SQL found semantic errors

    I issued FULL DB EXPORT / IMPORT privilege to the related Oracle user account and it works now.

  • Running Pro*C program in Unix environment.

    I have a program developed in Pro*C running on AIX version 5.3 and at the moment compiled in a 10g release 2 environment.
    This program find some job to start via a system() call. On previous release of Oracle software I have the possibility to get error detected in these job, but now every job return error code 0!
    I have found out that it easily can be seen, if you start a sqlplus on the unix commandline and start a host command (!) inside this sqlplus, then all command called from this new unix prompt will return error code 0, and no error can be detected! Try run the command diff x y where file x and y does not exist, and see the error code (type echo $?).
    My question is have anyone seen this problem, and have somebody found a solution? My guess is that it is a problem in the AIX port, but I have not the possibility to try on other hardware running Unix.

    unix> uname -a
    AIX david 3 5 00C5E53B4C00
    unix> echo My C-program
    My C-program
    unix> diff x y
    diff: x: A file or directory in the path name does not exist.
    diff: y: A file or directory in the path name does not exist.
    unix> echo $?
    2
    unix> ./bostst1 ksh
    tor 12 okt 09:09:20 2006
    unix> diff x y
    diff: x: A file or directory in the path name does not exist.
    diff: y: A file or directory in the path name does not exist.
    unix> echo $?
    2
    unix>
    unix> echo My Pro*C program:
    My Pro*C program:
    unix> diff x y
    diff: x: A file or directory in the path name does not exist.
    diff: y: A file or directory in the path name does not exist.
    unix> echo $?
    2
    unix> ./bostst ksh
    Dato: 2006.10.12 09:13:15
    unix> diff x y
    diff: x: A file or directory in the path name does not exist.
    diff: y: A file or directory in the path name does not exist.
    unix> echo $?
    0
    unix> sqlplus scott/tiger
    SQL*Plus: Release 10.2.0.1.0 - Production on To Okt 12 09:13:55 2006
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Forbindelse er oprettet til :
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    SQL> !diff x y ; echo $?
    diff: x: A file or directory in the path name does not exist.
    diff: y: A file or directory in the path name does not exist.
    0
    SQL>
    I hope this show the problem !!!
    On what platform are you (Kamal Kishore) running?

  • Error while executing a Pro*c program

    Hi,
    guys iam trying to execute a Pro*c program, and iam getting the following error
    ld.so.1: cms2sap1: fatal: libclntsh.so.8.0: open failed: No such file or directory
    Killed
    the same executable program was very much working till yesterday, iam on Sun Solaris, so what could be the problem???
    cheere....

    yeah iam running under the same installation,
    anyway i did set the LD_LIBRARY_PATH parameter to $ORACLE_HOME/lib and it did work, i just wonder as to why it became a problem all of a sudden, could someone have manipluated it??? if so how do i find it out???
    cheere.......

Maybe you are looking for

  • MacBook REALLY slow after Aperture install

    After I installed Aperture, my system slowed WAAAAY down. I'm talking as long as a minute to bring up a menu. I made sure that all import was finished, all previews made, and in fact at times the system works as before. But then, all of a sudden, som

  • Currency field on a selection screen of type 'DMBTR'.

    Hello ABAPers,       Could you please tell me how to do it?        I have a currency field on a selection screen of type 'DMBTR'.        When i input and press the enter key ,i want the value to be displayed in the following style.           1. CURRE

  • I need the activation code for nokia 9300I

    i have mobil nokia 9300i and i need the activation code for nokia 9300I to install MobiDict english-arabic and that is my serial number and thanks a lot Moderator Note: IMEI number removed Message Edited by kenken on 23-Oct-2008 02:17 PM

  • Error in submit statment

    Hi,   In my pgm if i use like this       SUBMIT pgm        TO SAP-SPOOL IMMEDIATELY ''     WITHOUT SPOOL DYNPRO        VIA JOB name NUMBER number       AND RETURN    . the submit stmt is working fine but i use the Fm job_submit like mentioned below i

  • Labview and Mysql C API

    Have someone been able to use Labview's Call Library Function to call Linux Mysql C API successfully? Thanks