Call A Function

CREATE OR REPLACE FUNCTION fn_easy1 RETURN VARCHAR2 IS
BEGIN
dbms_output.put_line('this is a simple function');
RETURN 'This is a simple function';
END fn_easy1;
I have this function, how can i call it in oracle??
like this its not working call fn_easy1();
i dont want to do it via select, select fn_easy1() from anything; works.. but i want to call it without the select thingy.

CREATE OR REPLACE FUNCTION inout_fn (outparm IN OUT VARCHAR2)
RETURN VARCHAR2 IS
BEGIN
outparm := 'Coming out';
RETURN 'return param';
END inout_fn;
SET serveroutput ON
DECLARE
retval VARCHAR2(20);
ioval VARCHAR2(20) := 'Going in';
BEGIN
DBMS_OUTPUT.put_line('In: ' || ioval);
retval := inout_fn(ioval);
DBMS_OUTPUT.put_line('Out: ' || ioval);
DBMS_OUTPUT.put_line('Return: ' || retval);
END;
call inout_fn('Going on');
How can I use the call keyword to call a function?
I get an error of
ORA-06576: not a valid function or procedure name
Edited by: user8788417 on Sep 11, 2009 1:05 AM

Similar Messages

  • CNTL_ERROR while calling a function module from Java webdynpro

    I am calling a RFC function module from javawebdynpro app
    which inturn calls a function module performing BDC on CAPP transaction. When I run this from SE37 of the same system or a different system everything works fine. But when called from Java webdynpro app, it raises a CNTL_ERROR exception and creates a short dump.
    Any help on this is highly appreciated

    Good catch, BI Learner. This was exactly it: when assigning the values from SOURCEFIELDS directly to the import/export parameters, you have to make sure that the types are EXACTLY the same, otherwise it will not work (the routine stops with an error when calling the FM, but there is no dump).
    Therefore, to solve my problem, I created the declarations precisely as expected by the FM and assigned the values to these fields:
    DATA:
          SOURCEVAL TYPE  /BIC/OIINVQTY,
          SOURCEUOM TYPE  /BIC/OIUSUOM,
          USITM TYPE  /BIC/OIUSITM,
          TARGETUOM TYPE  /BIC/OIUSUOM,
          CONVERTED_COST TYPE  /BIC/OIINVQTY.
    DATA PRODUCTION_UOM TYPE /BIC/OIUSUOM.
    " get the Production UOM
        SELECT SINGLE I~/BIC/USPRDUOM
          FROM /BIC/PUSITM AS I
          INTO PRODUCTION_UOM
          WHERE I~/BIC/USITM = SOURCE_FIELDS-/BIC/USITM AND I~OBJVERS = 'A'.
        IF ( SY-SUBRC = 4 ). " no records found
          "RAISE PARTNO_NOT_FOUND.
          RAISE EXCEPTION TYPE CX_RSROUT_SKIP_RECORD.
        ENDIF.
    " load the parameters
        SOURCEVAL = SOURCE_FIELDS-/BIC/USFRZMFC.
        SOURCEUOM = SOURCE_FIELDS-BASE_UOM.
        USITM = SOURCE_FIELDS-/BIC/USITM.
    " then you can call the FM
        CALL FUNCTION 'Z_CA_CONVERT_US_COST'
          EXPORTING
            PSOURCEVAL                = SOURCEVAL
            PSOURCEUOM                = SOURCEUOM
            PUSITM                    = USITM
            PTARGETUOM                = PRODUCTION_UOM
          IMPORTING
            PTARGETVAL                = CONVERTED_COST
          EXCEPTIONS
            CONVERSION_NOT_MAINTAINED = 1
            PARTNO_NOT_FOUND          = 2
            OTHERS                    = 3.
    " ... [do the rest]
    Thanks for your help,
    Dennis

  • Error while calling a function.

    Hi,
    below is my callable statement through which am calling a function which returns the service years of a person with personid as parameter.
    But dont know why am getting an error which is returning the serviceyrs as 0.
    when i try to debug, the problem is in this statement
    System.out.println("the output1 is "+cs.getInt(1));
    is there any problem with my code.
    please look the code below
    thanks
    kumar
    OADBTransaction txn=getOADBTransaction();
    OracleCallableStatement cs = (OracleCallableStatement) txn.createCallableStatement("begin :1:=LMIG_UTILITY_PKG.GET_TOTAL_SERVICE(p_person_id => :2); end;",1);
    try
    cs.registerOutParameter(1,Types.INTEGER);
    cs.setInt(2,Integer.parseInt(pid));
    System.out.println("person id is "+pid);
    System.out.println("the output1 is "+cs.getInt(1));
    cs.execute();
    serviceyrs= cs.getInt(1);
    cs.close();
    catch(SQLException sqle)
    System.out.println("ERROR"+sqle.toString());
    System.out.println("Service years are "+serviceyrs);

    Hi, Guess u are missing the connection to the JDBC call.
    Try the following...it worked for me..
    Connection conn = this.getOADBTransaction().getJdbcConnection();
    OracleCallableStatement ocs = null;
    String param = null;
    try {       
         String stmt = "BEGIN :1 := <PkgName>.<FunctionName>(:2); end;";
         ocs = (OracleCallableStatement)conn.prepareCall(stmt);
         ocs.registerOutParameter(1, OracleTypes.CHAR);
         ocs.setString(2, <param>);
         ocs.execute();
         param = ocs.getString(1);
    } catch(SQLException se)
    {       throw OAException.wrapperException(se);    
    finally
         try {               
              ocs.close();
              return(param);
         } catch(Exception e)
              throw OAException.wrapperException(e);
    }

  • Can we call a function module in ADHOC query

    Hi
    Can we call a function module in ADHOC query if yes how.
    Also we ned to know how to call a function module in SAP query.
    An early responce is appreciated.
    Thanks and best regards
    Rajeev

    Okay as far as I understand your aim is:
    To fill a field in the output list with a value that is based on the current line information and calculated by a function module
    So go to SQ02 and create an additional field in the InfoSet.
    You can refer in the coding to the technical names you can see in the left tree window like P0000-PERNR.
    More information is avaiable in the Help part look for additional field in SQ02.
    Regards,
    Michael

  • Upload data from excel with vba by calling a function module

    Hello all,
    i have a problem with the function module "ALSM_EXCEL_TO_INTERNAL_TABLE". I will call this function module with vba to load data from excel to sap with a Buttonclick. I have copied this function module and set it remotable. But i can´t call it from excel.
    Can you give me some tips how can i
    upload data from excel with vba by click a button.
    The problem seems the function: call method cl_gui_frontend_services=>clipboard_import in the function module, because when i comment this function call the vba-call is true but no results. 
    How can I call the function module correct with vba?
    Thanks a lot for your tips!!!!
    Chris
    Message was edited by:
            Christoph Kirschner

    HI
    Uploading data directly from Excel file format
    * Upload data direct from excel.xls file to SAP
    REPORT ZEXCELUPLOAD.
    PARAMETERS: filename LIKE rlgrap-filename MEMORY ID M01,
                begcol TYPE i DEFAULT 1 NO-DISPLAY,
                begrow TYPE i DEFAULT 1 NO-DISPLAY,
                endcol TYPE i DEFAULT 100 NO-DISPLAY,
                endrow TYPE i DEFAULT 32000 NO-DISPLAY.
    * Tick don't append header
    PARAMETERS: kzheader AS CHECKBOX.
    DATA: BEGIN OF intern OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern.
    DATA: BEGIN OF intern1 OCCURS 0.
            INCLUDE STRUCTURE  alsmex_tabline.
    DATA: END OF intern1.
    DATA: BEGIN OF t_col OCCURS 0,
           col LIKE alsmex_tabline-col,
           size TYPE i.
    DATA: END OF t_col.
    DATA: zwlen TYPE i,
          zwlines TYPE i.
    DATA: BEGIN OF fieldnames OCCURS 3,
            title(60),
            table(6),
            field(10),
            kz(1),
          END OF fieldnames.
    * No of columns
    DATA: BEGIN OF data_tab OCCURS 0,
           value_0001(50),
           value_0002(50),
           value_0003(50),
           value_0004(50),
           value_0005(50),
           value_0006(50),
           value_0007(50),
           value_0008(50),
           value_0009(50),
           value_0010(50),
           value_0011(50),
           value_0012(50),
           value_0013(50),
           value_0014(50),
           value_0015(50),
           value_0016(50),
           value_0017(50),
           value_0018(50),
           value_0019(50),
           value_0020(50),
           value_0021(50),
           value_0022(50),
           value_0023(50),
           value_0024(50),
           value_0025(50),
           value_0026(50),
           value_0027(50),
           value_0028(50),
           value_0029(50),
           value_0030(50),
           value_0031(50),
           value_0032(50),
           value_0033(50),
           value_0034(50),
           value_0035(50),
           value_0036(50),
           value_0037(50),
           value_0038(50),
           value_0039(50),
           value_0040(50),
           value_0041(50),
           value_0042(50),
           value_0043(50),
           value_0044(50),
           value_0045(50),
           value_0046(50),
           value_0047(50),
           value_0048(50),
           value_0049(50),
           value_0050(50),
           value_0051(50),
           value_0052(50),
           value_0053(50),
           value_0054(50),
           value_0055(50),
           value_0056(50),
           value_0057(50),
           value_0058(50),
           value_0059(50),
           value_0060(50),
           value_0061(50),
           value_0062(50),
           value_0063(50),
           value_0064(50),
           value_0065(50),
           value_0066(50),
           value_0067(50),
           value_0068(50),
           value_0069(50),
           value_0070(50),
           value_0071(50),
           value_0072(50),
           value_0073(50),
           value_0074(50),
           value_0075(50),
           value_0076(50),
           value_0077(50),
           value_0078(50),
           value_0079(50),
           value_0080(50),
           value_0081(50),
           value_0082(50),
           value_0083(50),
           value_0084(50),
           value_0085(50),
           value_0086(50),
           value_0087(50),
           value_0088(50),
           value_0089(50),
           value_0090(50),
           value_0091(50),
           value_0092(50),
           value_0093(50),
           value_0094(50),
           value_0095(50),
           value_0096(50),
           value_0097(50),
           value_0098(50),
           value_0099(50),
           value_0100(50).
    DATA: END OF data_tab.
    DATA: tind(4) TYPE n.
    DATA: zwfeld(19).
    FIELD-SYMBOLS: <fs1>.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR filename.
      CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
           EXPORTING
                mask      = '*.xls'
                static    = 'X'
           CHANGING
                file_name = filename.
    START-OF-SELECTION.
      CALL FUNCTION 'ALSM_EXCEL_TO_INTERNAL_TABLE'
           EXPORTING
                filename                = filename
                i_begin_col             = begcol
                i_begin_row             = begrow
                i_end_col               = endcol
                i_end_row               = endrow
           TABLES
                intern                  = intern
           EXCEPTIONS
                inconsistent_parameters = 1
                upload_ole              = 2
                OTHERS                  = 3.
      IF sy-subrc <> 0.
        WRITE:/ 'Upload Error ', SY-SUBRC.
      ENDIF.
    END-OF-SELECTION.
      LOOP AT intern.
        intern1 = intern.
        CLEAR intern1-row.
        APPEND intern1.
      ENDLOOP.
      SORT intern1 BY col.
      LOOP AT intern1.
        AT NEW col.
          t_col-col = intern1-col.
          APPEND t_col.
        ENDAT.
        zwlen = strlen( intern1-value ).
        READ TABLE t_col WITH KEY col = intern1-col.
        IF sy-subrc EQ 0.
          IF zwlen > t_col-size.
            t_col-size = zwlen.
    *                          Internal Table, Current Row Index
            MODIFY t_col INDEX sy-tabix.
          ENDIF.
        ENDIF.
      ENDLOOP.
      DESCRIBE TABLE t_col LINES zwlines.
      SORT intern BY row col.
      IF kzheader = 'X'.
        LOOP AT intern.
          fieldnames-title = intern-value.
          APPEND fieldnames.
          AT END OF row.
            EXIT.
          ENDAT.
        ENDLOOP.
      ELSE.
        DO zwlines TIMES.
          WRITE sy-index TO fieldnames-title.
          APPEND fieldnames.
        ENDDO.
      ENDIF.
      SORT intern BY row col.
      LOOP AT intern.
        IF kzheader = 'X'
        AND intern-row = 1.
          CONTINUE.
        ENDIF.
        tind = intern-col.
        CONCATENATE 'DATA_TAB-VALUE_' tind INTO zwfeld.
        ASSIGN (zwfeld) TO <fs1>.
        <fs1> = intern-value.
        AT END OF row.
          APPEND data_tab.
          CLEAR data_tab.
        ENDAT.
      ENDLOOP.
      CALL FUNCTION 'DISPLAY_BASIC_LIST'
           EXPORTING
                file_name     = filename
           TABLES
                data_tab      = data_tab
                fieldname_tab = fieldnames.
    *-- End of Program
    <b>Excel Upload Alternative - KCD_EXCEL_OLE_TO_INT_CONVERT</b>
    *Title : Excel Uploading
    TYPES:   BEGIN OF t_datatab,
             col1(25)  TYPE c,
             col2(30)  TYPE c,
             col3(30)  TYPE c,
             col4(30)  TYPE c,
             col5(30)  TYPE c,
             col6(30)  TYPE c,
             col7(30) TYPE c,
             col8(30)  TYPE c,
             col9(30)  TYPE c,
             col10(30)  TYPE c,
             col11(30)    TYPE c,
           END OF t_datatab.
    DATA: it_datatab TYPE STANDARD TABLE OF t_datatab INITIAL SIZE 0,
          wa_datatab TYPE t_datatab.
    Data : p_table type t_datatab occurs 0 with header line.
    DATA : gd_scol   TYPE i VALUE '1',
           gd_srow   TYPE i VALUE '1',
           gd_ecol   TYPE i VALUE '256',
           gd_erow   TYPE i VALUE '65536'.
    DATA: it_tab TYPE filetable,
          gd_subrc TYPE i.
    field-symbols : <fs>.
    *Selection screen definition
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS:  p_file LIKE rlgrap-filename
                   DEFAULT 'c:test.xls' OBLIGATORY.   " File Name
    SELECTION-SCREEN END OF BLOCK b1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      REFRESH: it_tab.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
        EXPORTING
          window_title     = 'Select File'
          default_filename = '*.xls'
          multiselection   = ' '
        CHANGING
          file_table       = it_tab
          rc               = gd_subrc.
      LOOP AT it_tab INTO p_file.
    *    so_fpath-sign = 'I'.
    *    so_fpath-option = 'EQ'.
    *    append so_fpath.
      ENDLOOP.
    START-OF-SELECTION.
      PERFORM upload_excel_file TABLES   it_datatab
                                 USING   p_file
                                         gd_scol
                                         gd_srow
                                         gd_ecol
                                         gd_erow.
    * END-OF-SELECTION.
    END-OF-SELECTION.
      LOOP AT it_datatab INTO wa_datatab.
        WRITE:/ wa_datatab-col1,
                wa_datatab-col2,
                wa_datatab-col3,
                wa_datatab-col4,
                wa_datatab-col5,
                wa_datatab-col6,
                wa_datatab-col7,
                wa_datatab-col8,
                wa_datatab-col9,
                wa_datatab-col10,
                wa_datatab-col11.
      ENDLOOP.
    *&      Form  UPLOAD_EXCEL_FILE
    *       upload excel spreadsheet into internal table
    *      -->P_TABLE    Table to return excel data into
    *      -->P_FILE     file name and path
    *      -->P_SCOL     start column
    *      -->P_SROW     start row
    *      -->P_ECOL     end column
    *      -->P_EROW     end row
    FORM upload_excel_file TABLES   p_table
                           USING    p_file
                                    p_scol
                                    p_srow
                                    p_ecol
                                    p_erow.
      DATA : lt_intern TYPE  kcde_cells OCCURS 0 WITH HEADER LINE.
    * Has the following format:
    *             Row number   | Colum Number   |   Value
    *      i.e.     1                 1             Name1
    *               2                 1             Joe
      DATA : ld_index TYPE i.
    * Note: Alternative function module - 'ALSM_EXCEL_TO_INTERNAL_TABLE'
      CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
        EXPORTING
          filename                = p_file
          i_begin_col             = p_scol
          i_begin_row             = p_srow
          i_end_col               = p_ecol
          i_end_row               = p_erow
        TABLES
          intern                  = LT_INTERN
        EXCEPTIONS
          inconsistent_parameters = 1
          upload_ole              = 2
          OTHERS                  = 3.
      IF sy-subrc <> 0.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE:/ 'Error Uploading file'.
        EXIT.
      ENDIF.
      IF lt_intern[] IS INITIAL.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE:/ 'No Data Uploaded'.
        EXIT.
      ELSE.
        SORT lt_intern BY row col.
        LOOP AT lt_intern.
         MOVE lt_intern-col TO ld_index.
         assign component ld_index of structure
         p_table to <fs>.
    move : lt_intern-value to <fs>.
    *     MOVE lt_intern-value TO p_table.
          AT END OF row.
            APPEND p_table.
            CLEAR p_table.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.                    "UPLOAD_EXCEL_FILE
    Regards
    Pavan

  • /How to call a function in another PowerShell script

    Hi All,
    I want to use dot-sourced method to call the function from other script,While calling Function.ps1 from the second script there is a Null value in the beginning,
    How can we ignore this null value or there is a better approach of doing it without using Import-Module.
    #=======Function.ps1============
    function add($x,$y)
    $z=$x+$y
    Write-Host "The value is $Z"
    add $a $b
    #===========End==================
    The second script which has been dot-source to call the function
    #================Main script==========
    . C:\Users\Anirban\Desktop\Tester.ps1 |Out-Null
    add 1 2
    #================================
    Regards,
    Anirban Singha

    Dot Sourcing is adding the function ADD to console environment and the script is acting like a module vs a script with parameters.
    The Add $a $b line should be removed. (Where are $a and $b defined?)
    They are not defined hence, "The Value is " blank line
    #=======Function.ps1============
    function add($x,$y)
    $z=$x+$y
    Write-Host "The value is $Z"
    add $a $b
    Should be
    #=======Function.ps1============
    function add($x,$y)
    $z=$x+$y
    Write-Host "The value is $Z"
    PS C:\Test> . c:\tester.ps1
    Add 1 2
    Add 3 4
    The value is 3
    The value is 7
    However the add can work without dot sourcing the script file by parameterizing the script
    #=======Function.ps1============
    Param ($a,$b) # Parameters to the script
    function add($x,$y)
    $z=$x+$y
    Write-Host "The value is $Z"
    Add $a $b # body of script
    PS C:\Test> 
    C:\Tester.ps1 1 2
    C:\Tester.ps1 3 4
    The value is 3
    The value is 7

  • How to call a C pointer from call library function node

    I have a client/server application which the client I am trying to develop using Labview.  When I use to communicate the server and the client using the program provided by the manufacter, the system works perfectly.
    Now, I am trying to develop a system using labview, because I need to get another things.
    I have the DLL provided by the manufacter and the .h too, so I can check the functions parameters. One of these functions needs to be called using a struct element. Probably, the function's DLL instantiates the elements of this struct.  I use the call library function node to do it.
    When I receive the data, the function returns to me the struct that I passed as a parameter before, and then I can read all the elements of the struct, except the string element that returns nothing. The struct elements that are numerical, I can read them perfectly.
    Another thing that is important to say, is that the string data was not returned in fact by the DLL function that the system calls. I have to pass a pointer (I use it as unsigned 16 in Labview, but I tried before as string and unsigned 8) as a parameter, and this pointer will point to the memory location that the string is. When I try to read what is returned by the function, I can read nothing. The same function returns that the size of data that is returning is 17 bytes.
    How can I solve it?
    Thank you in advance

    Did you take a look at the example that ships with LabVIEW that shows how to do all sorts of data passing to DLLs. I believe your situation is one of the examples listed. You can find the example VI in the "<LabVIEW install directory>\examples\dll\data passing" directory.

  • How to call a function module from the Web Template?

    Hi all,
    how can I call a function module from a BI 7.x web template and then show the result of the FM on the web template?
    Many thanks for your hints.
    Regards, Nils

    Hi!
    I am too working on a similar issue.
    Probably this helps:
    Re: Calling a function module from a Web Template
    Regards,
    Sri

  • Program making a RFC call to Function Module not working in background

    Hi All,
    I have an ABAP Program which is used to do a reconciliation check between the R/3 and BI system for Invoice Data. Please find below the details of the program flow:
    1.     Program counts the number of records in the DSO table and aggregates the Net_Value based on the date range (passed as parameters)
    2.     Program calls a Function Module (RFC Call) which counts the number of records in the R/3 table and aggregates the Net_Value for the same date range
    3.     Function Module Passes back the count values and aggregated Net_Value to the program
    4.     Program compares the count and aggregated Net_Value from EDWH and MSP systems and sends an email mentioning whether the counts match or not
    However we are facing an issue.
    Whenever, we execute the program in dialog mode, it works fine and fetches results within 5-6 minutes. However if we schedule the program to run in background (parameters through a variant), it gives no results even after running for over 3-4 hours. We tried figuring it out yesterday but could not come to any conclusion. Since there is a RFC call being to the function module, we were wondering if we need to specify some other parameter as well.
    Thanks & Regards
    Dharmendra

    RFC Call is a procedure for executing remote enables function modules. It is done via the 'Remote Enabled' radio button on the function module's attribute screen.

  • Passing arrays with Call Library Function does not work after application builder

    Calling a DLL with Call Library Function which requires an array of data works correctly in Labview, but after building an exe with application builder, the call no longer works.  Dereferecing the pointer in the DLL retuns all 0s and not the actual values.
    Solved!
    Go to Solution.
    Attachments:
    TEST.zip ‏28 KB

    I did not run your code because it is a little unclear to me what it does.
    Two things:
    First, is the DLL you are calling the DLL-ified version of PopUpNames.vi? Then the problem is likely that the panel is not being built into the DLL.
    When LabView builds an application / dll, it strips the front panel and block diagram from all VIs that it doesn't think need to show a panel at run time. This reduces file size and increases code security. The App Builder's panel inclusion logic can be overridden by Build Specifications -> Source File Settings -> Remove front panel. A better method is to put a property node on a control in a window you want to show marking it "visible"; this is sufficient to tell the App Builder it should keep the panel.
    Currently Source File Settings shows "no dependencies" (clearly incorrect---another evil side effect of Express VIs I guess) but if you change the settings as shown below to keep ALL panels, one might hope the App Builder can figure it to keep the panel when it deconstructs the Express VI. (Alternatively convert the Express VI into a regular one.)
    A second comment: I am a bit flummoxed at the larger goal here. You are calling LabView DLL from LabView, which doesn't make a lot of sense, so I assume your larger goal is to call LabView from C or vice-versa. In that case be aware that your DLL is x86 (32-bit) but you are passing 64-bit ints as your pointers. In this case it is 32-bit LabView with 32-bit pointers in embedeed in 64-bit containers calling 32-bit LabView with 32-bit pointers in embedeed in 64-bit containers, so it all works, but if your going to call this from C or whatnot you're going to have to follow that same design.
    When calling C code the LabView Call Library Function does have a "unsigned pointer-sized integer" data type that always appears to be 64 bits in the dev env but which actually passes a 64 or 32-bit int to the DLL depending on the environment. The "pointer sized int" has to be 64 bits in the "LabView" part of the code because LabView's strong typing requires the data type to be determined at compile time. Casting all pointers to the largest data type in LabView makes it possible to write platform-independent code, but down at the Call Library level you still have to put the right number of bytes on the stack.

  • Tuning a procedure and using dbms_job.submit proc that call's functions

    Hi
    I have Procedure that have 3 curosrs which are nested one below with in each other
    and it looks as below
    it's structure will look some thing look like this
    declare
    empno_fetch number;
    CURSOR deu_process IS
    SELECT empno
    FROM emp
    WHERE flg_process = 'N'
    AND ROWNUM <= 5000
    ORDER BY empno;
    CURSOR dup_all IS --c1 fetch around 400000 records
    (select empno
    from emp
    where empno>l_empno
    order by empno
    where rownum<=empno_fetch;
    CURSOR rules IS --c2
    SELECT rule_id, rule_score, name_Of_func
    FROM rule;
    begin
    l_count := 1;
    OPEN dedupe_rule_attr;
    LOOP
    BEGIN
    Here one loop is used for fetching 5000 records at time and
    Here deu_process cursor is opened ,assume it fetches one record
    Here another cursor dup_all is used for fetching the records and assume it fetched 400000 then
    Here another cursor is opened name where it fetches 10 rows
    Here logic is if first row then
    call's stored function which has following functionalty
    it compares fields such as address of outer most cursor i.e deu_process with all the address of the other rows i.e 400000 rows and return a number
    if second row then
    call's another stored function which has
    compares other fields such as first name,last name
    if third then other field
    so on ....
    up to 10
    and then finally ends
    so if i comment all the rules loop then it takes only one min to execute .If it validaes all of them if takes 14 minutes to execute .so there is problem in that 10 procedures to execute
    So i found an approach to run all the rules simultaneously using dbms_job .But i face a problem that i can't uderstand how to send the input and out put parameter's to calling procedure.And these parameter's must be passed by variable from called procedure to calling procedure
    Please suggest me what is the syntax of dbms_job with input and output parameters with variable's that must be passed as formal parameter's
    Regarding DBMS_JOB.SUBMIT I am getting following error
    Declare
    x number:=1;
    b number;
    jobnumber number;
    BEGIN
    DBMS_JOB.SUBMIT(JOB => jobnumber,
    WHAT => 'vamsi_proc1('||x||');',
    NEXT_DATE => (sysdate+1/(86400)),
    INTERVAL => null);
    --dbms_output.put_line('value of b is '||b);
    COMMIT;
    END;
    Declare
    ERROR at line 1:
    ORA-06550: line 1, column 107:
    PLS-00103: Encountered the symbol ")" when expecting one of the following:
    ( - + case mod new not null others <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    The symbol "null" was substituted for ")" to continue.
    ORA-06512: at "SYS.DBMS_JOB", line 79
    ORA-06512: at "SYS.DBMS_JOB", line 136
    ORA-06512: at line 5
    create or replace procedure vamsi_proc1(v in out number) as
    x number(4);
    begin
    --a:=1;
    insert into emp_vamsi(select 677,ENAME,SAL,DEPTNO,MANAGER from emp where empno=v);
    commit;
    --a:=2;
    --x:=a;
    end;
    using dbms_job.submit proc that call's functions which returns out and in parameters to calling procedure environment .I can't get this with out using data base table's.
    If you have any method for this Plese suggest
    And also please suggest me weather using job's is a good idea ,If not than suggest me what ever will the other approach.
    Thank's and Regard's
    vamsi krishna

    Hi <br>
    I have looked at all sql trace file ,<br>
    I found that there is no problem in sql statemens all of them are using proper <br>indexes execpt the folllowing statement<br>
    <br>
    SELECT nvl(COUNT(ref_appln_no),0)<br>
    FROM ci_cust_dedupe_mast<br>
    WHERE flg_mnt_status='A'<br>
    <br>
    This statement executes only once for 1*3,77000*10 times <br>
    The function that i had sent previously executes more than 4000000*20 times .<br>
    I think all it takes is only for iterations that are caused<br>
    <br>
    I am also sending sql trace for reference
         <br>
    TKPROF: Release 9.2.0.4.0 - Production on Mon Aug 14 17:30:50 2006     <br>
         <br>
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.     <br>
         <br>
    Trace file: afhuat_ora_2204.trc     <br>
    Sort options: default     <br>
         <br>
    ********************************************************************************     <br>
    count = number of times OCI procedure was executed     <br>
    cpu = cpu time in seconds executing      <br>
    elapsed = elapsed time in seconds executing     <br>
    disk = number of physical reads of buffers from disk     <br>
    query = number of buffers gotten for consistent read     <br>
    current = number of buffers gotten in current mode (usually for update)     <br>
    rows = number of rows processed by the fetch or execute call     <br>
    ********************************************************************************     <br>
         <br>
    alter session set sql_trace=true     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 0 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 1 0.00 0.00 0 0 0 0     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Misses in library cache during execute: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61      <br>
    ********************************************************************************     <br>
         <br>
    declare     <br>
    x varchar2(100);     <br>
    y varchar2(100);     <br>
    ap number;     <br>
    begin     <br>
    x:=to_char(sysdate,'dd-mon-rrrr hh:mi:ss');     <br>
    ap:=ap_ci_dedupe_proc;     <br>
    y:=to_char(sysdate,'dd-mon-rrrr hh:mi:ss');     <br>
    dbms_output.put_line(x||' '||ap);     <br>
    dbms_output.put_line(y||' '||ap);     <br>
    end;     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 820.23 0 0 0 1     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 2 0.00 820.23 0 0 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61      <br>
    ********************************************************************************     <br>
         <br>
    select user#      <br>
    from     <br>
    sys.user$ where name = 'OUTLN'     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.00 0 2 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.00 0 2 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    1 TABLE ACCESS BY INDEX ROWID USER$ (cr=2 r=0 w=0 time=31 us)     <br>
    1 INDEX UNIQUE SCAN I_USER1 (cr=1 r=0 w=0 time=18 us)(object id 44)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    SELECT *     <br>
    FROM ci_dedupe_rule_attr     <br>
    ORDER BY cod_rule_attr_id     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.06 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 21 0.00 0.01 1 3 0 20     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 23 0.00 0.07 1 3 0 20     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT COUNT(1)     <br>
    FROM ci_cust_dedupe_mast     <br>
    WHERE flg_process = 'N'     <br>
    AND     <br>
    AND     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.00 0 22 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.00 0 22 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT nvl(COUNT(ref_appln_no),0)     <br>
    FROM ci_cust_dedupe_mast     <br>
    WHERE flg_mnt_status='A'     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 1.68 3.03 18867 21183 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 1.68 3.03 18867 21183 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT ref_appln_no     <br>
    FROM ci_cust_dedupe_mast     <br>
    WHERE flg_process = 'N'     <br>
    AND     <br>
    AND     <br>
    AND     <br>
    ORDER BY ref_appln_no     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.00 0 0 0 0     <br>
    Fetch 3 0.00 0.09 18 43 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 6 0.00 0.09 18 43 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT     <br>
    FROM     <br>
    WHERE     <br>
    AND     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 377709 8.71 7.64 0 0 0 0     <br>
    Fetch 377709 18.18 60.19 19802 1510836 0 377709     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 755419 26.90 67.84 19802 1510836 0 377709     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT NVL(MAX(cod_serial_no),0) + 1     <br>
    FROM ci_dedupe_details_mast     <br>
    WHERE ref_appln_no = :b1     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.01 2 2 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.01 2 2 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT COUNT(1)     <br>
    FROM ci_dedupe_details_mast     <br>
    WHERE ref_appln_no = :b1     <br>
    AND     <br>
    AND flg_mnt_status = 'A'     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.00 0 3 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.00 0 3 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT ref_appln_no FROM     <br>
    (     <br>
    SELECT ref_appln_no     <br>
    FROM ci_cust_dedupe_mast     <br>
    WHERE     <br>
    AND     <br>
    ORDER BY ref_appln_no     <br>
    )     <br>
    WHERE ROWNUM <= :b2     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 77 0.01 0.00 0 0 0 0     <br>
    Fetch 377786 10.21 12.33 908 377865 0 377709     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 377864 10.23 12.33 908 377865 0 377709     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    SELECT cod_rule_id, cod_rule_score, nam_rule_func     <br>
    FROM ci_dedupe_rule_defn     <br>
    WHERE flg_valid = 'Y'     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 377708 5.50 4.03 0 0 0 0     <br>
    Fetch 4154788 62.79 54.04 16 4532496 0 3777080     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 4532497 68.29 58.07 16 4532496 0 3777080     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    select con#,obj#,rcon#,enabled,nvl(defer,0)      <br>
    from     <br>
    cdef$ where robj#=:1     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.00 0 0 0 0     <br>
    Fetch 2 0.00 0.01 1 2 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 6 0.00 0.01 1 2 0 0     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
    ********************************************************************************     <br>
         <br>
    select con#,type#,condlength,intcols,robj#,rcon#,match#,refact,nvl(enabled,0),     <br>
    rowid,cols,nvl(defer,0),mtime,nvl(spare1,0)      <br>
    from     <br>
    cdef$ where obj#=:1     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.00 0 0 0 0     <br>
    Fetch 2 0.00 0.01 2 4 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 6 0.00 0.01 2 4 0 0     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
    ********************************************************************************     <br>
         <br>
    select u.name,o.name, t.update$, t.insert$, t.delete$, t.enabled      <br>
    from     <br>
    obj$ o,user$ u,trigger$ t where t.baseobject=:1 and t.obj#=o.obj# and      <br>
    o.owner#=u.user# order by o.obj#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 3 0.00 0.00 0 0 0 0     <br>
    Execute 3 0.00 0.00 0 0 0 0     <br>
    Fetch 4 0.00 0.05 6 9 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 10 0.00 0.05 6 9 0 1     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    0 SORT ORDER BY (cr=1 r=1 w=0 time=4772 us)     <br>
    0 NESTED LOOPS (cr=1 r=1 w=0 time=4747 us)     <br>
    0 NESTED LOOPS (cr=1 r=1 w=0 time=4744 us)     <br>
    0 TABLE ACCESS BY INDEX ROWID TRIGGER$ (cr=1 r=1 w=0 time=4740 us)     <br>
    0 INDEX RANGE SCAN I_TRIGGER1 (cr=1 r=1 w=0 time=4736 us)(object id 130)     <br>
    0 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=0 r=0 w=0 time=0 us)     <br>
    0 INDEX UNIQUE SCAN I_OBJ1 (cr=0 r=0 w=0 time=0 us)(object id 36)     <br>
    0 TABLE ACCESS CLUSTER USER$ (cr=0 r=0 w=0 time=0 us)     <br>
    0 INDEX UNIQUE SCAN I_USER# (cr=0 r=0 w=0 time=0 us)(object id 11)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select o.owner#,o.name,o.namespace,o.remoteowner,o.linkname,o.subname,     <br>
    o.dataobj#,o.flags      <br>
    from     <br>
    obj$ o where o.obj#=:1     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 3 0.00 0.00 0 0 0 0     <br>
    Fetch 3 0.00 0.02 5 9 0 3     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 8 0.00 0.02 5 9 0 3     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 3)     <br>
    ********************************************************************************     <br>
         <br>
    select col#, grantee#, privilege#,max(mod(nvl(option$,0),2))      <br>
    from     <br>
    objauth$ where obj#=:1 and col# is not null group by privilege#, col#,      <br>
    grantee# order by col#, grantee#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 3 0.00 0.00 0 0 0 0     <br>
    Execute 3 0.00 0.00 0 0 0 0     <br>
    Fetch 3 0.00 0.01 2 6 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 9 0.00 0.02 2 6 0 0     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
    ********************************************************************************     <br>
         <br>
    INSERT INTO ci_dedupe_details_mast     <br>
    VALUES     <br>
    (     <br>
    :b6,     <br>
    :b5,     <br>
    :b4,     <br>
    :b3,     <br>
    'Y',     <br>
    'N',     <br>
    '',     <br>
    0,     <br>
    SYSDATE,     <br>
    'A',     <br>
    ' ',     <br>
    :b2,     <br>
    'SYSTEM',     <br>
    :b1,     <br>
    1     <br>
    )     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.01 3 3 0 0     <br>
    Execute 1 0.00 0.01 4 1 6 1     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 2 0.00 0.02 7 4 6 1     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    select obj#,type#,ctime,mtime,stime,status,dataobj#,flags,oid$, spare1,      <br>
    spare2      <br>
    from     <br>
    obj$ where owner#=:1 and name=:2 and namespace=:3 and remoteowner is null      <br>
    and linkname is null and subname is null     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.01 2 3 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.01 2 3 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
    ********************************************************************************     <br>
         <br>
    select audit$,options      <br>
    from     <br>
    procedure$ where obj#=:1     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.01 3 3 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.01 3 3 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    1 TABLE ACCESS BY INDEX ROWID PROCEDURE$ (cr=3 r=3 w=0 time=14110 us)     <br>
    1 INDEX UNIQUE SCAN I_PROCEDURE1 (cr=2 r=2 w=0 time=13871 us)(object id 115)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select owner#,name,namespace,remoteowner,linkname,p_timestamp,p_obj#,      <br>
    d_owner#, nvl(property,0),subname      <br>
    from     <br>
    dependency$,obj$ where d_obj#=:1 and p_obj#=obj#(+) order by order#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 4 0.00 0.07 8 12 0 3     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 6 0.00 0.07 8 12 0 3     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    3 SORT ORDER BY (cr=12 r=8 w=0 time=72867 us)     <br>
    3 NESTED LOOPS OUTER (cr=12 r=8 w=0 time=72813 us)     <br>
    3 TABLE ACCESS BY INDEX ROWID DEPENDENCY$ (cr=4 r=4 w=0 time=41297 us)     <br>
    3 INDEX RANGE SCAN I_DEPENDENCY1 (cr=3 r=3 w=0 time=25897 us)(object id 127)     <br>
    3 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=8 r=4 w=0 time=31484 us)     <br>
    3 INDEX UNIQUE SCAN I_OBJ1 (cr=5 r=2 w=0 time=14872 us)(object id 36)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select order#,columns,types      <br>
    from     <br>
    access$ where d_obj#=:1     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 2 0.00 0.02 3 4 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 4 0.00 0.02 3 4 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    1 TABLE ACCESS BY INDEX ROWID ACCESS$ (cr=4 r=3 w=0 time=27026 us)     <br>
    1 INDEX RANGE SCAN I_ACCESS1 (cr=3 r=2 w=0 time=21717 us)(object id 129)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select /*+ index(idl_sb4$ i_idl_sb41) +*/ piece#,length,piece      <br>
    from     <br>
    idl_sb4$ where obj#=:1 and part=:2 and version=:3 order by piece#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.00 0 0 0 0     <br>
    Fetch 3 0.00 0.02 3 7 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 7 0.00 0.02 3 7 0 1     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    0 TABLE ACCESS BY INDEX ROWID IDL_SB4$ (cr=2 r=2 w=0 time=19830 us)     <br>
    0 INDEX RANGE SCAN I_IDL_SB41 (cr=2 r=2 w=0 time=19826 us)(object id 123)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select /*+ index(idl_ub1$ i_idl_ub11) +*/ piece#,length,piece      <br>
    from     <br>
    idl_ub1$ where obj#=:1 and part=:2 and version=:3 order by piece#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.00 0 0 0 0     <br>
    Fetch 3 0.00 0.03 3 9 0 2     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 7 0.00 0.03 3 9 0 2     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    0 TABLE ACCESS BY INDEX ROWID IDL_UB1$ (cr=2 r=2 w=0 time=21757 us)     <br>
    0 INDEX RANGE SCAN I_IDL_UB11 (cr=2 r=2 w=0 time=21753 us)(object id 120)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select /*+ index(idl_char$ i_idl_char1) +*/ piece#,length,piece      <br>
    from     <br>
    idl_char$ where obj#=:1 and part=:2 and version=:3 order by piece#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.00 0 0 0 0     <br>
    Fetch 2 0.00 0.01 2 4 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 6 0.00 0.01 2 4 0 0     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    0 TABLE ACCESS BY INDEX ROWID IDL_CHAR$ (cr=2 r=2 w=0 time=19465 us)     <br>
    0 INDEX RANGE SCAN I_IDL_CHAR1 (cr=2 r=2 w=0 time=19461 us)(object id 121)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select /*+ index(idl_ub2$ i_idl_ub21) +*/ piece#,length,piece      <br>
    from     <br>
    idl_ub2$ where obj#=:1 and part=:2 and version=:3 order by piece#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.00 0 0 0 0     <br>
    Fetch 2 0.00 0.01 2 4 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 6 0.00 0.01 2 4 0 0     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    0 TABLE ACCESS BY INDEX ROWID IDL_UB2$ (cr=2 r=2 w=0 time=15070 us)     <br>
    0 INDEX RANGE SCAN I_IDL_UB21 (cr=2 r=2 w=0 time=15066 us)(object id 122)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select baseobject,type#,update$,insert$,delete$,refnewname,refoldname,     <br>
    whenclause,definition,enabled,property,sys_evts,nttrigcol,nttrigatt,     <br>
    refprtname,rowid      <br>
    from     <br>
    trigger$ where obj# =:1     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.00 1 2 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.00 1 2 0 1     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    1 TABLE ACCESS BY INDEX ROWID TRIGGER$ (cr=2 r=1 w=0 time=9352 us)     <br>
    1 INDEX UNIQUE SCAN I_TRIGGER2 (cr=1 r=1 w=0 time=9340 us)(object id 131)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select owner#      <br>
    from     <br>
    obj$ o where obj# = :1     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 1 0.00 0.00 0 3 0 1     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 3 0.00 0.00 0 3 0 1     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    1 TABLE ACCESS BY INDEX ROWID OBJ$ (cr=3 r=0 w=0 time=15 us)     <br>
    1 INDEX UNIQUE SCAN I_OBJ1 (cr=2 r=0 w=0 time=7 us)(object id 36)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select tc.type#,tc.intcol#,tc.position#,c.type#, c.length,c.scale,     <br>
    c.precision#,c.charsetid,c.charsetform      <br>
    from     <br>
    triggercol$ tc,col$ c ,trigger$ tr where tc.obj#=:1 and c.obj#=:2 and      <br>
    tc.intcol#=c.intcol# and tr.obj# = tc.obj# and (bitand(tr.property,32) !=      <br>
    32 or bitand(tc.type#,20) = 20) union select type#,intcol#,position#,69,0,0,     <br>
    0,0,0 from triggercol$ where obj#=:3 and intcol#=1001 union select tc.type#,     <br>
    tc.intcol#,tc.position#,121,0,0,0,0,0 from triggercol$ tc,trigger$ tr where      <br>
    tr.obj# = tc.obj# and bitand(tr.property,32) = 32 and tc.obj# = :4 and      <br>
    bitand(tc.type#,20) != 20     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 0     <br>
    Fetch 34 0.00 0.05 8 236 0 33     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 36 0.00 0.05 8 236 0 33     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    33 SORT UNIQUE (cr=236 r=8 w=0 time=54877 us)     <br>
    33 UNION-ALL (cr=236 r=8 w=0 time=54606 us)     <br>
    33 NESTED LOOPS (cr=197 r=8 w=0 time=53779 us)     <br>
    33 NESTED LOOPS (cr=162 r=8 w=0 time=53053 us)     <br>
    77 TABLE ACCESS CLUSTER COL$ (cr=83 r=6 w=0 time=40045 us)     <br>
    1 INDEX UNIQUE SCAN I_OBJ# (cr=2 r=2 w=0 time=13764 us)(object id 3)     <br>
    33 INDEX RANGE SCAN I_TRIGGERCOL2 (cr=79 r=2 w=0 time=12523 us)(object id 133)     <br>
    33 TABLE ACCESS BY INDEX ROWID TRIGGER$ (cr=35 r=0 w=0 time=466 us)     <br>
    33 INDEX UNIQUE SCAN I_TRIGGER2 (cr=2 r=0 w=0 time=152 us)(object id 131)     <br>
    0 INDEX RANGE SCAN I_TRIGGERCOL2 (cr=2 r=0 w=0 time=5 us)(object id 133)     <br>
    0 NESTED LOOPS (cr=37 r=0 w=0 time=574 us)     <br>
    33 INDEX RANGE SCAN I_TRIGGERCOL2 (cr=2 r=0 w=0 time=81 us)(object id 133)     <br>
    0 TABLE ACCESS BY INDEX ROWID TRIGGER$ (cr=35 r=0 w=0 time=350 us)     <br>
    33 INDEX UNIQUE SCAN I_TRIGGER2 (cr=2 r=0 w=0 time=139 us)(object id 131)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    select grantee#,privilege#,nvl(col#,0),max(mod(nvl(option$,0),2))     <br>
    from     <br>
    objauth$ where obj#=:1 group by grantee#,privilege#,nvl(col#,0) order by      <br>
    grantee#     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 3 0.00 0.00 0 0 0 0     <br>
    Execute 3 0.00 0.00 0 0 0 0     <br>
    Fetch 3 0.00 0.00 0 6 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 9 0.00 0.00 0 6 0 0     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
    ********************************************************************************     <br>
         <br>
    UPDATE     <br>
    SET     <br>
    WHERE ref_appln_no = :b1     <br>
    AND flg_mnt_status = 'A'     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.16 9 8 17 1     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 2 0.00 0.16 9 8 17 1     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    select type#,blocks,extents,minexts,maxexts,extsize,extpct,user#,iniexts,     <br>
    NVL(lists,65535),NVL(groups,65535),cachehint,hwmincr, NVL(spare1,0)      <br>
    from     <br>
    seg$ where ts#=:1 and file#=:2 and block#=:3     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 3 0.00 0.00 0 0 0 0     <br>
    Execute 3 0.00 0.00 0 0 0 0     <br>
    Fetch 3 0.00 0.01 3 9 0 3     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 9 0.00 0.01 3 9 0 3     <br>
         <br>
    Misses in library cache during parse: 0     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
         <br>
    Rows Row Source Operation     <br>
    ------- ---------------------------------------------------     <br>
    1 TABLE ACCESS CLUSTER SEG$ (cr=3 r=3 w=0 time=17332 us)     <br>
    1 INDEX UNIQUE SCAN I_FILE#_BLOCK# (cr=2 r=2 w=0 time=10258 us)(object id 9)     <br>
         <br>
    ********************************************************************************     <br>
         <br>
    INSERT INTO ci_dedupe_details     <br>
    VALUES     <br>
    (     <br>
    :b31,     <br>
    :b32,     <br>
    :b31,     <br>
    :b30,     <br>
    :b29,     <br>
    :b28,     <br>
    :b27,     <br>
    :b26,     <br>
    :b25,     <br>
    :b24,     <br>
    :b23,     <br>
    :b22,     <br>
    :b21,     <br>
    :b20,     <br>
    :b19,     <br>
    :b18,     <br>
    :b17,     <br>
    :b16,     <br>
    :b15,     <br>
    :b14,     <br>
    :b13,     <br>
    :b12,     <br>
    :b11,     <br>
    :b10,     <br>
    :b9,     <br>
    :b8,     <br>
    :b7,     <br>
    :b6,     <br>
    :b5,     <br>
    :b4,     <br>
    :b3,     <br>
    :b2,     <br>
    :b1,     <br>
    'N',     <br>
    0,     <br>
    'E' )     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.01 0.03 4 1 5 1     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 2 0.01 0.03 4 1 5 1     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    select /*+ rule */ bucket_cnt, row_cnt, cache_cnt, null_cnt, timestamp#,      <br>
    sample_size, minimum, maximum, distcnt, lowval, hival, density, col#,      <br>
    spare1, spare2, avgcln      <br>
    from     <br>
    hist_head$ where obj#=:1 and intcol#=:2     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 36 0.00 0.00 0 0 0 0     <br>
    Fetch 36 0.00 0.02 3 108 0 36     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 73 0.00 0.02 3 108 0 36     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: RULE     <br>
    Parsing user id: SYS (recursive depth: 2)     <br>
    ********************************************************************************     <br>
         <br>
    COMMIT     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 2 0.00 0.01 0 0 1 0     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 4 0.00 0.01 0 0 1 0     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61 (recursive depth: 1)     <br>
    ********************************************************************************     <br>
         <br>
    BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;     <br>
         <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 1 0.00 0.00 0 0 0 0     <br>
    Execute 1 0.00 0.00 0 0 0 1     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 2 0.00 0.00 0 0 0 1     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Optimizer goal: CHOOSE     <br>
    Parsing user id: 61      <br>
         <br>
         <br>
         <br>
    ********************************************************************************     <br>
         <br>
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 2 0.00 0.00 0 0 0 0     <br>
    Execute 3 0.00 820.23 0 0 0 2     <br>
    Fetch 0 0.00 0.00 0 0 0 0     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 5 0.00 820.23 0 0 0 2     <br>
         <br>
    Misses in library cache during parse: 1     <br>
    Misses in library cache during execute: 1     <br>
         <br>
         <br>
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS     <br>
         <br>
    call count cpu elapsed disk query current rows     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    Parse 49 0.00 0.10 3 3 0 0     <br>
    Execute 755577 14.25 11.90 17 10 29 3     <br>
    Fetch 4910422 92.89 130.18 39671 6442895 0 4532611     <br>
    ------- ------ -------- ---------- ---------- ---------- ---------- ----------     <br>
    total 5666048 107.14 142.19 39691 6442908 29 4532614     <br>
         <br>
    Misses in library cache during parse: 11     <br>
         <br>
    17 user SQL statements in session.     <br>
    35 internal SQL statements in session.     <br>
    52 SQL statements in session.     <br>
    ********************************************************************************     <br>
    Trace file: afhuat_ora_2204.trc     <br>
    Trace file compatibility: 9.00.01     <br>
    Sort options: default     <br>
         <br>
    1 session in tracefile.     <br>
    17 user SQL statements in trace file.     <br>
    35 internal SQL statements in trace file.     <br>
    52 SQL statements in trace file.     <br>
    36 unique SQL statements in trace file.     <br>
    5666466 lines in trace file.     <br>
    Regards<br>
    vamsi krishna<br>

  • Window doesn't close wheh Call Library Function Node set to Run in Any Thread

    This is a problem regarding Call Library Function Nodes running in the UI thread or any thread.
    I have a camera which has its own API supplied as a dll. I have created a set of VI wrappers which each call a function in the dll through a Call Library Function Node.
    Initially each CLFN was set to 'Run in the UI thread' (the default).
    To start the camera streaming images I call (through a CLFN)
    ICubeSDK_Start(int CamIndex, Hwnd, ImgHandle, bool Preview, bool callback);
    If Preview = True then the image is displayed in a preview window.
    If ImgHandle = NULL a default preview window
    is used.
    In the CLFN definition I define:
    ImgHandle as a U32
    Preview as a I32
    To stop the camera streaming images I call
        ICubeSDK_Stop(int CamIndex)
    In the actual implementation I set ImgHandle = 0 (NULL) and Preview = 1 (true).
    This all works fine, and a preview window is opened and images displayed. When I call ICubeSDK_Stop the preview window is closed.
    However, I would prefer to set the CLFN to 'Run in any thread' because
    a) when run in the UI thread the preview window randomly gets sent to the back when I switch focus between open VI windows (presumably because it is in the same thread as the VIs)
    b) I don't want to put unnecessary stuff in the UI thread
    c) my (naive?) understanding is that it is safer to run in any thread
    So I have set all CLFNs to 'Run in any thread'
    When I do this the preview window opens OK, and behaves like any other non LabVIEW controlled window in terms of focus. But when I call ICubeSDK_Stop() the preview window does not get closed properly, it just shows a blank image. I can't close it manually, there is no X in the corner and no option to close it from the taskbar. To get rid of it I have to close the LabVIEW project it is spawned from, which often results in a crash. It does appear as a separate item in task manager but if I 'end process' it, LabVIEW closes (and often crashes) as well.
    If I change only the CLFNs that call the Start and Stop functions back to 'Run in the UI thread' then it all works fine again, except that the preview window gets sent to the back randomly as before.
    So, what do I have to do to get the preview window to close properly if I set the CLFN to 'Run in any thread'.
    Alternatively, is there a way to close the window programmatically (ie force it to close) after I have called ICube_Stop.
    Thanks
    DAve

    Hi Dave,
    The "Run In UI Thread"  switches from the thread the VIs currently executing in to the user interface thread. If you select "Run in Any Thread", the Call Library Function Node continues in the currently executing thread. By default, all Call Library Function Nodes run in the User Interface thread.
    Before you configure the Call Library Function Node to run in any thread, you have to make sure that the code is thread safe. Code is thread safe when it does not store any global data (e.g. global variables, files on disks, etc.), does not access any hardware, does not make calls to any functions, libraries or drivers that are not thread safe.
    Unfortunately, since you said that your DLL accesses hardware, it is not recommended to use "Run in Any Thread." This is probably why you are seeing the crash.
    If your preview window gets sent to the back you can programmatically bring it forward. Here is an example of how this can be done: http://decibel.ni.com/content/docs/DOC-4551
    If you want to completely close the window down you can do so as described in this link: http://digital.ni.com/public.nsf/allkb/81E9C144190​0FFCE8625748F0055DBB0?OpenDocument
    I also thought you might find this useful: http://zone.ni.com/devzone/cda/tut/p/id/3009
    I hope this helps.
    Regards,
    Mahdieh G
    Applications Engineer
    National Instruments UK&Ireland

  • Calling a function from a DLL, exectution in background mode.

    Dear Experts,
    We have created an ABAP report the calls a function from a DLL file. If the report is executed in on-line mode the program calls and executes the function from the DLL, but if the ABAP programa is executed in background mode it doesnt calls the DLL function.
    Do you know a way to solve the problem when executing in background mode?
    Best regards.
    Antonio

    Hi Gabriel,
    Let me explain in details about my DLL function.
    We are importing the business partners from legacy system into the SAP CRM system, so at the moment we created the BP master data via BAPI, I get the name of the BP and this moment I call the function in the DLL file. I export the parameter name and I receive back a simplified string with the name reduced to a code. This code I get back from the dll it is insert in a Z table, so there is no interaction in the screen, all must be executed in background mode, because there are a lot of business partners to be converted in SAP system.
    I am sending my code for your considerations.
    Instancia a DLL
      CREATE OBJECT dll 'MTCODE.CPFONET'.
      IF sy-subrc NE 0.
        RAISE without_dll.
      ENDIF.
    Move para a tabela interna IT_NAME os valores recebidos na TI_NAME
      it_name[] = ti_name[].
    Para cada registro importado
      LOOP AT it_name.
        CLEAR v_string_ret.
        wa_matchcode-zregid     = it_name-zregid.
        wa_matchcode-name1_text = it_name-name1_text.
        v_string = it_name-name1_text.
        CONDENSE  v_string.
        TRANSLATE v_string TO UPPER CASE.
        CALL METHOD  OF dll 'SetNome' EXPORTING #1 = v_string.
        CALL METHOD  OF dll 'ExecMatch'.
        CALL METHOD  OF DLL 'GetMCData' = v_string_ret.
        FREE OBJECT dll.
      Preenche os campos do match-code de acordo com o retorno da DLL
        SPLIT v_string_ret
        AT '|'
        INTO wa_matchcode-zparmcln
             wa_matchcode-zparmcfn
             v_empty
             wa_matchcode-name_first
             wa_matchcode-name_last
             wa_matchcode-namemiddle.
      Adiciona o registro com o match-code correspondente na TE_MATCHCODE
        APPEND wa_matchcode TO te_matchcode.
      ENDLOOP.

  • How can I call a function from a procedure

    I have a function named: f_calc_value which return the variable v_result. This function is part of a package.
    How can I call this function from a new procedure I am creating?
    Thanks

    or refer this theread....calling function from procedure

  • Unable to debug an exit in CALL CUSTOMER FUNCTION 003

    Hi Guys,
    I have an exit EXIT_SAPMV45A_003 that is called by CALL CUSTOMER FUNCTION 003. I had placed a break point at
    CALL CUSTOMER FUNCTION 003 and the debugger stops here but i am unable to debug inside this to reach into
    the code in EXIT_SAPMV45A_003 even after setting the system debugging on & Update debugging
    ON.
    Can someone help me with this?
    thanks
    Dan

    You have to include that Enhancement of that exit in the Project and Activate that project in the CMOD.
    The Enhancement for the exit EXIT_SAPMV45A_003 is V45A0003.
    Create a project in CMOD
    And inclue V45A0003 in the project.
    Activate the Project.
    Now, it will stop at break point.
    Regards,
    Naimesh Patel

  • How to call a function module from a transformation

    Hi,
    Could somebody please let me know how I can call an abap function module from a transformation (abap xslt program). I know how to call the class methods from transformation, but how do i call a function module..?
    Thanks,
    Shashi.
    Edited by: Shashi Kanth Kasam on Apr 8, 2010 12:45 PM

    Ya. I can do that. But I don't want to use a class and a method to call that function module. Want to directly call function module from transformation. Is that possible..?
    Thanks,
    Shashi

Maybe you are looking for

  • Commit and rollback on session level

    Hi All, I am calling one stored procedure and I am doing some dml operation in that sp. there after I calling another sp which contain some ddl operations. if process may be fail in somewhere I wanted to rollback all dml transactions. So I wanted to

  • ISE version 1.0 - Unable to get management access for cisco devices

    Hi All, I want to manage all cisco devices with read and write privilege with ISE 1.0. Is this functionality is available in this version? I configured the 2960 switch.  On switch  redius test is successful. When I telnet to the switch, it ask for us

  • HT204204 iPad no vga

    SSince up dating iOS no VGA from the dock connector. I went to the Apple Store and they confirmed it is a bug in the new iOS. I will have to wait until apple does a fix dixk

  • Playing old games on OS X version 10.5.3

    I can't play my favorite game ever because it says the computer doesn't support the "classic environment". Is there a way around this? Thanks.

  • Cut and Paste Between adjacent "Spaces"  How to ??

    Is it possible to either configure or command "Spaces" to display SIMULTANEOUSLY on my screen documents contained in, say, "Space 1" and "Space 2" ? If I had a Word document open in one space and a web page in another space, could I select and copy t