Execute a stored function from command line

Hello,
I have a db stored function and I need to execute it from command line. I've tried by this way:
(I need to connect with sys credentials)
sqlplus sys/mypwd@mydb AS SYSDBA @myfile.sql
and myfile.sql is:
exec myschema.sf_test;
but I get this error:
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00221: 'sf_test' is not a procedure or is undefined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

You can use exec command for the execution of a procedure with out bind variable, but for a function always use bind variable.
Function should return a value, so you must have to assign the function return value to a variable.
like given below(or simply query the function using select statement)
Method 1
======
variable v1 number;
exec :v1 := t_func;
Method 2
======
declare
x1 NUMBER;
begin
x1 := t_func;
end;
SQL> create function t_func return number
2 as
3 begin
4 return 0;
5 end;
6 /
Function created.
SQL> exec t_func;
BEGIN t_func; END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00221: 'T_FUNC' is not a procedure or is undefined
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Method 3
======
SQL> select t_func from dual;
T_FUNC
0
Regards
JJ

Similar Messages

  • How to execute an ODI package from Command Line

    Please can anyone help me to know how to execute an ODI package from the command line without creating a scenario from the package.
    Appreciate your help.
    Thanks
    B

    You can't. Create a scenario and then execute that from the command line.

  • How to execute My Javascript code from command line or through perl or VB

    Hi Forum,
    I am a new bie, just 2 days old to acrobat and javascript, and I am basically a perl developer
    Here with I have created a small script to merge two pdf
    // Create a new PDF document:
    var newDoc = app.newDoc();
    // Insert doc1.pdf:
    newDoc.insertPages({
    nPage : -1,
    cPath : "/d/sathish/1.pdf",
    // Insert doc2.pdf:
    newDoc.insertPages({
    nPage : newDoc.numPages-1,
    cPath : "/d/sathish/2.pdf",
    // Save the new document:
    newDoc.saveAs("/d/sathish/myNewDoc.pdf");
    My code is working fine and merging properly,
    Is there any way to execute this script through commandline or using some other scripting languages like perl or through VB
    My objective is to automate the merging process without any manual intervention, I don't want to open acrobat manually to execute this javacript, i want to automate that process too,
    Please suggest me which will be very helpful to me,
    Thanks in advance
    Thanks & Regards
    Sathish V.

    Hi Sathish,
    did you find a solution for this? I am looking for the same thing. I want to write a program(perl, batch script, etc.) which could automatically convert pdf to excel without any manual intervention.
    I have the acrobat javascript which could achieve this, but it can only be executed in arobat consolt.  I need it to be able to get executed in a script to automate the processing.
    thanks
    Warren

  • How to execute a procedure and function at command line?

    I tried to execute the following function at command line.
    CREATE OR REPLACE FUNCTION FN_IS_SYSDATE_TICKING
    RETURN BOOLEAN
    IS
    ls_value     VARCHAR2(100) DEFAULT 'NONE';
    BEGIN
    SELECT value
    INTO ls_value
    FROM V$PARAMETER
    WHERE name = 'fixed_date';
    IF ls_value = 'NONE' THEN
    RETURN TRUE;
    ELSE
    RETURN FALSE;
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
    RETURN TRUE;
    END FN_IS_SYSDATE_TICKING();
    At Command Line, I entered
    var v1 BOOLEAN;
    exec :v1 := RSSC.FN_IS_SYSDATE_TICKING();
    print v1;
    It is giving boolean is not declared.

    Works for me:
    SQL> CREATE OR REPLACE FUNCTION FN_IS_SYSDATE_TICKING RETURN VARCHAR2
      2  IS
      3    ls_value VARCHAR2(100) DEFAULT 'NONE';
      4  BEGIN
      5    SELECT value
      6      INTO ls_value
      7      FROM V$PARAMETER
      8     WHERE name = 'fixed_date'
      9    ;
    10    IF ls_value = 'NONE'
    11    THEN
    12      RETURN 'TRUE';
    13    ELSE
    14      RETURN 'FALSE';
    15    END IF;
    16  EXCEPTION
    17  WHEN OTHERS THEN
    18    RETURN 'TRUE';
    19  END FN_IS_SYSDATE_TICKING;
    20  /
    Functie is aangemaakt.
    SQL> var v1 varchar2(5);
    SQL> exec :v1 := FN_IS_SYSDATE_TICKING;
    PL/SQL-procedure is geslaagd.
    SQL> print v1;
    V1
    FALSE{code}Note that I had to specify a length for the varchar2.
    Regards,
    Rob.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How to run an executable from command-line

    I'm learning how to use the Terminal and I got stuck in a silly thing (I suppose it is). How can I run an executable file from command-line in Terminal?
    For example: I have a file named "Hello" in the folder /sample. If I use the ls command (ls sample), I can see the file Hello. Then I move to the directory (cd /sample) and try to run the file Hello (typing "Hello") but I got "command not found" message.
    If I drag the Hello file from Finder to Terminal and hit Return, it runs perfectly. And if I type the full path to the file (even if I'm already inside its directory), it also runs.
    So, my doubt is if there is any command to run an executable from command-line.
    Thanks

    KJK555 wrote:
    Hi VK:
    Can you enlighten me on why it's neccessary to do the "./" thingy in OS X when in unix/linux
    I never had to resort to doing that?
    Kj
    I took the trouble of reading *man bash* and it explains the issue. to add the current directory to PATH you need to add an empty path to PATH like this
    PATH=$PATH::
    you can add it to ~/.bash_profile so that it's executed automatically when you start bash. I suspect the linux system you are talking about had this set up by default or had it added to PATH in /etc/profile which defines PATH globally.

  • How to execute ODI scenarios from command line in Unix

    Hi Friends,
    I am using ODI 11g.
    I want to execute ODI senarios using the command line argument in Unix.
    Please let me know how to proceed with this.
    Thanks,
    Lony

    Hi,
    unser the /your_ODI_HOME/agent/bin folder.
    Excute this
    sh startscen.sh REFRESH_ID 001 GLOBAL 5 -NAME=agent_ODI
    REFRESH_ID=Your Scenario name
    001:Version
    GLOBAL:Context name
    5=Log Level
    agent_ODI=Your agent name
    Regards

  • Executing DML-ing stored function from EntityManager

    Hi,
    Is there some way of getting the result from a DML-ing stored function from the EntityManager? I can use a native query and just select the function from dual if it doesn't do any DML but when it does, it is not permitted. I can't use getDelegate() to get the raw connection either :-/
    Edited by: nickarls on Sep 25, 2007 2:19 AM
    Edited by: nickarls on Sep 25, 2007 2:20 AM
    Hmmm. the *** should be "ing". Probably looks like a curse

    anyone, anyone?

  • I can not uninstall Office 2013 from command line

    Hi, I have been stuck for a while trying to uninstall Office 2013 via command line. Installation file was downloaded from Volume Licensing Service Center, Uninstall.xml file for silent uninstallation looks like this:
    <Configuration Product=”ProPlus”>
    <Display Level=”basic” CompletionNotice=”yes” SuppressModal=”yes” AcceptEula=”yes” />
    </Configuration>
    From command line the following will not work:
    setup /uninstall ProPlus /config .\ProPlus.ww\Uninstall.xml
    Error: Setup can not find or validate an installation file. Please try reinstalling Office . . .
    setup /uninstall ProPlus gives me GUI to continue process - it seems /config .\ProPlus.ww\Uninstall.xml part does not work as it should be
    This is very important to me since I used above command line in SCCM 2012 R2 to allow user to uninstall Office 2013 by itself via Software Center. When this failed I tried locally but the error was the same. This should have been trivial task - silent uninstallation
    using .xml file. It is not a rocket science. I am very angry because losing time for something like this is unacceptable for system engineers working with SCCM 2012 R2.

    Hi,
    This error might occurs due to lots of reasons. Where is the installation file stored? If it's stored on a network share, please copy it to your local disk, and then manually run the command again. This way, we'll see if the installation file is the
    problem.
    If issue persists in this case, then this generally means that something wrong with the installation file. Please try to redownload it and then try again.
    Please also make sure that you're executing the command with elevated privileges (run as administrator).
    Regards,
    Ethan Hua
    Forum Support
    Come back and mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback on our support, please click
    here

  • How to run a 10g report from command line ?

    Good Afternoon,
    Please advise if there is a way to run a 10g report from command line.
    We use 6i right now and our job scheduler runs reports using "D:\ORADEV6I\BIN\RWRUN60.EXE ..." executable in batch mode on a separate server. We plan to migrate to 10g Database, Forms, Reports. Is there a way to keep this functionality and create a "command" to address an report server and run a report?
    Thank you,
    Dmitri

    Steps to take.
    (1.) In command prompt type RWSERVER SERVER=repserver1 to star the rep server.
    (2.) If you get "Javaw.exe The procedure entry point psoasyn could not be located in the dynamic link library orapls10.dll." error do one of the following
            (a.) Type the full name for the server. D:\OracleDevR2\bin\rwserver SERVER=repserver1
                   or, if it does not work
            (b.) Add D:\OracleDevR2\bin to the system env. variable PATH
    (3.) Start OC4j
    (4.) Now you can access the jobs using URL like:
        http://192.161.11.143:8890/reports/rwservlet/showjobs?server=repserver1
          where 192.161.11.143 is your machine's IP address.

  • CMake behaves differently from within PKGBUILD and from command line

    Hi,
    I am currently struggling with an issue which I cannot find a solution. The problem is, I am trying to create a PKGBUILD for the CasADi code. The following is the PKGBUILD file written. My problem is the cmake configuration part. When the code is configured from the command line, without PKGBUILD, camke detects the -fopenmp flag for C and C++ compilers. For exactly the same compilers, cmake detects openmp for C compiler but fails to do so for the C++ compiler, when configuration is done from within the PKGBUILD file using makepkg.
    My question is, why different behaviors? Any suggestions on what is wrong?
    pkgname=casadi-git
    pkgver=0
    pkgrel=1
    pkgdesc="A symbolic framework for automatic differentiation and numeric optimization"
    arch=('i686' 'x86_64')
    url=""
    license=('GPL')
    groups=()
    depends=('sundials' 'ipopt' 'blas' 'lapack' 'python2')
    makedepends=('cmake' 'swig')
    checkdepends=()
    optdepends=()
    provides=('casadi')
    conflicts=()
    replaces=()
    backup=()
    options=()
    install=
    changelog=
    source=('casadi::git+https://github.com/casadi/casadi.git')
    md5sums='SKIP'
    build() {
    cd "$srcdir/casadi"
    sed -i 's/PythonLibs/PythonLibs 2.7/g' ./cmake_modules/FindNUMPY.cmake ./swig/CMakeLists.txt
    cmake . -DCMAKE_INSTALL_PREFIX=/usr \
    -DPYTHON_EXECUTABLE=/usr/bin/python2 \
    -DWITH_DL:BOOL=ON \
    -DWITH_LLVM:BOOL=OFF \
    -DWITH_PYTHON_INTERRUPTS:BOOL=ON \
    -DWITH_OPENMP:BOOL=ON \
    -DWITH_OOQP:BOOL=ON \
    -DWITH_DOC:BOOL=ON \
    -DWITH_OPENCL:BOOL=OFF
    make
    package() {
    cd "$srcdir/casadi"
    make DESTDIR="$pkgdir/" install
    Output when cmake is run from command line
    -- The C compiler identification is GNU 4.8.1
    -- The CXX compiler identification is GNU 4.8.1
    -- Check for working C compiler: /usr/bin/colorgcc
    -- Check for working C compiler: /usr/bin/colorgcc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- The Fortran compiler identification is GNU
    -- Check for working Fortran compiler: /usr/bin/gfortran
    -- Check for working Fortran compiler: /usr/bin/gfortran -- works
    -- Detecting Fortran compiler ABI info
    -- Detecting Fortran compiler ABI info - done
    -- Checking whether /usr/bin/gfortran supports Fortran 90
    -- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
    -- Flag needed for enabling C++11 features: -std=gnu++11
    -- x86_64 architecture detected - setting flag -fPIC
    -- Try OpenMP C flag = [-fopenmp]
    -- Performing Test OpenMP_FLAG_DETECTED
    -- Performing Test OpenMP_FLAG_DETECTED - Success
    -- Try OpenMP CXX flag = [-fopenmp]
    -- Performing Test OpenMP_FLAG_DETECTED
    -- Performing Test OpenMP_FLAG_DETECTED - Success
    -- Found OpenMP: -fopenmp
    -- Looking for Fortran sgemm
    -- Looking for Fortran sgemm - found
    -- Looking for include file pthread.h
    -- Looking for include file pthread.h - found
    -- Looking for pthread_create
    -- Looking for pthread_create - found
    -- Found Threads: TRUE
    -- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.1")
    -- A library with BLAS API found.
    -- Looking for Fortran cheev
    -- Looking for Fortran cheev - found
    -- A library with LAPACK API found.
    -- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
    -- checking for one of the modules 'ipopt'
    -- Detected an IPOPT configuration without development headers. Build will proceed, but without callback functionality. To enable it, see https://github.com/casadi/casadi/wiki/enableIpoptCallback
    -- Detected an IPOPT configuration without sIPOPT headers. Build will proceed, but without sIPOPT functionality.
    -- Found IPOPT: ipopt;lapack;blas;m;dl;coinmumps;pthread;blas;gfortran;m;gcc_s;quadmath;coinmetis
    -- Could not find KNITRO include dir
    -- Could not find KNITRO library
    -- Could not find CPLEX include dir
    -- Could not find CPLEX libraries
    -- Could not find MA57
    -- MA57 libraries not found. Falling back to MA27
    -- Could not find MA27
    -- Could not find OOQP include dir
    -- Could not find SNOPT include dir
    -- Found Snopt libs: /usr/lib64/libf2c.a;/usr/lib64/liblapack.so;/usr/lib64/libblas.so;dl
    -- Could not find MATLAB include dir
    -- Could not find Matlab libs
    -- Could not find SNOPT include dir
    -- Found Snopt libs: /usr/lib64/libf2c.a;/usr/lib64/liblapack.so;/usr/lib64/libblas.so;dl
    -- Could not find MATLAB include dir
    -- Could not find Matlab libs
    -- Found SWIG: /usr/bin/swig (found version "2.0.10")
    -- Found PythonLibs: /usr/lib64/libpython2.7.so (found suitable version "2.7.5", minimum required is "2.7")
    -- Python executable is /home/hamid/bin/python
    -- numpy.get_include() is /usr/lib/python2.7/site-packages/numpy/core/include
    -- Numpy path found: /usr/include/python2.7/numpy
    -- Python libs: /usr/lib64/libpython2.7.so
    -- Numpy includes: /usr/include/python2.7/numpy;/usr/include
    -- Numpy libs: /usr/lib64/python2.7/site-packages/numpy/core/multiarray.so
    -- Found PythonInterp: /home/hamid/bin/python (found version "2.7.5")
    -- Found Doxygen: /usr/bin/doxygen (found version "1.8.4")
    -- Found DOXYFILE_IN: /usr/src/AUR/build/casadi/src/casadi/documentation/api-doc/Doxyfile.in
    -- pyreport not found -- try 'easy_install pyreport'
    -- The following features have been enabled:
    * dynamic-loading , Compile with support for dynamic loading of generated functions (needed for ExternalFunction)
    * using-c++11 , Using C++11 features (improves efficiency and is required for some examples).
    * sundials-interface , Interface to the ODE/DAE integrator suite SUNDIALS.
    * csparse-interface , Interface to the sparse direct linear solver CSparse.
    * lapack-interface , Interface to LAPACK.
    * ipopt-interface , Interface to the NLP solver Ipopt.
    * qpoases-interface , Interface to the active-set QP solver qpOASES.
    * dsdp-interface , Interface to the interior point SDP solver DSDP (requires BLAS and LAPACK).
    -- The following OPTIONAL packages have been found:
    * OpenMP
    * LibXml2
    * BLAS
    * Threads
    * LAPACK
    * PkgConfig
    * IPOPT
    * SWIG
    * NUMPY
    * PythonInterp
    * Doxygen
    -- The following features have been disabled:
    * just-in-time , Just-in-time compiliation via the LLVM compiler framework.
    * opencl-support , Enable just-in-time compiliation to CPUs and GPUs with OpenCL.
    * get-ipopt , Download and build Ipopt.
    * knitro-interface , Interface to the NLP solver KNITRO.
    * cplex-interface , Interface to the QP solver CPLEX.
    * ooqp-interface , Interface to the QP solver OOQP (requires BLAS).
    * worhp-inteface , Interface to the NLP solver Worhp (requires LibXml2 headers).
    -- The following OPTIONAL packages have not been found:
    * KNITRO
    * CPLEX
    * MA57
    * MA27
    * OOQP
    * MATLAB
    * OCTAVE
    * LATEX
    * PYREPORT
    -- Configuring done
    -- Generating done
    Output when running makepkg
    -- The C compiler identification is GNU 4.8.1
    -- The CXX compiler identification is GNU 4.8.1
    -- Check for working C compiler: /usr/bin/colorgcc
    -- Check for working C compiler: /usr/bin/colorgcc -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Check for working CXX compiler: /usr/bin/c++
    -- Check for working CXX compiler: /usr/bin/c++ -- works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- The Fortran compiler identification is GNU
    -- Check for working Fortran compiler: /usr/bin/gfortran
    -- Check for working Fortran compiler: /usr/bin/gfortran -- works
    -- Detecting Fortran compiler ABI info
    -- Detecting Fortran compiler ABI info - done
    -- Checking whether /usr/bin/gfortran supports Fortran 90
    -- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
    -- Flag needed for enabling C++11 features: -std=gnu++11
    -- x86_64 architecture detected - setting flag -fPIC
    -- Try OpenMP C flag = [-fopenmp]
    -- Performing Test OpenMP_FLAG_DETECTED
    -- Performing Test OpenMP_FLAG_DETECTED - Success
    -- Try OpenMP CXX flag = [-fopenmp]
    -- Performing Test OpenMP_FLAG_DETECTED
    -- Performing Test OpenMP_FLAG_DETECTED - Failed
    -- Try OpenMP CXX flag = [/openmp]
    -- Performing Test OpenMP_FLAG_DETECTED
    -- Performing Test OpenMP_FLAG_DETECTED - Failed
    -- Try OpenMP CXX flag = [-Qopenmp]
    -- Performing Test OpenMP_FLAG_DETECTED
    -- Performing Test OpenMP_FLAG_DETECTED - Failed
    -- Try OpenMP CXX flag = [-openmp]
    -- Performing Test OpenMP_FLAG_DETECTED
    -- Performing Test OpenMP_FLAG_DETECTED - Failed
    -- Try OpenMP CXX flag = [ ]
    -- Performing Test OpenMP_FLAG_DETECTED
    -- Performing Test OpenMP_FLAG_DETECTED - Failed
    -- Try OpenMP CXX flag = [-xopenmp]
    -- Performing Test OpenMP_FLAG_DETECTED
    -- Performing Test OpenMP_FLAG_DETECTED - Failed
    -- Try OpenMP CXX flag = [+Oopenmp]
    -- Performing Test OpenMP_FLAG_DETECTED
    -- Performing Test OpenMP_FLAG_DETECTED - Failed
    -- Try OpenMP CXX flag = [-qsmp]
    -- Performing Test OpenMP_FLAG_DETECTED
    -- Performing Test OpenMP_FLAG_DETECTED - Failed
    -- Try OpenMP CXX flag = [-mp]
    -- Performing Test OpenMP_FLAG_DETECTED
    -- Performing Test OpenMP_FLAG_DETECTED - Failed
    -- Could NOT find OpenMP (missing: OpenMP_CXX_FLAGS)
    -- Looking for Fortran sgemm
    -- Looking for Fortran sgemm - found
    -- Looking for include file pthread.h
    -- Looking for include file pthread.h - found
    -- Looking for pthread_create
    -- Looking for pthread_create - not found
    -- Looking for pthread_create in pthreads
    -- Looking for pthread_create in pthreads - not found
    -- Looking for pthread_create in pthread
    -- Looking for pthread_create in pthread - found
    -- Found Threads: TRUE
    -- Found LibXml2: /usr/lib64/libxml2.so (found version "2.9.1")
    -- A library with BLAS API found.
    -- Looking for Fortran cheev
    -- Looking for Fortran cheev - found
    -- A library with LAPACK API found.
    -- Found PkgConfig: /usr/bin/pkg-config (found version "0.28")
    -- checking for one of the modules 'ipopt'
    -- Detected an IPOPT configuration without development headers. Build will proceed, but without callback functionality. To enable it, see https://github.com/casadi/casadi/wiki/enableIpoptCallback
    -- Detected an IPOPT configuration without sIPOPT headers. Build will proceed, but without sIPOPT functionality.
    -- Found IPOPT: ipopt;lapack;blas;m;dl;coinmumps;pthread;blas;gfortran;m;gcc_s;quadmath;coinmetis
    -- Could not find KNITRO include dir
    -- Could not find KNITRO library
    -- Could not find CPLEX include dir
    -- Could not find CPLEX libraries
    -- Could not find MA57
    -- MA57 libraries not found. Falling back to MA27
    -- Could not find MA27
    -- Could not find OOQP include dir
    -- Could not find SNOPT include dir
    -- Found Snopt libs: /usr/lib64/libf2c.a;-lpthread;/usr/lib64/liblapack.so;/usr/lib64/libblas.so;dl
    -- Could not find MATLAB include dir
    -- Could not find Matlab libs
    -- Could not find SNOPT include dir
    -- Found Snopt libs: /usr/lib64/libf2c.a;-lpthread;/usr/lib64/liblapack.so;/usr/lib64/libblas.so;dl
    -- Could not find MATLAB include dir
    -- Could not find Matlab libs
    -- Found SWIG: /usr/bin/swig (found version "2.0.10")
    -- Found PythonLibs: /usr/lib64/libpython2.7.so (found suitable version "2.7.5", minimum required is "2.7")
    -- Python executable is /usr/bin/python2
    -- numpy.get_include() is /usr/lib/python2.7/site-packages/numpy/core/include
    -- Numpy path found: /usr/include/python2.7/numpy
    -- Python libs: /usr/lib64/libpython2.7.so
    -- Numpy includes: /usr/include/python2.7/numpy;/usr/include
    -- Numpy libs: /usr/lib64/python2.7/site-packages/numpy/core/multiarray.so
    -- Found PythonInterp: /usr/bin/python2 (found version "2.7.5")
    -- Found Doxygen: /usr/bin/doxygen (found version "1.8.4")
    -- Found DOXYFILE_IN: /usr/src/AUR/build/casadi/src/casadi/documentation/api-doc/Doxyfile.in
    -- pyreport not found -- try 'easy_install pyreport'
    -- The following features have been enabled:
    * dynamic-loading , Compile with support for dynamic loading of generated functions (needed for ExternalFunction)
    * using-c++11 , Using C++11 features (improves efficiency and is required for some examples).
    * sundials-interface , Interface to the ODE/DAE integrator suite SUNDIALS.
    * csparse-interface , Interface to the sparse direct linear solver CSparse.
    * lapack-interface , Interface to LAPACK.
    * ipopt-interface , Interface to the NLP solver Ipopt.
    * qpoases-interface , Interface to the active-set QP solver qpOASES.
    * dsdp-interface , Interface to the interior point SDP solver DSDP (requires BLAS and LAPACK).
    -- The following OPTIONAL packages have been found:
    * LibXml2
    * BLAS
    * Threads
    * LAPACK
    * PkgConfig
    * IPOPT
    * SWIG
    * NUMPY
    * PythonInterp
    * Doxygen
    -- The following features have been disabled:
    * just-in-time , Just-in-time compiliation via the LLVM compiler framework.
    * opencl-support , Enable just-in-time compiliation to CPUs and GPUs with OpenCL.
    * get-ipopt , Download and build Ipopt.
    * knitro-interface , Interface to the NLP solver KNITRO.
    * cplex-interface , Interface to the QP solver CPLEX.
    * ooqp-interface , Interface to the QP solver OOQP (requires BLAS).
    * worhp-inteface , Interface to the NLP solver Worhp (requires LibXml2 headers).
    -- The following OPTIONAL packages have not been found:
    * OpenMP
    * KNITRO
    * CPLEX
    * MA57
    * MA27
    * OOQP
    * MATLAB
    * OCTAVE
    * LATEX
    * PYREPORT
    -- Configuring done
    -- Generating done

    With a little creativity, you can actually do all that from the command line with a single command. It'll look a little crazy, but it can be done.
    Whether the script exists on the local machine or not has zero to do with platform indpendence. You assumedly have to get the application onto the local machine, so including the script is not really an issue at all. However, you're talking about system independence, yet still wishing to run command line arguments? The two are mutually exclusive.

  • Error while running a Discoverer Workbook with parameter from command line

    I am trying to run a discoverer report from command line and export the results in xls on to my local machine. I could do it fine for a simple workbook, but if I add a parameter(madatory) to the workbook and run it from command line specifying the parameter value I wanted to run the report for, I do not get any results. Here is the command line I am using.
    dis51usr.exe /connect user/password@database /apps_user /apps_responsibility "System Administrator" /eul EUL_US /open C:\Disco\Test.DIS /sheet Testsheet /parameter Period Jan-07 /export xls C:\Disco\X.xls /batch
    Parameter value is entered in correct format(Jan-07).
    When I removed /batch from this to see if I get any error, Discoverer Desktop opened up, logged in and gets terminated saying 'Oracle Discoverer Desktop has encountered a problem and need to close. We are sorry for the inconvenience.'
    Did anybody come across this issue before?

    Hello,
    If you have a few minutes, Windows is also aborting for me:
    the differences are, my situation is:
    a) am running the command line from a .bat file
    b) am NOT running with parms, want the discoverer query to come up for the user
    c) am running a query from the database
    i am signing in as myself BUT running a query that was created by a generic user called SREG
    c) if i run the .bat file from Windows Explorer, the query opens fine
    d) if i execute the .bat file from within Microsoft Access using the shell command,
    the query opens and then aborts RIGHT BEFORE the parm screen would display
    e) btw, if i modify the .bat file, to run a query from MY database signon, then (d) - running .bat file
    from vb using SHELL command works
    Do you have a ideas as to why (d) does not work? I would be very grateful for your time, tx, sandra
    this is what i posted yesterday, tx: Re: Running Discoverer command line
    tx, sandra

  • Generating UDT from command line or C# code

    Hi,
    I want to write an application which is capable of generating UDTs and hence use the newly generated UDTs in C#. Right at the moment I can only generate the classes via the wizard in Visual Studio ("Generate Custom Class.."), but i know that e.g. for C++ it is possible to generate these types from command line - with OTT.
    I appreciate any help, finding a way to automatically generate the user defined types in C# (without manually mapping it).
    BR

    Hi Sathish,
    did you find a solution for this? I am looking for the same thing. I want to write a program(perl, batch script, etc.) which could automatically convert pdf to excel without any manual intervention.
    I have the acrobat javascript which could achieve this, but it can only be executed in arobat consolt.  I need it to be able to get executed in a script to automate the processing.
    thanks
    Warren

  • Problem with tokenized  input from command line

    I am trying to take an input from the command line, parse it to tokens and perform whatever operation is needed depending on the name of the token, on a binary tree of stacks for example, if i type 1 2 1 3 printLevelOrder, then the root of the tree should have 3, 2,1 in the stack, the left child should have 1 and the right child should be empty. and then a level order print of the tree should be performed.
    however what is happening when i run this code is the numbers are being put into the right stacks of the tree, but any commands such as printLevelOrder or PrintPopRoot are entering the code that is for placing numbers onto the stack instead of executing that command and skipping past this piece of code.
    so my question is, why is the if statement if (word =="printLevelOrder") not being executed when thats whats in the word ?
    example input and output shown below code fragment.
              try {
                  BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                 String line = "";
                 while (line != "***") {
                      System.out.print("> prompt ");
                      line = in.readLine();
                      StringTokenizer tokenizer = new StringTokenizer(line," ");
                      String word = new String();
                      while (tokenizer.hasMoreTokens()) {
                             word = tokenizer.nextToken();
                             boolean notCommand = true;
                             if (word =="printLevelOrder") {
                                  theTree.printLevelOrder();
                                  System.out.println("(word ==printLevelOrder)");
                                  notCommand=false;
                             if (word == "printPopLevelOrder") {
                                  theTree.printPopLevelOrder();
                                  notCommand=false;
                             if (word == "printPopInorder") {
                                  theTree.printPopInorder();
                                  notCommand=false;
                             if (word == "printPopPreorder") {
                                  theTree.printPopPreorder();
                                  notCommand=false;
                             if (word == "printPopRoot") {
                                  theTree.printPopRoot();
                                  notCommand=false;
                             if (word == "***") {
                                  notCommand=false;
                             if (notCommand == true) {
                                  System.out.println("(notCommand == true)");
                                  boolean notPlaced = true;
                                  int v = 1;
                                  while ((notPlaced==true) && (v < theTree.size())) {
                                       if (theTree.element(v).isEmpty()) {
                                            theTree.element(v).push(Integer.valueOf(word));
                                            System.out.println("Inserting"+word);
                                            System.out.println("in empty stack at location: "+v);
                                            notPlaced=false;
                                       if (notPlaced==true) {
                                            if (  Integer.valueOf(word) >= Integer.valueOf( theTree.element(v).top().toString() )  ) {
                                                 theTree.element(v).push(Integer.valueOf(word));
                                                 System.out.println("Inserting"+word);
                                                 System.out.println("in stack at location: "+v);
                                                 notPlaced=false;
                                       v++;
              }valid inputs: int value, printLevelOrder, printPopLevelOrder, printPopInorder, p
    rintPopPreorder, printPopRoot, *** to quit
    prompt 1 3 2 4 2 printLevelOrder(notCommand == true)
    Inserting1
    in empty stack at location: 1
    (notCommand == true)
    Inserting3
    in stack at location: 1
    (notCommand == true)
    Inserting2
    in empty stack at location: 2
    (notCommand == true)
    Inserting4
    in stack at location: 1
    (notCommand == true)
    Inserting2
    in stack at location: 2
    (notCommand == true)
    Exception in thread "main" java.lang.NumberFormatException: For input string: "printLevelOrder"
    at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
    at java.lang.Integer.parseInt(Integer.java:447)
    at java.lang.Integer.valueOf(Integer.java:553)
    at TreeStack.main(TreeStack.java:73)
    Press any key to continue . . .

    lol aww, shame that you forgot to do that. i had 10 / 10 for mine, and seing as the deadline is now well and trully over,
    here is the entire source for anybody who was following the discussion or whatever and wanted to experiment.
    additional files needed >
    http://users.cs.cf.ac.uk/Paul.Rosin/CM0212/Stack.java
    http://users.cs.cf.ac.uk/Paul.Rosin/CM0212/ArrayStack.java
    http://users.cs.cf.ac.uk/Paul.Rosin/CM0212/StackEmptyException.java
    http://users.cs.cf.ac.uk/Paul.Rosin/CM0212/StackFullException.java
    /*TreeStack.java - reads command line input of values and assigns them to stacks in a  binary tree and performs
    operations on the ADT. valid inputs: <int>,   printLevelOrder,   printPopLevelOrder,
    printPopInorder,   printPopPreOrder,   printPopRoot.         Terminates on invalid input.
    Written by George St. Clair.
    S/N:0208456         22/11/2005
    import java.util.Vector;
    import java.io.*;
    import java.util.StringTokenizer;
    public class TreeStack {
         private final int TREE_CAPACITY = 7 + 1;
         private final int STACK_CAPACITY = 10;
         Vector tree = new Vector(TREE_CAPACITY) ;
         //collect input from command line, add values to stacks at nodes of the teee
         //and perform required operations on the treestack
         public static void main (String [] args) {
              //create a tree of stacks
              TreeStack theTree = new TreeStack ();
              try {
                   //collect standard input
                  BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
                 String line = "";
                 while (line != null) {
                        System.out.print("");
                      line = in.readLine();
                      //tokenise input
                      StringTokenizer tokenizer = new StringTokenizer(line," ");
                      String word = new String();
                      while (tokenizer.hasMoreTokens()) {
                             //assign word to the token
                             word = tokenizer.nextToken();
                             boolean notCommand = true;
                             //perform operation on treestack depending on what word is
                             if (word.equals("printLevelOrder"))  {
                                  System.out.println("printLevelOrder");
                                  theTree.printLevelOrder();
                                  notCommand=false;
                             if (word.equals("printPopLevelOrder"))  {
                                  System.out.println("printPopLevelOrder");
                                  theTree.printPopLevelOrder();
                                  notCommand=false;
                             if (word.equals("printPopInorder"))  {
                                  System.out.println("printPopInorder");
                                  theTree.printPopInorder();
                                  notCommand=false;
                             if (word.equals("printPopPreorder"))  {
                                  System.out.println("printPopPreorder");
                                  theTree.printPopPreorder();
                                  notCommand=false;
                             if (word.equals("printPopRoot"))  {
                                  System.out.println("printPopRoot");
                                  theTree.printPopRoot();
                                  notCommand=false;
                             //if word was not a command it must be a number
                             if (notCommand == true) {
                                  boolean notPlaced = true;
                                  int v = 1;
                                  //starting at the root, find suitable place for number
                                  while ((notPlaced==true) && (v < theTree.size())) {
                                       //if the stack at v is empty, number goes here
                                       if (theTree.element(v).isEmpty()) {
                                            theTree.element(v).push(Integer.valueOf(word));
                                            System.out.println("inserting: "+word);
                                            System.out.println("in empty stack at location: "+(v-1));
                                            notPlaced=false;
                                       //if the stack is not empty
                                       if (notPlaced==true) {
                                            //if the value on the top of the stack is smaller than number, number goes onto the stack
                                            if (  Integer.valueOf(word) > Integer.valueOf( theTree.element(v).top().toString() )  ) {
                                                 theTree.element(v).push(Integer.valueOf(word));
                                                 System.out.println("inserting: "+word);
                                                 System.out.println("in stack at location: "+(v-1));
                                                 notPlaced=false;
                                       //if that node was no good, check the next one for suitability
                                       v++;
              catch (Exception e) {
                   //occurs when user inputs something that is neither a command, or a number, or upon EOF, or stack is full
         public TreeStack () {
              //create the TreeStack ADT by adding stacks in the vector, note vector 0 is instantiated but not used.
              for (int i = 1;i<=TREE_CAPACITY;i++)
                   tree.add(new ArrayStack(STACK_CAPACITY));
         public int size() {
              //return the size of the tree +1 (as 0 is not used)
              return tree.size();
         public ArrayStack element (int v) {
              //return the ArrayStack at v
              return (ArrayStack)tree.get(v);
         public int leftChild (int v ) {
              //return left child of v
              return v*2;
         public int rightChild (int v ) {
              //return the right child of v
              return v*2+1;
         public boolean children (int v ) {
              //search for children of v and return true if one exists
              for (int i =v;i<size();i++) {
                   if (i/2==v ) {
                         //left child found at i
                         return true;
                   if ((i-1)/2==v ) {
                        //right child found at i
                        return true;
              //no children found
              return false;
         public boolean isInternal (int v ) {
              //test whether node v is internal (has children)
              if (children (v)== true) {
                   //has children
                   return true;
              return false;
         //print the top value in each stack encountered on a level-order traversal of tree
         public void printLevelOrder() {
              //for every node of tree v
              for (int v = 1;v<size();v++) {
                   if (!element(v).isEmpty() ) {
                        //print the top value in stack v
                        System.out.println(" "+element(v).top());
                   else {
                        //stack at v is empty
                        System.out.println(" -");
         //pop off and print the top value in each stack encountered on a level-order traversal of tree
         public void printPopLevelOrder () {
              //pop off and print the top value in stack v
              for (int v = 1;v<size();v++) {
              //for each node of tree v
                   if (!element(v).isEmpty() ) {
                        //if v isnt empty print the top value in stack v
                        System.out.println(" "+element(v).top());
                        //pop the top value in the stack at v
                        element(v).pop();
                   else {
                        //stack at v is empty
                        System.out.println(" -");
         //pop off and print the top value in each stack encountered on an in-order traversal of tree
         public void printPopInorder () {
              printPopInorder (1);
         public void printPopInorder (int v) {
              boolean isInternal = false;
              if (isInternal (v)) {
                   //use a boolean for isInternal to save on running the method twice
                   isInternal = true;
                   //recursively search left subtree
                   printPopInorder (leftChild(v));
              //pop off and print the top value at v
              if (element(v).isEmpty() ) {
                   //stack at v is empty
                   System.out.println(" -");
              else {
                   //if v isnt empty print the top value in stack v then pop
                   System.out.println(" "+element(v).top());
                   element(v).pop();
              if (isInternal ) {
                   //recursively search right subtree
                   printPopInorder (rightChild(v));
         //pop off and print the top value in each stack encountered on an pre-order traversal of tree
         public void printPopPreorder() {
              printPopPreorder(1);
         public void printPopPreorder(int v) {
              //pop off and print the top value at v
              if (!element(v).isEmpty() ) {
                   //if v isnt empty print the top value in stack v then pop
                   System.out.println(" "+element(v).top());
                   element(v).pop();
              else {
                   //stack at v is empty
                   System.out.println(" -");
              if (isInternal (v)) {
                   //recursively search left and right subtrees
                   printPopPreorder (leftChild(v));
                   printPopPreorder (rightChild(v));
         //pop off and print all values from the stack at the root
         public void printPopRoot (){
              //while the root stack has values left
              while (!element(1).isEmpty()) {
                   //print, then pop
                   System.out.println(" "+element(1).top());
                   element(1).pop();
    }

  • Query runs from command line, but not from scheduler

    We use Control-M to schedule shell scripts to be run on a Solaris server. Some of the scripts have to access an Oracle database and in that case our security team will include the DB user and password in the script, then encrypt it and the sys admin team schedules the encrypted shell script with Control-M. That works fine, but we've been trying to have the DB user and password on a separate encrypted file so that we don't have to ask for file encryption every time it's necessary to modify a script (this is a test environment).
    We have the script at ~/system_name/scripts, the query at ~/system_name/sql and the encrypted file and key at ~/system_name/keys. The SQLPlus call in the script is:
    ${ORACLE_HOME}/bin/sqlplus "`decrypt -a 3des -k ./../keys/key.3des.system -i ./../keys/login.system`"@instance_name <<EOF
    @${DIR_SQL}/TEST_QUERY.SQL
    quit
    EOF
    The security analyst has tested is successfully from command line, but when we schedule it with Control-M the job abends and we get the following in the sysout:
    + decrypt -a 3des -k ./../keys/key.3des.system -i ./../keys/login.system
    decrypt: cannot open ./../keys/key.3des.system
    decrypt: invalid key.
    + /u00/app/oracle/product/11.1.0/db_1/bin/sqlplus @instance_name
    + 0<<
    @/sistemas/hmp/system_name/sql/TEST_QUERY.SQL
    quit
    SQL*Plus: Release 11.1.0.6.0 - Production on Mon May 3 09:41:55 2010
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    SP2-0310: unable to open file "instance_name.sql"
    Enter user-name: SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER|SYSASM}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] [edition=valu\
    e] | /
    SP2-0306: Invalid option.
    Usage: CONN[ECT] [logon] [AS {SYSDBA|SYSOPER|SYSASM}]
    where <logon> ::= <username>[<password>][@<connect_identifier>] [edition=valu\
    e] | /
    Enter password:
    ERROR:
    ORA-12545: Connect failed because target host or object does not exist
    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus
    0000000080
    Any ideas?

    Looks like the command is being split in some way - the connection to sqlplus is being made before it completes the whole string
    It appears to be seeing the @instance_name as a script to execute rather than a db to connect to.
    Is the database on the same server as the script?
    If so, try setting your environment to the correct databsae, so that you can omit the @instance_name part of the syntax and see if it helps
    Also just noticed the failure to open the decrypt script. It would appear uyou are not using a full path name. Have you checked which directroy the scheduled job starts in? You may need to look at running some environment specific scripts first.
    Edited by: LindaA on 05-May-2010 07:43

  • Executing a stored proc from inside a stored proc

    Hi,
    I'm trying to execute a stored procedure from inside another stored procedure, and I can't seem to work out the correct syntax to use, could someone please give me a pointer, it's starting to drive me insane :]
    CREATE OR REPLACE PROCEDURE foo (blah in type) AS
    BEGIN
    EXEC OTHER_STORED_PROC();
    END;
    Thank you kindly,
    Anthony...

    EXEC is a SQL*Plus command, not PL/SQL syntax. In SQL*Plus, EXEC <<procedure name>> is just shorthand for
    BEGIN
      <<procedure name>>
    END;Calling a stored procedure from another stored procedure (or any PL/SQL block), can bypass the extra begin/end pair because it's already inside a PL/SQL block. Thus, the syntax you need is just
    CREATE OR REPLACE PROCEDURE foo (bar IN type)
    AS
    BEGIN
      other_stored_procedure();
    END;Justin
    Distributed Database Consulting, Inc.
    www.ddbcinc.com/askDDBC

Maybe you are looking for

  • 'Session timeout" appears when creating account

    I am trying to create an iTunes account because I bought an iTunes gift card. Every time I try to create an account in the Music Store, and straight after I have accepted the terms and conditions, a screen comes up saying "Session timeout". I have ne

  • How to display error message in front end application

    Hi Expert,      I have one concurrent program that used to activate and deactivate the responsibilities , I want that if any error occured in this program then how can I display the error message in application front end. Thanks in advance.

  • Help running Java apps in Mac OS 10.1.3

    I'm currently taking an intro course to Java and I've been using the OS 10.1.3 Unix Shell to compile and run my assignments, using the "javac" command to compile my classes and the "java" command to run them. It's been working fine until a few days a

  • XML Schemas and "Type"

    I'm having a brutal time working with this program, it doesn't even seem like it should be this hard. I won't get in to the situation yet, I keep tripping across other problems as I go. Here's the next one: According to Eclipse, I'm not allowed to pu

  • Why are my web pages appearing in a list format instead of their usual appearance?

    When I access my Yahoo home page as well as other pages, the site appears as a menu rather than in it's normal format, I cannot find any function that will allow me to change it back, Internet Explorer does not have this problem so I am fairly certai