External procedure call for cobol programs

I'm trying to call cobol programs using external procedure calls. I followed metalink doc#119543.1 but when the cobol shared library is called from PL/SQL, the session hangs. I'm running Oracle 9.2.0.4 EE, Microfocus Server Express 2.2, C for AIX v6, and AIX 5.2 (64-bit). If you know how to get this working or you have a working test case, please post a reply. Thanks.

You know that there are several steps to it :
1.- Make a library from cobol a the source code in a file
2.- Check the listener parameters to call external procedures and the service in the client
3.- Make a library inside the database
4.- Create the procedure that is going to call the
procedure.
Did you do those steps?
Joel P�rez

Similar Messages

  • Cannot get external procedural call in Oracle RAC Environment

    Cannot get external procedure call to work in our test RAC env.
    We are able to get it to work in our DEV env which is a single instance
    LISTENER.ORA:
    NODE1:
    # listener.ora Network Configuration File: /opt/oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    LISTENER_SBLBGT01 =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sblbgt01-vip1)(PORT = 1521)(IP = FIRST))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.41.1.21)(PORT = 1521)(IP = FIRST))
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /opt/oracle/app/oracle/product/10.2.0/db_1)
    (PROGRAM = extproc)
    (ENVS="EXTPROC_DLLS=ANY")
    NODE2:
    # listener.ora.sblbgt02 Network Configuration File: /opt/oracle/app/oracle/product/10.2.0/db_1/network/admin/listener.ora.sblbgt02
    # Generated by Oracle configuration tools.
    LISTENER_SBLBGT02 =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = sblbgt02-vip2)(PORT = 1521)(IP = FIRST))
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.41.1.22)(PORT = 1521)(IP = FIRST))
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = PLSExtProc)
    (ORACLE_HOME = /opt/oracle/app/oracle/product/10.2.0/db_1)
    (PROGRAM = extproc)
    (ENVS="EXTPROC_DLLS=ANY")
    2) ### If you are receiving errors, please list exact error messages and text: ###
    (cont 1.)
    tnsnames.ora (on both nodes):
    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = IPC)(KEY = extproc))
    (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO)))
    [opt/oracle/app/oracle/product/10.2.0/db_1/network/admin]> tnsping EXTPROC_CONNECTION_DATA
    TNS Ping Utility for Solaris: Version 10.2.0.3.0 - Production on 11-APR-2011 10:52:49
    Copyright (c) 1997, 2006, Oracle. All rights reserved.
    Used parameter files:
    /opt/oracle/app/oracle/product/10.2.0/db_1/network/admin/sqlnet.ora
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = IPC)(KEY = extproc)) (CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO)))
    OK (0 msec)
    Calling External Procedure:
    SQL> execute ttran.shell('ls');
    BEGIN ttran.shell('ls'); END;
    ERROR at line 1:
    ORA-28575: unable to open RPC connection to external procedure agent
    ORA-06512: at "TTRAN.SHELL", line 1
    ORA-06512: at line 1

    Any Reply Please...
    would appreciate your help...

  • External Procedure Call: Temporary Blob Array out.

    Hello,
    I am having difficulty getting out an array of blob from the external procedure call interface. I am trying to create an array of blob initialized with temporary blobs. I was successfully able to create single blob parameter out but no success with the array type.
    I am including the code for PLSQL wrapper, test code, and the main C code.
    I appreciate your help.
    The error message of the test run:
    0
    10
    DECLARE
    ERROR at line 1:
    ORA-22275: invalid LOB locator specified
    ORA-06512: at "SYS.DBMS_LOB", line 554
    ORA-06512: at line 7
    CREATE OR REPLACE PROCEDURE blob_coll (
    cintarray IN OUT VDC_BLOB_ARRAY ) IS
    LANGUAGE C
    NAME "blob_coll"
    LIBRARY sjc_lib WITH CONTEXT
    PARAMETERS (
    context,
    cintarray OCIColl);
    DECLARE
    BLOBARRAY VDC_BLOB_ARRAY:= VDC_BLOB_ARRAY();
    BEGIN
    dbms_output.put_line( BLOBARRAY.count);
    SCOTT.BLOB_COLL ( BLOBARRAY );
    dbms_output.put_line( BLOBARRAY.count);
    dbms_output.put_line( dbms_lob.getlength( BLOBARRAY(1)));
    END;
    void blob_coll( OCIExtProcContext *ctx,
    OCIColl **cintarray )
    sword status;
    int i;
    OCILobLocator *lobp[10];
    status = OCIExtProcGetEnv( (OCIExtProcContext *)ctx, (OCIEnv **)&envhp,
    (OCISvcCtx **)&svchp, (OCIError **)&errhp );
    for (i=0; i < 10; i++)
    status=OCIDescriptorAlloc( (dvoid *)envhp, (dvoid **) &lobp,
    (ub4)OCI_DTYPE_LOB, (size_t)0, (dvoid**)0);
    status=OCILobCreateTemporary((dvoid *)svchp,
    (dvoid *)envhp,
    lobp[i], (ub2)0, SQLCS_IMPLICIT,
    OCI_TEMP_BLOB, OCI_ATTR_CACHE,
    OCI_DURATION_SESSION);
    status = OCICollAppend( (OCIEnv *)envhp,(OCIError *)errhp,
    (CONST dvoid*) lobp[i],
    (CONST dvoid*)0,
    (OCIColl *)*cintarray);

    The "X" in the second registerOutParameter is the type name which
    you have created in oracle DB.
    eg. if you have created a nested table
    create Type integer_table is table of number(10);
    then "X" = "INTEGER_TABLE" and it has to be in caps
    and other thing to keep in mind is that it only works with nested
    table or varray and not with pl/sql table.
    Al Pivonka (guest) wrote:
    : How can I pass pl/sql record in and out
    : and pl/sql tables in out thru a pl/sql procedure using jdbc
    with
    : the zip file of 816classes12.zip...
    : I have tried everything I know...
    : I know the procedure is working, others are using it with in
    : Oracle...
    : I need to use the information it generates.
    : here is what I have so far...
    : try
    : Class.forName ("oracle.jdbc.driver.OracleDriver");
    : DriverManager.registerDriver (new
    : oracle.jdbc.driver.OracleDriver());
    : oracle.jdbc.driver.OracleConnection conn =
    : (oracle.jdbc.driver.OracleConnection
    : DriverManager.getConnection
    ("jdbc:oracle:thin:@--","NA","NA");
    : // SQL92 SyntaxCallableStatement
    : oracle.jdbc.driver.OracleCallableStatement cstmt =
    : (oracle.jdbc.driver.OracleCallableStatement)conn.prepareCall
    : ("{call cbmd_proposal_PKG.DefaultTerms (?,?,?,?)}" ) ;
    : cstmt.setString(1,"5118");
    : cstmt.setString(2,"3");
    : cstmt.registerOutParameter
    : (2,oracle.jdbc.driver.OracleTypes.NUMBER);
    : cstmt.registerOutParameter
    (1,oracle.jdbc.driver.OracleTypes.ARRAY,"X");
    : cstmt.execute();
    : catch(Exception e)
    : System.err.println(e.toString());
    : e.printStackTrace();
    : The "X" in the second registerOutParameter is still unknown to
    : me.
    : The JavaDoc for the
    OracleCallableStatement.registerOutParameter
    : is not clear.
    : Can any One help simplify this...
    : Thanks
    null

  • External procedure calls supported?

    Are external procedure calls supported? Should be, right?
    I didn't find anything in the documentation and the directory $ORACLE_HOME/rdbms/extproc doesn't exist either.
    But the binary $ORACLE_HOME/bin/extproc is there.
    Thanks,
    ~Dietmar.

    Hi Sven,
    you have beaten me again ;). I'm too slow.
    "Any errors that occur during the execution of the
    job will be returned as errors to the RUN_JOB
    procedure."True, when the job cannot be executed, a plsql exception is raised.
    I just don't get the exit code back. If something goes wrong inside the executable, I want to be able to detect that. Usually the called script sets an exit code for that purpose.
    >>How do I get a handle on the LOG_ID?
    Are they any public variable in dbms_scheduler. e.q.
    LastLogID ;-) ?No, I 've checked the package. But the exit code doesn't seem to be logged either. error# in USER_SCHEDULER_JOB_RUN_DETAILS is 0, even when the exit code is set to non-zero.
    See the following sample:
    File: error_throw.cmd
    exit /b 1I have checked that the exit code handling works using this script:
    @echo off
    call error_throw.cmd
    IF ERRORLEVEL 3 GOTO errhandler
    IF ERRORLEVEL 2 goto errhandler
    IF ERRORLEVEL 1 goto errhandler
    echo "successful run"
    goto end
    :ERRHANDLER
    echo errorlevel
    :ENDand I called it using:
    begin
      DBMS_SCHEDULER.create_job (
        job_name        => 'GO_SYNC',
        job_type        => 'EXECUTABLE',
        job_action      => 'C:\temp\dosBatch\error_throw.cmd',
        enabled         => FALSE,
        comments        => 'Synchronously run command.');
    end;
    BEGIN
      -- Run job synchronously.
      DBMS_SCHEDULER.run_job (job_name            => 'GO_SYNC',
                              use_current_session => TRUE);
      -- Remove job after run
      DBMS_SCHEDULER.DROP_JOB('GO_SYNC');
    END;
    /~Dietmar.
    daust: wrong command file called: error_throw.cmd instead of error_handle.cmd

  • External Procedure call - wait event - no response

    Executing SQL that use external library - I dont get any response
    I see wait event as 'External Procedure call' and no response, no errors are thrown.
    Am I missing something or how do I troubleshoot further...
    Your help very much appreciated.
    Please note I have no entry in TNSNAMES.ORA or LISTENER.ORA file for extproc connections.
    Oracle DB - Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    Listener - TNSLSNR for Linux: Version 11.2.0.3.0
    OS - Red Hat Enterprise Linux Server release 6.5
    DLL entry done ONLY in "/apps/oracle/product/11.2.0/dbhome_1/hs/admin/extproc.ora"
    SET EXTPROC_DLLS=ANY
    OS Environment LD_LIBRARY_PATH=
    LD_LIBRARY_PATH=/apps/oracle/product/11.2.0/dbhome_1/lib
    DLL File permission
    -rwxrwxr-x  1 oracle oinstall   8022832 Mar  6 12:55 libst_shapelib.so
    OS EXTPROC process is running
    oracle   17489     1  0 09:08 ?        00:00:00 extprocGISDEV (DESCRIPTION=(LOCAL=YES)(ADDRESS=(PROTOCOL=BEQ)))
    Library Path set at schema level as below
    select * from dba_libraries where library_name = 'ST_SHAPELIB';
    OWNER                          LIBRARY_NAME                   FILE_SPEC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        DYNAMIC STATUS
    SDE                            ST_SHAPELIB                    /apps/oracle/product/11.2.0/dbhome_1/lib/libst_shapelib.so                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       Y       VALID  

    Hello,
    This is posted in the incorrect community.  I think you need to be in SQL and PL/SQL
    Regards,
    Matt

  • OS Authentication problems during external procedure calls

    Hi,
    Here's our setup: Oracle 9i on Windows OS
    1. Created an OS ID = TESTID on domain = MYDOMAIN
    MYDOMAIN\TESTID
    2. Granted the necessary OS rights on MYDOMAIN\TESTID and assigned it to start/stop the external procedure listener service. The ID has "deny logon locally" policy applied to it on Windows OS.
    3. Restarted the external procedure listener service so that the changes would take effect.
    4. Created an ID on the Oracle DB as OPS$MYDOMAIN\TESTID (identified externally)
    5. Assigned the necessary DB privs to the ID (including create session)
    6. Set the registry entry:
    HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\OSAUTH_PREFIX_DOMAIN = TRUE
    7. On one of our application modules (oracle forms) we triggered an external procedure call and it failed with:
    ORA-01017: invalid username\password
    We used to call the same external procedure before and we never had problems with it. The setup before was that the IDs are on the local server. We had to move the server to MYDOMAIN which is why we did the steps listed above.
    I don't have a clue why the external procedure calls keeps on failing with the new setup. Need your advise on this.
    Below are some of our DB init parms:
    remote_login_password_file = EXCLUSIVE
    remote_os_authent = FALSE
    remote_os_roles = FALSE
    os_authent_prefix = OPS$
    thanks.

    I don't remember noticing an option to set how many passes it will go through. There were two options - you can either write zeros to the drive or do the 8-way random write, where it writes random data across the drive in a random pattern 8 times.
    If there is an amount of passes you can set with the zeros, I did whatever the default one is.
    It's 4:13 now. If it hasn't moved by 5, should I shut down and try again when I return to work tomorrow?
    Jason

  • Remote external procedure call ORA-28576

    Hi,
    I have to call an external procedure (c program) which is in another(remote) host system.
    I have created a simple c program and when i call it from the same database host (Oracle 11.2.0.3 in linux 2.6.39) every thing work fine, but when i call it from another database found in a remote host (Oracle 11.2.0.3 HP-UX 11iv3) i receive these error "ORA-28576". The "extproc" program was started by the listener (i can see that in the listener logfile) but then the connection was aborted.
    So my question is can i call remote external proc program from a remote host ? if yes how can i do that ? thanks for help
    Configuration :
    listener.ora
    LISTENER =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = MYHOST)(PORT = 1521))
    SID_LIST_LISTENER =
        (SID_LIST=
            (SID_DESC= (SID_NAME=callout)
            (ORACLE_HOME=/app/oracle/11.2.0.3)
            (ENVS = 'EXTPROC_DLLS=/tmp/test.so')
            (PROGRAM=extproc)
    tnsnames.ora
    extproc_connection_data =
       (DESCRIPTION =
           (ADDRESS = (PROTOCOL=tcp)(host=MYHOST)(port=1521))
           (CONNECT_DATA=(SID=callout))
    test.c
    #include <stdio.h>
    int square(int x)
    return((x*x) + 1); //adds 1 to the return value
    PL/SQL code
    CREATE DATABASE LINK agent_link USING 'extproc_connection_data';
    CREATE OR REPLACE LIBRARY test_lib IS '/tmp/test.so' AGENT 'agent_link';
    CREATE OR REPLACE FUNCTION test_proc (X BINARY_INTEGER) RETURN BINARY_INTEGER
    AS
    EXTERNAL LIBRARY test_lib
    NAME "square"
    LANGUAGE C;
    CREATE OR REPLACE PROCEDURE EXTPROCTEST (X BINARY_INTEGER)
    AS
       RetValue   BINARY_INTEGER;
    BEGIN
       RetValue := test_proc (X);
       DBMS_OUTPUT.PUT_LINE (RetValue);
    END;
    SET SERVEROUTPUT ON
    EXECUTE EXTPROCTEST(10);

    Hi,
    I found the answare, it seem that for security reason the listener,extproc agent and the instance must be on the same host.
    Reference : (http://docs.oracle.com/cd/E11882_01/appdev.112/e10825/pc_07pls.htm#sthref1051)
    >
    The database server, the agent process, and the listener process that spawns the agent process must all reside on the same host.
    >
    >
    For security reasons, extproc, by default, loads only DLLs that are in directory $ORACLE_HOME/bin or $ORACLE_HOME/lib. Also, only local sessions—that is, Oracle Database client processes that run on the same system—are allowed to connect to extproc.

  • External Procedure call from Trigger

    I'd like to call an external C Procedure from
    an Oracle Trigger.
    In trying to get an example to work, after setting up the listener and tnsnames.ora for external procedures, the following SQL*Plus command behaves strangely:
    CREATE LIBRARY TTest as "c:\winnt\system32\TTrigger.dll";
    After entering this, the command line prompts for more data as if the command was not terminated. Tried single quotes, double quotes, forward slash, backward slash...
    What is wrong with this command?
    Thanks

    hi,
    COuld you send me the configuration parameters for listner and TNSNAMES? I am working so hard to set it up but getting stuck and I am sure that I am missing some configuration set up.
    Please could you mail your tnsname a nd listner files to bellow shown address?
    [email protected] ?
    Thanks in advance
    Suresh

  • Getting "ORA-28576: lost RPC connection to external procedure agent" for R scripts.

    Hello,
    I am trying R integration with OBIEE. As part of this, I have created a simple R script for a scatter plot. Below is the R script
    begin
      sys.rqScriptCreate('randomRedDots',
                         'function()
                            res <- 1:10
                            plot(1:100, rnorm(100), pch=21, bg="red", cex=2)
                            res
    end;
    I am testing this script in SQL Developer by executing the below sql:
    select image
    from table(rqEval(NULL,
                      'PNG',
                      'randomRedDots')
    During these tests, very often, I get ORA-28576 error when I run the SQL. The complete error is:
    ORA-28576: lost RPC connection to external procedure agent
    ORA-06512: at "RQSYS.RQEVALIMPL", line 77
    ORA-06512: at "RQSYS.RQEVALIMPL", line 74
    28576. 00000 -  "lost RPC connection to external procedure agent"
    *Cause:    A fatal error occurred in either an RPC network connection,
               the extproc agent, or the invoked 3GL after communication had
               been established successfully.
    *Action:   First check the 3GL code you are invoking; the most likely
               cause of this error is abnormal termination of the
               invoked "C" routine. If this is not the case, check for
               network problems. Correct the problem if you find it. If all
               components appear to be normal but the problem persists, the
               problem could be an internal logic error in the RPC transfer
               code.  Contact your customer support representative.
    However, if I re-run the SQL, I do not get this message. This happens at random.
    Any pointers to why this error occurs?
    Thanks,
    Abhishek

    Abhishek,
    Please look for a core file in $ORACLE_HOME/hs/log and look for errors in the call stack associated with the core file.
    Examining the errors will help identify the cause of the intermittent ORA-29576 error.
    Thank you,
    Sherry

  • Call From Cobol Program on OS 390

     

    Don Ferguson <[email protected]> writes:
    What does IBM offer in this space? I guess its possible to envisage
    calling an EJB from a COBOL program over IIOP, but no-one has tried
    it. If this is how IBM does it then it should work with us also under 6.1
    andy
    Roman wrote:
    Hi .
    Try to WLS6 and WTC -- weblogic tuxedo connector and Elink 4 for connectivity
    between OS390 CICS and Tuxedo.
    IBM Websphere offers more as for EJB - OS390 system. But Weblogic is better
    J2EE server (global view), in my opinion.
    Roman
    "Cameron Purdy" <[email protected]> wrote:
    I'd suggest CORBA (2.3 or later).
    Cameron Purdy
    Tangosol, Inc.
    http://www.tangosol.com
    +1.617.623.5782
    WebLogic Consulting Available
    "Marc Lenart" <[email protected]> wrote in message
    news:3a8956f2$[email protected]..
    Can you steer me in the right direction as to how I can call a sessionbean from a
    cobol program on the OS390 platform? An example wouyld be helpful.Thank
    You!

  • BRF+ - Help Needed for Procedure Call for FM RFC_READ_TABLE

    Dear Guru,
    This is meant to be a prototype.  Scenario is this based on a Centralize BRF+ Services with Satalite Systems.  In this context lets assume two SAP Box. Box A (SAP ERP), Box B (BRF+ Server 7.02 NW SP6)
    Busienss Rule is simple - Expose Customer Validation Service in BRF+ with Input of One Field (KUNNR) and Output of BOOLEAN (Yes, No).
    Suggested Function Module - RFC_READ_TABLE with Destination in Box A(SAP ERP).
    RFC_READ_TABLE
    My question is:
    1. Is Procedure Call Expression the right object to use for RFC?
    2. Where can I specify the RFC Destination?
    3. If not, should I create a New Function Module Wrapper that meant to call RFC_READ_TABLE with Destination?
    4. Procedure Call Expression WebDynpro,  I am not able to specify "Assigned Value" for Parameter "OPTIONS" which is a table.
    I am able to specify other Parameters such as "QUERY_TABLE" and "OPTIONS"
    Thanks
    Leonard
    Edited by: Leonard Tan on Mar 19, 2011 6:26 AM

    I would create a local wrapper FM on BOX B to call into Box A for the table read. Maybe this would also allow to buffer the data locally in case it has to be read multiple times.
    The procedure call as of today does not allow to do remote calls. Therefore you have no option to specify an RFC destination.
    For the use of tables maybe create an error message. I could not follow your instructions.
    Also consider to implement SP7 as soon as it is available. We did quite some corrections.

  • External procedure call error in RAC

    I met a strange problem today with Oracle RAC 10.2.0.4:
    Situation I:
    In the sequence of tnsnames.ora or TAF, put NodeA before NodeB, everything works well. Even if NodeA is down and only NodeB works.
    Situation II:
    If put NodeB before NodeA, strange things happened.
    1) I can connect to via type2(tnsnames) or type4(url) via sqlplus, and I can also call my extproc in sqlplus.
    2) If I call external procedure via API, whatever type2 or type4, it will report "ORA-06576: not a valid function or procedure name"
    RAC should share anything on both nodes, why Situation I and Situation II have different behaviour? Can anyone help me? Thanks!

    Thanks.
    In fact, using the supplied makefile in $ORACLE_HOME/plsql/demo and MAKING SURE THAT THE .SO IS EXECUTABLE(!) works.

  • Error mapping function in external procedure call

    I'm trying to create an external procedure in PL/SQL8.1 to run an operating system command from within a PL/SQL block.
    The C function couldn't be simpler:
    extern void host_command(char *command)
    (void)system(command);
    It's even ignoring the return value of SYSTEM!
    I've generated what I THINK is a shared object file and copied it to $ORACLE_HOME/lib/host_command.so
    I've then done CREATE LIBRARY HOST_COMMAND_LIB as '...'
    Then I created a PL/SQL procedure:
    CREATE PROCEDURE SHELL(IP_COMMAND IN VARCHAR2)
    AS
    LANGUAGE C
    NAME "host_command"
    LIBRARY HOST_COMMAND_LIB
    PARAMETERS (IP_COMMAND);
    And then EXEC SHELL ('touch /tmp/fred')
    That's when ORA-6521 is raised.
    I am running Oracle8.1.7.4.0 on AIX 4.3
    Am I missing something?
    Any suggestions will be thankfully received.
    Andrew Hunter

    Thanks.
    In fact, using the supplied makefile in $ORACLE_HOME/plsql/demo and MAKING SURE THAT THE .SO IS EXECUTABLE(!) works.

  • Unexpected error msg returned by stored procedure (called by 'C' program)

    My 'C' code is calling an Oracle stored procedure that can either return a record or not ~ depending on if rows already exist having the existing coordinates. In this case, there are not any existing records so I would expect the stored procedure to return an error code of 100 ~ for "no rows found". Instead, it is returning ORA-21000: error number argument to raise_application_error of 100". Do I need to change my 'C' code to look for a return code of -21000 to represent "no rows found" from my stored procedure, or is error code 100 still what I should be checking for and I am encountering a different problem ?
    Vicki

    So, are you trying to copy the error codes over from Sybase as well (i.e. an error code of 100 in your Sybase application translates to "no data found")?
    RAISE_APPLICATION_ERROR allows you to raise custom errors, but the error numbers have to be in the range -20000 to -20999 (i.e. ORA-20000 through ORA-20999). You can use RAISE to re-raise Oracle's NO_DATA_FOUND message, though that won't match the error number 100 you're expecting. It would also be pointless to have an exception handler that just raises the same error again, so you'd want to remove the error handler entirely if it would just RAISE again.
    Justin

  • External procedure call. PARAMETER MAXLEN doubt

    Hi, I have the following external function definition:
    CREATE OR REPLACE FUNCTION myfunc (
    tohash IN STRING,
    hashres IN OUT STRING)
    RETURN BINARY_INTEGER AS LANGUAGE C
    LIBRARY myfunc_lib
    NAME "myfunc"
    PARAMETERS (
    strin,
    strinINDICATOR,
    strout,
    strout MAXLEN,
    strout INDICATOR,
    RETURN);
    C prototype: int myfunc(char strin, short strin_ind, char strout, int strout_maxlen, short strout_ind)
    When I call it, the strout_maxlen take the pl/sql variable size value ( v_out CHAR(64) --> strout_maxlen == 64 ). The internal mechanism of call a external function take care of pass a 65 bytes buffer (to store the '\0') or if I know that I'll write 64 characters I must declare the pl/sql variable as CHAR(65)
    Thanks!
    Best regards
    Edited by: user1488139 on 26/03/2012 12:29

    Artem,
    It may be possible to do, but with ASP (active server page) code.  Here is an example:
    A WebI report runs and there are three columns of information that is generated (Report ID, Stat, and Currentdate).  Within WebI you create a local variable that looks like this:
    [VAR]
    ="http://www.myserver.com/Ext_Proc.asp?ID="+[Report ID]+"&Stat="+[Stat]+"&TimeTr="+[currentdate()+"&userinfo="+[Usr_Inf]
    You would then place the variable VAR on your grid and tag it as read as HTML.  If a user hovers over this column and executes the link it will fire off the Ext_Proc.asp code, receiving the arguments ID, Stat, and TimeTr with its values passed in.  Within the Ext_Proc.asp code you can then in-turn fire that data to your database server (or whatever you want to do with it).  If you need more info on what the ASP code might look like please reply.
    Thanks,
    John

Maybe you are looking for