Compile OCI program in Sun wrokshop

Hi, I am new to Sun workshop and Oracle OCI. How can I set up the environment to comipler Oracle OCI in Forte Sun workshop without using oracle make file?
Thanks,
Sherry

<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by R.Siva Kumar [[email protected]]:
TO All:
Here is reports OCI sample program.
<HR></BLOCKQUOTE>
null

Similar Messages

  • How to compile Reports sample OCI program in Sun solaris ?

    TO All:
    Here is reports OCI sample program.
    #include <stdio.h>
    long ret,rwcrun(),rwcsql();
    main()
    char options[132];
    long len;
    strcpy(options,"userid=ps51/ps51 report=emp batch=yes paramform=no destype=file desname=l.ps");
    printf("/options are: %s",options);
    len=strlen(options);
    ret=rw2run(options);
    printf("/n Value of return code is %d",ret);
    exit();
    Pls guide me , how to compile this program in Sun Solaris platform .
    1. Which library file I need to include.
    2. How to create make (.mk) file.
    If I compile this program using below command.
    $>cc ociprg.c r30dll.o
    then "rw2run" not found error.
    Also I need to use RW2RRB oci function, for this which library I need to use.
    Thanks in Advance
    Siva
    null

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by R.Siva Kumar [[email protected]]:
    TO All:
    Here is reports OCI sample program.
    <HR></BLOCKQUOTE>
    null

  • An oci program compiled with oracle 9 run in a machine has oracle client 10

    Hello,
    I would like to know if an OCI program compiled with Oracle 9 client libraries can communicate with Oracle 9 and Oracle 8 database servers by using the oracle client 10 on Solaris? Is there any known problem of this combination?
    Many thanks,

    It largely depends on what your program does. If the program uses features which are only available in Oracle 9i and not in Oracle 8i then you are likely to get some errors. For the latter case, ie, compiling the program with Oracle 9 libs and runnig with Oracle 10 libs, talking to 9i server should be fine while 8i server may give you some unexpected behaviour.
    Thanks,
    Sumit

  • How to compile java programs? There is no javac for me!

    Hi, I'm starting to learn java and downloaded the java 1.4.0.1 standard edition from this website. However, after I installed the program, there is no javac to be found while there is a java.exe. I need javac to compile my program before I can interpret it but it is nowhere to be found!
    Did I download the wrong SDK version? I thank anyone in advance who can help me in the right direction!

    You must have the SDK to create programs. The Jre is a component of the SDK that can be downloaded separately if you only want to run programs.
    SDK downloads from here, use the row "Windows (all languages, including English)" and be sure to select the SDK COLUMN, not the JRE:
    http://java.sun.com/j2se/1.4/download.html

  • Cannot compile servlet program

    I have recently written a servlet program. When I compile the program (let's say "HelloWorld.java"), I've got the following error message:
    package javax.servlet does not exist
    I've download the class files and set the classpath already. Have I missed anything?
    Thx! ^-^

    Maybe you should listen in at
    http://forum.java.sun.com/thread.jsp?forum=45&thread=234654
    He has a similar problem.
    Did you put the servlet.jar in your classpath?

  • Compiling a program

    hi to all !
    i have a problem when i compile a program
    the error is:
    ld: elf error: file /export/soft/linpack/hpl/lib/Sun_Ultra20/libhpl.a(HPL_dlamch.o): elf_getshdr: Request error: class file/memory mismatch
    ld: elf error: file /export/soft/linpack/hpl/lib/Sun_Ultra20/libhpl.a(HPL_dlamch.o): elf_getshdr: Request error: class file/memory mismatch
    ld: fatal: file /opt/SUNWhpc/lib/libmpi.so: wrong ELF class: ELFCLASS32
    tell me someone what does it mean and what can i do
    thanks

    This problem is happened with Solaris 10 and Sun Studio compile with 64bit. You get compile error or dbx will crash when you debug the program.
    Two correct solutions are to have all the Solaris 10 libraries affected by this bug patched or upgrade your system to Solaris 10 update 1. We have patches for our Sun Studio libraries
    SPARC platforms:
    119963-04 (Shared library patch for C++)
    120753-02 (libmtsk patch)
    x86 platforms:
    119964-05 (Shared library patch for C++)
    120754-02 (libmtsk patch)
    But We strongly suggest you to upgrade your OS system to Solaris 10 update 1 or later.
    In the mean time, if you can not do either 2 correct solutions above (means you have to stay with Solaris 10 and can't patch all the libraries), Sun Studio dbx group produced dbx patches as a work around solution for this crash problem.
    If you have Sun Studio 11, install dbx patch 121023 for SPARC and 121616 for x86
    If you have Sun Studio 10, install dbx patch 117844-04 for SPARC and 117845-04 for x86
    -Ngoc

  • Exception when running a compiled java program in DOS

    I'm new to programming in general and java in specific. I am using the jGrasp programming software, and successfully compile my program, but when I try to run it out of DOS (which I undesrtand is the purpose of java to begin with, unless I'm mistaken), I get an exception that looks exactly like this.....
    Exception in thread "main" java.lang.NoClassDefFoundError: keyboard/java
    Caused by: java.lang.ClassNotFoundException: keyboard.java
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    I realize I may just be missing something simple, as I've not been in the class for very long, but the book doesn't seem to have the answer. It is "Starting out with Java: Early Objects, Third Edition, by Tony Gaddis. Any help will be apprecieated. The program is below, it's really short.
    The program is a simple one to teach myself scanner input and an 'if' statement:
    *     basic input program
    import java.util.Scanner;
    public class keyboard
         public static void main(String[] args)
              String Class;
              int age;
              String race;
              char sex;
              String gender;
              Scanner keyboard = new Scanner(System.in);
              System.out.print("What class do you wish to be? ");
              Class = keyboard.nextLine();
              System.out.print("How old is your character? ");
              age = keyboard.nextInt();
              keyboard.nextLine();
              System.out.print("What sex is your character? M/F? ");
              gender = keyboard.nextLine();
              sex = gender.charAt(0);
              System.out.print("What race is your character? ");
              race = keyboard.nextLine();
              if (sex == 'M')
                   System.out.println("Today you will be playing a " + race + " " + Class +
                                                           " who is " + age + " years old at the start " +
                                                           "of his adventuring career!");
              if (sex == 'F')
                   System.out.println("Today you will be playing a " + race + " " + Class +
                                                           " who is " + age + " years old at the start " +
                                                           "of her adventuring career!");                                   
    }

    Childofheinlein wrote:
    I'm new to programming in general and java in specific. I am using the jGrasp programming software, and successfully compile my program, but when I try to run it out of DOS (which I undesrtand is the purpose of java to begin with, unless I'm mistaken), I get an exception that looks exactly like this.....
    So summerizing some of what was said before and some of that wasn't.
    jGrasp is a simplistic IDE. When you pop a dos window from it it sets up the windows correctly to run your program. When you open a regular command window you must do the same yourself.
    >
    Exception in thread "main" java.lang.NoClassDefFoundError: keyboard/javaJava runs "classes". The command that you typed above meant that you were trying to run a "file". Specifically the file "keyboard.java". The two are not the same. There is however a relationship. When the source code, in this case inside of "keyboard.java" is compiled it produces a file called "keyboard.class". Insided of the file there is a "class" called "keyboard". Notice that the name of the class does not have either .java nor .class on the end of it.
    The VM (the 'java' command) finds a "class" using the class path to search files of various types for the class (again keep in mind that files contain classes but they are not themselves classes.)
    You can add to the classpath using the Sun VM using either command line options or environment variables. As noted in some of the previous messages those are "-cp" and "CLASSPATH". It is important to note that that does NOT fully specify the class path. But for your purposes it is sufficient to think of it as doing so.
    The 'default' setting for the part of the class path that you normally set (like via '-cp') is the current directory which is specified by the ".". So normally the following are equivalent.
    java -cp . keyboard
    java keyboard
    The reason the VM could not find your class when you opened the dos window yourself is because you were in the wrong directory. If you had been in the directory with the file "keyboard.class" then it would have worked (if you have not messed with the environment variable "CLASSPATH".)
    So if your class file has the following location: c:\myapps\java\keyboard.class then you can do the following.
    1. Open a console window
    2. Type "cd c:\myapps\java"
    3. Type "java keyboard"
    If the above does not work then you are in the wrong directory or the env variable CLASSPATH has been set to something.

  • Compiling Invocation Programs ? Where to find javai.lib ??

    Hello,
    I'm having J2SE 1.4, VC++ 4.0. I'm trying to compile the invocation programs given in the Java Tutorial but I'm unable to compile since I've not found javai.lib in my J2SE folder. Can anyone help me on how to compile. Where to find javai.lib ??
    Thanks
    Wah Java!

    The javai.lib/dll have been replaced by jvm.lib/dll
    since Java2 SDK 1.2. The javai.lib is in the "lib"
    directory of your JDK installation. Note that the
    invocation API has also changed, and you will probably
    need to update the method calls. See the JNI spec at
    http://java.sun.com/j2se/1.4/docs/guide/jni/spec/jniTOC
    doc.html.As you've said, I compiled the program and linked with jvm.lib but VC++ said that jvm.lib is incorrect file (or you can say corrupt file). Can you please help me how to compile with JVM.lib
    Thanks in advance,
    Ashish Shukla
    Wah Java!

  • JAAS - problem in compiling the program

    Hi,
    I am working on JAAS .
    I tried the Authorization example given in this link of sun site.
    http://java.sun.com/javase/6/docs/technotes/guides/security/jaas/tutorials/GeneralAcnAndAzn.html
    I was trying to compile that program but SamplAzn.java..is not compiling.
    when I try it given the error below :
    --------------------Configurat
    ion: <Default>--------------------
    D:\AZN\sample\SampleAzn.java:135: cannot find symbol
    symbol : class SampleAction
    location: class sample.SampleAzn
    PrivilegedAction action = new SampleAction();
    ^
    Note: D:\AZN\sample\SampleAzn.java uses unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    1 error
    Process completed.
    --------------------------------------------------------------------------------So,What should I do ?
    Thankx..

    Yes , I created the directory structure as given in the link.
    I can compile all other ".java" file.
    But I don't know why I can't compile SampleAzn.java file.

  • Compile c programs to use dual processors

    I am trying to optimized a c program to run in a SunBlade 1000 with 2 processors.
    gcc installed in the mchine is version 2.95.3.
    If I want to compile the program to use both of the processors, how should I proceed? I read the gcc manual, also did some google searches, but did not get it to work.
    I would appreciate your input very much.

    The most straightforward way for this to happen would be if gcc had implemented openMP (which as far as I know, it has not). If you are set on using the GNU compilers, you'll have to create multiple threads to take advantage of the dual processors on your SB 1000. Describing how to write a multi-threaded app is considerably beyond the scope which could be addressed in this medium. You can start by reading up on multi-threaded programming and playing with the functions in libthread. Look at the man pages for thr_create and you'll find some simple examples to get you going. If you are open to using the Sun compilers Sun One Studio Compiler collection, the compiler can do some of the hard work for you. If you included openMP pragmas, it can do an even better job.

  • Error when running a oci program

    I have a oci program copiled on solaris.when i try to run it in another machine it stops giving a strange message:: I get the
    following error message.
    fatal: relocation error: file sqlplus: symbol naemd5s: reference symbol not found
    : killed
    null

    i'm OCI or SQLPLUS is not installed properly on the other machine. could you please reinstall oracle and make sure libraries are complete.

  • Can't find (and possibly don't have) the -lglut -lGLU -lGL libraries... or at least when I try to compile a program, it returns with that error.  Any ideas (I really need to get this popgen program running on Lion)? Thx!

    Hi all,
        I'm trying to compile a population genetic software program onto my Mac Lion.  It was originally compiled to Tiger and worked beautifully.  But now I'm getting an error  'library not found for -lglut', and now I'm trying to figure out how to download the library. I've installed the command line code for Xcode, and am thinking I possibly missed installing the libraries.  I could be very wrong here... all I know is that I'm no longer near the people I would ask to help me with this so I'm asking you!  Thanks in advance for any help!  I guess my questions are: 1) where can I download the glut (potentially OpenGL) libraries (if I don't have them already)? And 2) once downloaded, how do I install it so the makefile will compile my program (in terminal, not Xcode)? Cheers,
    C

    Certain Firefox problems can be solved by performing a ''Clean reinstall''. This means you remove Firefox program files and then reinstall Firefox. Please follow these steps:
    '''Note:''' You might want to print these steps or view them in another browser.
    #Download the latest Desktop version of Firefox from http://www.mozilla.org and save the setup file to your computer.
    #After the download finishes, close all Firefox windows (click Exit from the Firefox or File menu).
    #Delete the Firefox installation folder, which is located in one of these locations, by default:
    #*'''Windows:'''
    #**C:\Program Files\Mozilla Firefox
    #**C:\Program Files (x86)\Mozilla Firefox
    #*'''Mac:''' Delete Firefox from the Applications folder.
    #*'''Linux:''' If you installed Firefox with the distro-based package manager, you should use the same way to uninstall it - see [[Installing Firefox on Linux]]. If you downloaded and installed the binary package from the [http://www.mozilla.org/firefox#desktop Firefox download page], simply remove the folder ''firefox'' in your home directory.
    #Now, go ahead and reinstall Firefox:
    ##Double-click the downloaded installation file and go through the steps of the installation wizard.
    ##Once the wizard is finished, choose to directly open Firefox after clicking the Finish button.
    Please report back to see if this helped you!

  • Error While Compiling Amber 8 on Sun Blade 2500

    Hello everybody,
    While Compiling Amber 8 on sun solaris. It's giving me error ld:fatal error not able to write in <some dir name>
    Kindly help me to compilation step, and how to compile amber 8 with gcc.
    Regards
    Jagdish

    Hello everybody,
    While Compiling Amber 8 on sun solaris. It's giving me error ld:fatal error not able to write in <some dir name>
    Kindly help me to compilation step, and how to compile amber 8 with gcc.
    Regards
    Jagdish

  • Setting module name in OCI program

    Hi,
    I have been struggling with setting the module name from my OCI program. Below is the code in which
    I create the environment, connect, attempt to set the module attribute, wait for key input, and clean up
    and exit after getting the key input.
    That I can tell, I have called OCISetAttr as the documentation says I should and none of my return values
    indicate a problem. Yet when I v$session, I get what I presume is the default value of the module
    and not the value I set in the code("moduletest").
    The programs physical filename is oci101.exe. It also connects to the Oracle instance as a user named
    oci101. I check v$session with this query:
    select username, module from v$session where username is not null;
    And the output is this:
    USERNAME MODULE
    OCI101 oci101.exe
    SYSTEM SQL*Plus
    I should see a MODULE column value of "moduletest" for the OCI101 user.
    Not sure what I'm missing. Any ideas?? Here is the code:
    // Begin code:
    OCIEnv* envhp;
    ub2 charset_id = 0;
    ub2 ncharset_id = 0;
    ub4 mode = OCI_DEFAULT;
    const sword env_rc = OCIEnvNlsCreate(
    &envhp, mode,
    (void*)0, // user-defined context for custom memory allocation
    (void* (*)(void*, size_t))0, // user-defined malloc
    (void* (*)(void*, void *, size_t))0, // user-defined realloc
    (void(*)(void*, void*))0, // // user-defined free
    (size_t)0, // extra user memory
    (void **)0,
    charset_id, ncharset_id
    OCIError* errhp;
    const sword err_rc = OCIHandleAlloc(
    (dvoid *) envhp, (dvoid **) &errhp,
    OCI_HTYPE_ERROR, (size_t) 0, (dvoid **) 0
    checkerr(err_rc, errhp);
    OCISvcCtx* svchp = 0;
    const sword l2rc = OCILogon2(
    envhp, errhp, &svchp,
    (const OraText*)zusername, (ub4)strlen(zusername),
    (const OraText*)zpassword, (ub4)strlen(zpassword),
    (const OraText*)zdatabase, (ub4)strlen(zdatabase),
    mode
    checkerr(l2rc, errhp);
    // Set the module attrbute
    // Extract the session handle into sessionhp.
    OCISession *sessionhp = 0;
    ub4 sh_size = 0;
    sword oci_attr_get_status = OCIAttrGet ( svchp,
    OCI_HTYPE_SVCCTX,
    &sessionhp,
    &sh_size,
    OCI_ATTR_SESSION,
    errhp );
    checkerr(oci_attr_get_status, errhp);
    // Set the module
    sword oas_rc = OCIAttrSet(sessionhp, OCI_HTYPE_SESSION,(void *)"moduletest",
    strlen("moduletest"), OCI_ATTR_MODULE, errhp);
    checkerr(oas_rc, errhp);
    getchar();
    // Cleanup:
    if (svchp) { // 0 when already disconnected
    OCISvcCtx*const tmp_svchp = svchp;
    svchp = 0; // reset svchp on error or not
    const sword lorc = OCILogoff(tmp_svchp, errhp);
    checkerr(lorc, errhp);
    const sword rc = OCIHandleFree(envhp, OCI_HTYPE_ENV);
    // End Code.
    Thanks for any help . . .
    Karl

    Hi Karl,
    I'm certainly not an OCI expert, but after setting the module attribute the value is updated upon the next statement execution in my experience. There may be other ways in which this can happen, but I have not seen those cases.
    Here is a short example:
    #include <stdio.h>
    #include <string.h>
    #include <malloc.h>
    #include <oci.h>
    int main(int argc, char *argv[]) {
      OCIEnv      *envhp = NULL;  /* OCI Environment handle     */
      OCIError    *errhp = NULL;  /* OCI Error handle           */
      OCISvcCtx   *svchp = NULL;  /* OCI Service Context handle */
      OCISession  *usrhp = NULL;  /* OCI User Session handle    */
      OCIStmt     *stmtp = NULL;  /* OCI Statement handle       */
      /* the statement to execute   */
      /* this is purely for example */
      oratext *sqlstmt = "begin null; end;";
      /* connection information */
      oratext *username = "scott";
      oratext *password = "tiger";
      oratext *database = "orademo";
      /* used to hold the results of each OCI call */
      sword result = 0;
      /* Initialize and create a default environment */
      result = OCIEnvCreate(&envhp,
                            OCI_DEFAULT,
                            (dvoid *) 0,
                            0,
                            0,
                            0,
                            (size_t) 0,
                            (dvoid **) 0);
      /* allocate an error handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &errhp,
                              OCI_HTYPE_ERROR,
                              0,
                              (dvoid **) 0);
      /* create connection */
      result = OCILogon2(envhp,
                         errhp,
                         &svchp,
                         username,
                         (ub4) strlen(username),
                         password,
                         (ub4) strlen(password),
                         database,
                         (ub4) strlen(database),
                         OCI_DEFAULT);
      /* get the user session handle */
      result = OCIAttrGet(svchp,
                          OCI_HTYPE_SVCCTX,
                          (void *) &usrhp,
                          NULL,
                          OCI_ATTR_SESSION,
                          errhp);
      /* set the module attribute */
      result = OCIAttrSet(usrhp,
                          OCI_HTYPE_SESSION,
                          (void *) "My Module",
                          (ub4) strlen("My Module"),
                          OCI_ATTR_MODULE,
                          errhp);
      /* allocate the statement handle */
      result = OCIHandleAlloc((dvoid *) envhp,
                              (dvoid **) &stmtp,
                              OCI_HTYPE_STMT,
                              0,
                              (dvoid **) 0);
      /* prepare the statement for execution */
      result = OCIStmtPrepare(stmtp,
                              errhp,
                              sqlstmt,
                              (ub4) strlen((char *) sqlstmt),
                              OCI_NTV_SYNTAX,
                              OCI_DEFAULT);
      /* execute the statement - after execution the */
      /* MODULE value should be updated in v$session */
      result = OCIStmtExecute(svchp,
                              stmtp,
                              errhp,
                              (ub4) 1,
                              (ub4) 0,
                              (CONST OCISnapshot *) NULL,
                              (OCISnapshot *) NULL,
                              OCI_DEFAULT);
      /* print a simple prompt    */
      /* view session in SQL*Plus */
      printf("program paused, ENTER to continue...");
      getchar();
      /* disconnect from the server */
      result = OCILogoff(svchp,
                         errhp);
      /* deallocate the environment handle */
      /* OCI will deallocate child handles */
      result = OCIHandleFree((void *) envhp,
                             OCI_HTYPE_ENV);
      return OCI_SUCCESS;
    }When the program is paused I see this in SQL*Plus in my test:
    SQL> select sid, username, program, module from v$session where username = 'SCOTT';
           SID USERNAME         PROGRAM                          MODULE
           136 SCOTT            OCIModuleTest.exe                My ModulePerhaps that is a bit of help.
    Regards,
    Mark
    Edited by: Mark Williams on Dec 22, 2008 11:06 AM
    Tidied up the sample a bit.

  • I am not able to compile a program  on my mac...

    I am not able to compile a program  on my mac; i am getting the following message :"Class names, 'ClassName.Java', are only accepted if annotation processing is explicitly requested".  I am new to programming, and I am using a MAC. Any suggestions?  I am typing: "Javac ClassName.Java" at the command prompt.

    You might want to be posting to the developer forum here:
    https://discussions.apple.com/community/developer_forums

Maybe you are looking for

  • Problem with WT2007, SBO2005 and Opportunities

    I am trying to synch opportunities between WebTools 2007 PL3 and SBO 2005 PL31 but every opportunity errors with the following error: -5002:Potential amount is missing  [OPR1.MaxSumLoc][line: 3]    at NetPoint.SynchSBO.SBOObjects.SBOOpportunity.NetPo

  • Error en Query : [SQL Server] Error de Division entre 0

    Maestros !! Tengo este problema: Al ejecutar una query me figura este error " [SQL Server] Error de Division entre 0 ". Entiendo el error, cualquier numero divido por 0 arroja este problema, mi pregunta es como lo hago para no considerar las operacio

  • Delay playing back clips/timeline on 7.0.1 on Mac

    Ever since I ran the update last week (i also ran today's update and still the same problem), I've been having these issues.  When I go to play a clip in the source window, i get the spinning rainbow for a couple seconds and then the clip plays.  The

  • Publishing diagram gives empty picture

    I create a database diagram in Jdeveloper 11g 11.1.1.0.1. When publishing to a picture it makes an empty picture. - Tried different formats (png/jpg). - Exporting to an older xmi (creates a small xmi without real content in it) The database diagram f

  • Error loading Excels Files, BOExelAdapter, Dataservice, Linux

    Data service is runing in linux, the job server is runing, however can't load excels files, I got the next message: " Error preparing to read <Query>: <Following error was received while listening for client connections: 'etldwh_srv:4001'.