How to handle errno in native function?

How to get the correct errno in a native function? I'm using Unix message queues in my native methods and I always get the errno = 0 (it should be ENOMSG = 35) returned when the desired message is not yet available (calling msgrcv with IPC_NOWAIT set). This program is running on IBM AIX 4.3. Please help...

I cached and printed the errno in my C native function
and it was 0?Well there are several possibilities.
One it is zero. Which means that there is mis-match on your part as to why it should have a different value. If you print the value out in your C code right after you get it and it is zero then this is definitely the problem. The most likely reason is because the data that you pass is not what you think it is.
Or you are not returning the cached value to java but rather something else. If you print the value out in your C code just after you get it, and it has the correct value then this is your problem. The mostly likely reason for this is that you are actually using two different variables (but you think it is one variable.) One possible reason for this is different way "static" is handled in C and C++. But there could be others.

Similar Messages

  • Exit handling in native function by JNI

    Hi everyone,
    We are developing a Java application using native function calls through JNI in Linux.
    The application starts and calls a native function and the native function attach a signal
    handler and an exit handler. In addition, in the native function, we fork another process
    and in the forked process, we calls a several java-side methods. It works in normal cases.
    However, when System.exit() is called in the java-side methods invoked by a native function,
    the application is stopped. Thus we add shutdown hook (Runtime.getRuntime().addShutdownHook())
    to treat this case. The shutdown hook just calls a native method, and the native method
    just calls exit(). We expect the calling exit() in the native method invoked in shutdown hook for JVM
    invokes our exit handler which is attached in advance. It looks working well.
    But, sometimes we find several garbage(?) jvm processes (we can see the process named as "java"
    in using Linux command "ps"). The parent process of these processes is init process (pid = 1).
    With the pid of these processes, we suspect the processes are created when we fork another process
    in native function invoked through JNI. However it is not happened every times in our application.
    Why the garbage java processes remain? Is there any problem in the calling exit() in the native
    method invoked during JVM Shutdown process?
    I hope any answers for this problem.
    Thanks in advance,
    Seung-Uk Oh

    Thus we add shutdown hook
    (Runtime.getRuntime().addShutdownHook())
    to treat this case. The shutdown hook just calls a
    native method, and the native method
    just calls exit(). We expect the calling exit() in the
    native method invoked in shutdown hook for JVM
    invokes our exit handler which is attached in advance.
    It looks working well.I wouldn't think that was a good idea.
    You are terminating the JVMs normal exit process. Why don't you just register the exit processes in your own stack and call them with the native method?

  • I bought a cd with Lightroom 5. After installation and registration I am not able to use 'help' function and I cannot update the software. I anyone able to give me a hint how to handle it? Thank you ind advance Karl

    I bought a cd with Lightroom 5. After installation and registration I am not able to use 'help' function and I cannot update the software. Is anyone able to give me a hint how to handle it?
    Thank you in advance
    arl

    Hi Keith, sorry for my late reply.
    Surely I am able to connect to the help function when Icontact the website
    of AdobeLR5.The problem is as follows,
    When I open LR5 on my computer and work with it and try to open the help
    function in the software, I don't get it.
    When I bought the CD I was naiv enough to believe that I get an independent
    working software. I learned in the meantime, that the seller does not allow
    to work with, without being connected to them.
    I don't believe that I am paranoid, but I like to buy something and use it
    without to inform the supplier that I do it. Otherwise I could have bought
    the license fpr LR5 via internet.
    Best regards
    Karl
    2015-01-02 13:42 GMT+01:00 kglad <[email protected]>:
        I bought a cd with Lightroom 5. After installation and registration I
    am not able to use 'help' function and I cannot update the software. I
    anyone able to give me a hint how to handle it? Thank you ind advance Karl
    kglad <https://forums.adobe.com/people/kglad?et=watches.email.outcome>
    marked Keith_Reeder
    <https://forums.adobe.com/people/Keith_Reeder?et=watches.email.outcome>'s
    reply on I bought a cd with Lightroom 5. After installation and
    registration I am not able to use 'help' function and I cannot update the
    software. I anyone able to give me a hint how to handle it? Thank you ind
    advance Karl
    <https://forums.adobe.com/thread/1669640?et=watches.email.outcome> as
    helpful. View the full reply
    <https://forums.adobe.com/message/7059196?et=watches.email.outcome#7059196>

  • How to handle JCO Exceptions at JCO (RFC) function call

    Hello Forum,
    I am implementing an JCO Server scenario.
    I use dynamic repositories like Example7.java from the JCO documentation.
    Example7 throws an JCO.AbapException if anything went wrong, e.g. the function is not implemented.
    How to react on this AbapException?
    The examples in SAP Help documentation only catch
    SYSTEM_FAILURE and COMMUNICATION_FAILURE.
    All other RFC modules I have seen which declare the function modules to be used by dynamic JCO repositories (like Example7.java) do not define any other Exception parameters.
    But these two are only thrown and caught when something with communication went completely wrong, e.g. RFC not found.
    But when RFC can be reached and the JCO Server is executing the Java method, an AbapException could be thrown on error. How to react on this?
    In my implementation based on the examples I always get a ABAP dump. The dump says:
    Exception named  without message text. Why that name?
    How to handle this type of exception in order to avoid the dump?
    Can anyone post an example please?
    Thanks,
    Carsten
    Edited by: Carsten Schön on Apr 15, 2008 4:22 PM
    Edited by: Carsten Schön on Apr 15, 2008 4:24 PM

    Hi Micky,
    thanks for your quick response.
    If so, to throw JCO.AbapException on JCO Server side is not correct?
    What I do is throwing the JCO.AbapException (like in the JCO Example 7).
    At the RFC call in APAB I handle both exceptions SYSTEM_FAILURE and COMMUNICATION_FAILURE like
    CALL FUNCTION 'MY_JCO_FUNCTION_MODULE'
        DESTINATION JCO_DEST
        <...>
        EXCEPTIONS
          SYSTEM_FAILURE        = 1  MESSAGE RFC_MESS
          COMMUNICATION_FAILURE = 2  MESSAGE RFC_MESS.
    This works as far something with RFC is wrong, e.g. Server can not find the function or Server not reachable.
    But the AbapException thrown by the JCO Server (Java) is not handled that way. Why?
    Sorry if this is the wrong forum but I tried posting in Netweaver integration and got no answer for 1 week and because it's ABAP related I thought the topic suites here.
    Carsten
    Edited by: Carsten Schön on Apr 15, 2008 5:10 PM

  • How to compile and creat JAR with native function

    Hi there,
    I wrote some native function for J2ME. But it seems like using J2ME wireless Toolkits, we can not compile native function. Is it right?
    Is anyone knowing how to compile and make JAR with J2MEWTK or command line?
    Thanks,
    Merry Christmas!!

    [zack327],
    JNI like or native interfaces APIs is not supported in the CLDC/MID Profile 1.0 specification. If you have J2ME code that includes JNI code, the J2MEWTK tool will not compile successfully for you.
    To package the compiled code to a MIDlet suite .jar file, use the 'Package' command in the J2MEWTK toolkit. It is found on the top menu bar 'Project' option as item on the dropdown list.
    To package the MIDlets into a MIDlet suite .jar file from the command line, you can execute the usual jar file command:
    jar cf MyMIDletSuite.jar Midlet.class
    You will also need to create a MIDlet .jad Application Descriptor file as well.
    HTH.
    Allen Lai
    Developer Technical Support
    SUN Microsystems
    http://www.sun.com/developers/support/

  • Can i pass an int * to a native function?

    From Java, can I pass an int pointer to the JNI?
    I want the native function to assign data to an int in the Java program.
    Many thanks!

    838478 wrote:
    Many thanks to both of you for your helpful responses. I pitched my original question somewhat disingenuously in order to be precise. My actual development issue is broader:
    I have C++ API that passes many data types by reference (as pointers or references) in order to modify the passed values. If I were to wrap this API to call it from from Java it sounds as though passing each parameter as an object (e.g. Integer for int would be the cleanest way to go. Does this sound correct?
    One enigma: I have to call a native function with a char * argument that returns with that char * pointing to a buffer of binary data. How should I pass back that binary buffer to Java? As a String? Your problem is not specific enough.
    1. You want to create data, regardless of the type, on the native heap and pass it through java to another native method. Solution: Use a long. You have a pointer to the data (again the type does NOT matter), you cast it to a long, you return that from your first method, pass it into the second, and there you cast the long back to the pointer. The pointer can point to anything you like including complex data types.
    2. You want to create data, of some complex structure, on the native heap and then access that data in java. Then you MUST map it to java types, every piece of data, of every type, specific to the type. So a native int maps to a java int (if the sizes match), a char* maps to a String, etc. You MUST create in some fashion every java data item that you need. There are NO shortcuts.

  • How to handle error message during PAI?

    Hi Experts,
    Need help here.
    In my dialog screen, I have a field which is typed 'QUAN'.
    In entering different format , e.g. with non numeric value or a negative value, an error message appear and it does not process the MODULES inside the chain or FIELD MODULE ON REQUEST.
    Does anyone knows how to handle this kind of error. I need to display into a separate screen the errors I encountered coz I'm creating a new RF transaction.
    Points will be rewarded.
    Thanks in advance.

    Hai
    in your case(RF case) it is other way...
    yes you can use
    field x_currency module check_currency.
    in module check_currency.
    you have to display errors in another screen say 200.
    in that there will be 4 fields, all are display only fields.
    X_MESSAGE-MSGV1  of type sy-msgv1
    X_MESSAGE-MSGV2  of type sy-msgv2
    X_MESSAGE-MSGV3 of type sy-msgv3
    X_MESSAGE-MSGV4 of type sy-msgv4
    you populate the messages with these fields and then display it in the screen.
      method check_currency.
    *--do all your checks here....
           if error
             clear x_message.
            x_message-msgv1 = 'Enter Valid Employee Number'(004).
            leave to screen 0200.
          endif.
        endif.
    ENDMODULE.                 " VALIDATE_Currency
    in screen 200 PBO you need to format the message
    using the below logic.
           Method for formatting the message
      method message_format.
        data : lt_text type table of tline,         "text table
               lx_text type tline.                  "work area
        refresh lt_text.
        clear lx_text.
        concatenate x_message-msgv1 x_message-msgv2 into lx_text-tdline
          separated by space.
        append lx_text to lt_text.
        clear lx_text.
        concatenate x_message-msgv3 x_message-msgv4 into lx_text-tdline
          separated by space.
        append lx_text to lt_text.
    *- formatting the message
        call function 'FORMAT_TEXTLINES'
          exporting
            formatwidth = 20
          tables
            lines       = lt_text
          exceptions
            bound_error = 1
            others      = 2.
        clear: x_message.
    *- transfer the message data to screen fields
        loop at lt_text into lx_text.
          if sy-tabix = 1.
            x_message-msgv1 = lx_text-tdline.
          elseif sy-tabix = 2.
            x_message-msgv2 = lx_text-tdline.
          elseif sy-tabix = 3.
            x_message-msgv3 = lx_text-tdline.
          elseif sy-tabix = 4.
            x_message-msgv4 = lx_text-tdline.
          else.
            exit.
          endif.
        endloop.
      endmethod.                    "message_format
    Regards
    Vijay

  • Duplicate check via BAS (ADDRESS_SEARCH)-- how to handle non-crm customer?

    Dear all,
    I'm implementing a duplicate check and using the BADI Address_search. Within this BADI I use the method "Address_Search" for calling a third party software tool with customer information. This tool checks whether the entered customer is already available in CRM AND in other system in our company holding.
    The method provides me a list of all found duplicates (incl. non-crm customers)
    My problem is that I need to fill a export table "ex_t_search_result" (type adkey_indx_tab) of this method which expects ADRC number. For the CRM customer it is not a problem. I can figure them out by table BUT020 and the customer number. But for the non-crm customer I do not have a ADRC number.
    I know there are some methods for creating addresses in BAS (function group SZA0), but actually Im not sure how to handle them.
    Does anybody of you had faced a similar issue?
    Thanks for your help
    Firat C.

    hello,
    BP is BDT (Business Data toolset) enabled (you can check it by adding break point in FM BUS_PBO and executing BP transaction). You can add your check directly to standard view (the check will be executed each time when user pushes enter) or you could add you check to appropriate action (during saving etc.) there are number of actions which you could use it depends on your requirements. You can find a lot of info about BDT (if you are not familiar) in Wiki.
    br,
    dez_

  • How to handle multiple selection in the Spark List control with checkbox as itemrenderer?

    Hi All,
    I am using checkbox as an ItemRenderer in spark list.
    I have a query.
    how to handle multiple selection in the Spark List control with checkbox as itemrenderer?
    how to retrieve the selected item label?
    Thank you in advance.

    Hi there, I'll tweak your code a little bit to something like this:
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    layout="vertical">
        <mx:Script>
            <![CDATA[
                 import mx.events.ListEvent;
                 import mx.controls.CheckBox;
               [Bindable]
               private var mySelectedIndexes:ArrayCollection=new ArrayCollection();
                private function onChange(e:ListEvent):void
                   if(CheckBox(e.itemRenderer).selected){
                             mySelectedIndexes.addItem(e.rowIndex);
                   }else{
                                  mySelectedIndexes.removeItemAt(mySelectedIndexes.getItemIndex(e.rowIndex));     
                   chkList.selectedIndices=mySelectedIndexes.toArray();
            ]]>
        </mx:Script>
    <mx:ArrayCollection id="collection">
            <mx:Object label="Test A"/>
            <mx:Object label="Test B"/>
            <mx:Object label="Test C"/>
            <mx:Object label="Test D"/>
            <mx:Object label="Test E"/>
            <mx:Object label="Test F"/>
            <mx:Object label="Test G"/>
        </mx:ArrayCollection>
    <mx:List id="chkList" dataProvider="{collection}" itemRenderer="mx.controls.CheckBox"  itemClick="onChange(event);" allowMultipleSelection="true"/>
    </mx:Application>

  • How to write the exceptions in function module

    dear all,
         how to write the exceptions in function modules with example.
    thanq
    jyothi

    Hi,
    Raising Exceptions
    There are two ABAP statements for raising exceptions. They can only be used in function modules:
    RAISE except.
    und
    MESSAGE.....RAISING except.
    The effect of these statements depends on whether the calling program handles the exception or not. The calling program handles an exception If the name of the except exception or OTHERS is specified after the EXCEPTION option of the CALL FUNCTION statement.
    If the calling program does not handle the exception
    · The RAISEstatement terminates the program and switches to debugging mode.
    · The MESSAGE..... RAISING statement displays the specified message. Processing is continued in relation to the message type.
    If the calling program handles the exception, both statements return control to the program. No values are transferred. The MESSAGE..... RAISING statement does not display a message. Instead, it fills the system fields sy-msgid, sy-msgty, sy-msgno , and SY-MSGV1 to SY-MSGV4.
    Source Code of READ_SPFLI_INTO_TABLE
    The entire source code of READ_SPFLI_INTO_TABLE looks like this:
    FUNCTION read_spfli_into_table.
    ""Local Interface:
    *" IMPORTING
    *" VALUE(ID) LIKE SPFLI-CARRID DEFAULT 'LH '
    *" EXPORTING
    *" VALUE(ITAB) TYPE SPFLI_TAB
    *" EXCEPTIONS
    *" NOT_FOUND
    SELECT * FROM spfli INTO TABLE itab WHERE carrid = id.
    IF sy-subrc NE 0.
    MESSAGE e007(at) RAISING not_found.
    ENDIF.
    ENDFUNCTION.
    The function module reads all of the data from the database table SPFLI where the key field CARRID is equal to the import parameter ID and places the entries that it finds into the internal table spfli_tab. If it cannot find any entries, the exception NOT_FOUND is triggered with MESSAGE ... RAISING. Otherwise, the table is passed to the caller as an exporting parameter.
    Calling READ_SPFLI_INTO_TABLE
    The following program calls the function module READ_SPFLI_INTO_TABLE:
    REPORT demo_mod_tech_fb_read_spfli.
    PARAMETERS carrier TYPE s_carr_id.
    DATA: jtab TYPE spfli_tab,
    wa LIKE LINE OF jtab.
    CALL FUNCTION 'READ_SPFLI_INTO_TABLE'
    EXPORTING
    id = carrier
    IMPORTING
    itab = jtab
    EXCEPTIONS
    not_found = 1
    OTHERS = 2.
    CASE sy-subrc.
    WHEN 1.
    MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno.
    WHEN 2.
    MESSAGE e702(at).
    ENDCASE.
    LOOP AT jtab INTO wa.
    WRITE: / wa-carrid, wa-connid, wa-cityfrom, wa-cityto.
    ENDLOOP.
    The actual parameters carrier and jtab have the same data types as their corresponding interface parameters in the function module. The exception NOT_FOUND is handled in the program. It displays the same message that the function module would have displayed had it handled the error.
    Or
    just have to decide what exceptions u want and under what conditions.
    then declarethese exeptions under the exceptions tab.
    in the source code of ur function module.
    if
    like this u can code .
    now when u call the function module in tme mainprogram.
    if some error occurs and u have declared a exception for this then it will set sy-subrc = value u give inthe call of this fm.
    in the fm u can program these sy-subrc values and trigger the code for ur exception.
    Please reward if useful
    Regards,
    Ravi
    Edited by: Ravikanth Alapati on Mar 27, 2008 9:36 AM

  • How to handle the dynamic rows in pdf table

    Dear All,
    earlier i posted one thread reagarding getting pdf table data
    [facing problem while getting interactive form table data;
    this is working fine, i sued bind_table in wddoinit, but here i am fixing the rows count and bind_table.
    for example i have initially taken row count as 3 then i want to increase the rows in pdf table.
    i know we can use the formcalc to increase the rows by taking a button in pdf layout.
    this also working, but the data is not picking for newly added rows, i hope the problem is because the table node in the context is not binded for this new rows.
    even i tried using with webdynpro native button controlls still not working.
    any one help me what exactly this bind_table is doing and how to handle this code in form calc.
    since my table is pdf table.
    Thanks,
    Mahesh.Gattu

    Hi Thomas,
    Thanks for your confirmation,
    i have checked the paramets of submit button we have only wdevent parameters they are
    CL_WD_CUSTOM_EVENT
              PARAMETERS - Hashed table having 2 columns
              ID     ->IF_TDS (Interactive Form element Name)
             CONTEXT_ELEMENT     ->->
    these are same in case of submit button1 and submit button 2.
              NAME - Name of the Button Event i.e ON_SUBMIT (  this is also same in both the buttons).
    so i think it is not possible to work with multiple buttons by assinging to multiple tables on form.
    The other option is to place the buttons outside of the forum in the surrounding WDA area.
    This way you have no problem handling the events.
    in wddoinit if i use bind_table with 5 rows form table is populating with 5 rows, but when i take a button
    out side the form and use bind_table by incremeting the rows the pdf table rows are not adding, if i enter
    some thing on pdf table then click on add row button then the table rows are getting add. if i don't do any
    action on pdf table and click on add row button pdf is not getting update.
    is there any issue.. if i don't keep cursor on table and type some thing.. the add button is not updating
    the rows.
    if i take a  button on wd view i.e outside the form and use bind table i shall add the rows.. but in case of remove rows how to do.
    in case of normal table we can use Remove_Element( ) but how can i know the selected row from the pdf table, please help me in this concern also.
    Regards,
    Mahesh.Gattu
    Edited by: Maheshkumar gattu on Jan 7, 2009 3:57 PM
    Edited by: Maheshkumar gattu on Jan 7, 2009 4:03 PM
    Edited by: Maheshkumar gattu on Jan 7, 2009 5:21 PM

  • How to handle the hyperlink in alv

    Hello friends,
       I made one alv report by using function.. now i want that on one coloum, if user click than it can fetch the information regarding it. please tell me how i can do.. i made a hyperlink on that coloum but i dont know how i handle it..
    Regards,
    Reema Jain.

    REPORT zdemoab.
    TYPE-POOLS: slis.
    TABLES: mara.
    TYPES: BEGIN OF t_itab,
           matnr TYPE mara-matnr,
           mtart TYPE mara-mtart,
           END OF t_itab.
    DATA: itab TYPE TABLE OF t_itab,
          wa_itab like line of itab.
    DATA: i_fieldcat TYPE slis_t_fieldcat_alv,
          wa_fieldcat LIKE LINE OF i_fieldcat,
          i_layout TYPE slis_layout_alv,
          g_repid TYPE sy-repid.
    SELECT matnr mtart INTO TABLE itab FROM mara UP TO 10 ROWS.
    CLEAR: wa_fieldcat.
    wa_fieldcat-col_pos = 0.
    wa_fieldcat-fieldname = 'MATNR'.
    wa_fieldcat-tabname = 'MARA'.
    wa_fieldcat-hotspot = 'X'.
    APPEND wa_fieldcat TO i_fieldcat.
    CLEAR: wa_fieldcat.
    wa_fieldcat-col_pos = 1.
    wa_fieldcat-fieldname = 'MTART'.
    wa_fieldcat-tabname = 'MARA'.
    APPEND wa_fieldcat TO i_fieldcat.
    CLEAR: wa_fieldcat.
    i_layout-colwidth_optimize = 'X'.
    i_layout-hotspot_fieldname = 'MATNR'.
    g_repid = sy-repid.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       i_callback_program                = g_repid
       I_CALLBACK_USER_COMMAND           = 'USER_COMMAND '
       is_layout                         = i_layout
       it_fieldcat                       = i_fieldcat[]
      TABLES
        t_outtab                          = itab
    EXCEPTIONS
       program_error                     = 1
       OTHERS                            = 2
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    FORM user_command USING r_ucomm LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
    *   Check field clicked on within ALVgrid report
        IF rs_selfield-fieldname = 'MATNR'.
    *     To pass the material no in ME22 transaction
          READ TABLE itab INTO wa_itab INDEX rs_selfield-tabindex.
    *     Set parameter ID for transaction screen field
          SET PARAMETER ID 'BES' FIELD wa_itab-matnr.
    *     Sxecute transaction ME23N, and skip initial data entry screen
          CALL TRANSACTION 'MM03'.
        ENDIF.
    ENDFORM.

  • How to handle the quotes('') in the procedure?

    Hi all,
    I have been struggling with an issue in the procedure. Let us go to the functionality of the preocedure.
    I am passing a parameter that has text like
    ' INDIA,BANGALORE,"INOX,BLR","THILAK NAGAR,JAYA NAGAR "4TH 'T' BLOCK,BANGALORE",560030'
    Here, INDIA = country field
    BANGALORE = city field
    INOX,BLR = Theatre field
    THILAK NAGAR,JAYA NAGAR "4TH 'T' BLOCK,BANGALORE = address field
    560030 = pin field
    I want to load these fields into the table thru procedure. Here the issue is if any field value come with quotes(") inside the quotes like above address field. Since , please guide me how to handle that quotes while identifying the field value for either or address field or some other one.
    Table structure:
    country varchar2(100 char)
    city varchar2(100 char)
    theatre varchar2(100 char)
    address varchar2(2000 char)
    pin NUMBER
    Procedure Code:
    create or replace
    PROCEDURE prc_rollout_upload( p_text VARCHAR2 )
    AS
    v_quote_ind NUMBER := 0;
    v_first_pos NUMBER := 0;
    v_end_pos NUMBER := 0;
    v_text_data varchar2(32767 CHAR) := p_text;
    v_text_data1 varchar2(32767 CHAR);
    v_text_arr_ind NUMBER := 0;
    v_quote_pos NUMBER := 0;
    v_comma_pos NUMBER := 0;
    type text_rec IS RECORD(country VARCHAR2(20 CHAR),
    CITY VARCHAR2(1000 CHAR),
    exhibitor VARCHAR2(1000 CHAR),
    address VARCHAR2(10000 CHAR),
    PIN varchar2(6)
    type v_text_tab is table of text_rec;
    v_text_array v_text_tab := v_text_tab();
    BEGIN
    -- Fetch the values from the string to a PL/SQL table
    v_text_data1 := v_text_data;
    v_text_arr_ind := v_text_arr_ind + 1;
    v_text_array.extend(v_text_arr_ind);
    -- Country
    IF (INSTR(v_text_data1, CHR(34)) > 0 )
    THEN
    v_quote_ind := INSTR(v_text_data1, CHR(34));
    v_first_pos := INSTR(v_text_data1, CHR(34));
    v_end_pos := INSTR(v_text_data1, CHR(34),1,2);
    v_text_array(v_text_arr_ind).country := SUBSTR(v_text_data1,v_first_pos+1,v_end_pos-2);
    --DBMS_OUTPUT.PUT_LiNE(v_text_array(v_text_arr_ind).country);
    v_text_data1 := SUBSTR(v_text_data1,v_end_pos+2);
    --DBMS_OUTPUT.PUT_LiNE(v_text_data1);
    END IF;
    IF ( v_quote_ind = 0 ) THEN
    v_text_array(v_text_arr_ind).country := SUBSTR(v_text_data1,1,INSTR(v_text_data1,CHR(44))-1);
    --DBMS_OUTPUT.PUT_LiNE(v_text_array(v_text_arr_ind).country);
    v_text_data1 := SUBSTR(v_text_data1,INSTR(v_text_data1,CHR(44))+1);
    -- DBMS_OUTPUT.PUT_LiNE(v_text_data1);
    v_first_pos := 0;
    v_end_pos := 0;
    v_quote_ind := 0;
    END IF;
    -- City
    v_quote_pos := INSTR(v_text_data1,CHR(34));
    v_comma_pos := INSTR(v_text_data1,CHR(44));
    IF ( v_quote_pos < v_comma_pos )
    THEN
    v_quote_ind := INSTR(v_text_data1, CHR(34));
    v_first_pos := INSTR(v_text_data1, CHR(34));
    v_end_pos := INSTR(v_text_data1, CHR(34),1,2);
    v_text_array(v_text_arr_ind).city := SUBSTR(v_text_data1,v_first_pos+1,v_end_pos-2);
    --DBMS_OUTPUT.PUT_LiNE(v_text_array(v_text_arr_ind).city);
    v_text_data1 := SUBSTR(v_text_data1,v_end_pos+2);
    --DBMS_OUTPUT.PUT_LiNE(v_text_data1);
    v_quote_pos := 0;
    v_comma_pos := 0;
    END IF;
    IF ( v_quote_pos > v_comma_pos ) THEN
    v_text_array(v_text_arr_ind).city := SUBSTR(v_text_data1,1,INSTR(v_text_data1,CHR(44))-1);
    -- DBMS_OUTPUT.PUT_LiNE(v_text_array(v_text_arr_ind).city);
    v_text_data1 := SUBSTR(v_text_data1,INSTR(v_text_data1,CHR(44))+1);
    --DBMS_OUTPUT.PUT_LiNE(v_text_data1);
    v_first_pos := 0;
    v_end_pos := 0;
    v_quote_ind := 0;
    v_quote_pos := 0;
    v_comma_pos := 0;
    END IF;
    -- Exhibitor
    v_quote_pos := INSTR(v_text_data1,CHR(34));
    v_comma_pos := INSTR(v_text_data1,CHR(44));
    IF ( v_quote_pos < v_comma_pos )
    THEN
    v_first_pos := INSTR(v_text_data1, CHR(34));
    v_end_pos := INSTR(v_text_data1, CHR(34),1,2);
    v_text_array(v_text_arr_ind).exhibitor := SUBSTR(v_text_data1,v_first_pos+1,v_end_pos-2);
    --DBMS_OUTPUT.PUT_LiNE(v_text_array(v_text_arr_ind).exhibitor);
    v_text_data1 := SUBSTR(v_text_data1,v_end_pos+2);
    --DBMS_OUTPUT.PUT_LiNE(v_text_data1);
    v_quote_pos := 0;
    v_comma_pos := 0;
    END IF;
    IF ( v_quote_pos > v_comma_pos ) THEN
    v_text_array(v_text_arr_ind).exhibitor := SUBSTR(v_text_data1,1,INSTR(v_text_data1,CHR(44))-1);
    --DBMS_OUTPUT.PUT_LiNE(v_text_array(v_text_arr_ind).exhibitor);
    v_text_data1 := SUBSTR(v_text_data1,INSTR(v_text_data1,CHR(44))+1);
    -- DBMS_OUTPUT.PUT_LiNE(v_text_data1);
    v_first_pos := 0;
    v_end_pos := 0;
    v_quote_pos := 0;
    v_comma_pos := 0;
    END IF;
    --Address
    v_quote_pos := INSTR(v_text_data1,CHR(34));
    v_comma_pos := INSTR(v_text_data1,CHR(44));
    IF ( v_quote_pos < v_comma_pos )
    THEN
    v_first_pos := INSTR(v_text_data1, CHR(34));
    v_end_pos := INSTR(v_text_data1, CHR(34),1,2);
    v_text_array(v_text_arr_ind).address := SUBSTR(v_text_data1,v_first_pos+1,v_end_pos-2);
    --DBMS_OUTPUT.PUT_LiNE(v_text_array(v_text_arr_ind).address);
    v_text_data1 := SUBSTR(v_text_data1,v_end_pos+2);
    --DBMS_OUTPUT.PUT_LiNE(v_text_data1);
    v_quote_pos := 0;
    v_comma_pos := 0;
    END IF;
    IF ( v_quote_pos > v_comma_pos ) THEN
    v_text_array(v_text_arr_ind).address := SUBSTR(v_text_data1,1,INSTR(v_text_data1,CHR(44))-1);
    --DBMS_OUTPUT.PUT_LiNE(v_text_array(v_text_arr_ind).address);
    v_text_data1 := SUBSTR(v_text_data1,INSTR(v_text_data1,CHR(44))+1);
    -- DBMS_OUTPUT.PUT_LiNE(v_text_data1);
    v_first_pos :=0;
    v_end_pos := 0;
    v_quote_pos := 0;
    v_comma_pos := 0;
    END IF;
    --PIN
    v_quote_pos := INSTR(v_text_data1,CHR(34));
    v_comma_pos := INSTR(v_text_data1,CHR(44));
    IF ( v_quote_pos < v_comma_pos )
    THEN
    v_first_pos := INSTR(v_text_data1, CHR(34));
    v_end_pos := INSTR(v_text_data1, CHR(34),1,2);
    v_text_array(v_text_arr_ind).pin := SUBSTR(v_text_data1,v_first_pos+1,v_end_pos-2);
    --DBMS_OUTPUT.PUT_LiNE(v_text_array(v_text_arr_ind).pin);
    v_text_data1 := 0;
    --DBMS_OUTPUT.PUT_LiNE(v_text_data1);
    v_quote_pos := 0;
    v_comma_pos := 0;
    END IF;
    IF ( v_comma_pos IS NULL OR v_quote_pos > v_comma_pos ) THEN
    v_text_array(v_text_arr_ind).pin := v_text_data1;
    --DBMS_OUTPUT.PUT_LiNE(v_text_array(v_text_arr_ind).pin);
    v_text_data1 := 0;
    --DBMS_OUTPUT.PUT_LiNE(v_text_data1);
    v_first_pos := 0;
    v_end_pos := 0;
    v_quote_pos := 0;
    v_comma_pos := 0;
    END IF;
    EXCEPTION
    WHEN others then
    DBMS_OUTPUT.PUT_LiNE(SUBSTR(SQLERRM,1,200));
    END prc_rollout_upload;
    Oracle version :
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    Your help would be highly appreciated !!!
    Regards,
    Vissu.....

    To start with Try this:
    SQL> ed
    Wrote file afiedt.buf
      1    declare
      2   v_var VARCHAR2(10000) := 'INDIA,BANGALORE,"INOX,BLR","THILAK NAGAR,JAYA NAGAR ';
      3    v_delim VARCHAR2(1) := ',';
      4    v_enclose VARCHAR2(1) := '"';
      5    v_val VARCHAR2(1000) := NULL;
      6    begin
      7    v_var := v_var||'"4TH T BLOCK,BANGALORE",500365'||',';
      8    FOR I IN 1..5 LOOP
      9    v_val :=  CASE WHEN SUBSTR(v_Var,1,1) <> '"' THEN
    10              SUBSTR(v_Var,1,INSTR(v_Var,',',1,1)-1)
    11              ELSE
    12              SUBSTR(v_Var,2,INSTR(v_Var,'",',1,1) - INSTR(v_Var,'"',1,1) - 1)
    13              END;
    14    v_Var :=  CASE WHEN SUBSTR(v_Var,1,1) <> '"' THEN
    15              SUBSTR(v_Var,INSTR(v_Var,',',1,1) + 1)
    16              ELSE
    17              SUBSTR(v_Var,INSTR(v_Var,'",',1,1) + 2)
    18              END;
    19    dbms_output.put_line(v_Val);
    20    END LOOP;
    21*  end;
    SQL> /
    INDIA
    BANGALORE
    INOX,BLR
    THILAK NAGAR,JAYA NAGAR "4TH T BLOCK,BANGALORE
    500365
    PL/SQL procedure successfully completed.
    SQL>

  • How to handle the #error in ssrs expression

    hi 
    Please any one help me to resolve this #error ,
    I have a calculated filed in that expression i given a if condition like below 
    data of column is coming like this 0 , 0.0 
    =IIF(Fields!Column1.Value=0,0,((Fields!Column2.Value - Fields!Column1.Value)/( Fields!Column1.Value)))
    how to handle the #error 
    Please let me know any one 

    Hi deepuk23,
    According to your description, when you use the IIF() function in the report you got some error,right?
    The issue can be caused by the column1 and column2 have different datatype, I assumed that one is integer and another is float, when the Column1 is 0 or null,  because IIF() function always evaluates both the true part and the false part, even
    though it returns only one of them, it will throw out the error. 
    To resolve the issue, you should use a nested IIF() function to avoid the zero-divisor in any rate like below:
    =IIF(Fields!Column1.Value=0,0,((Fields!Column2.Value - Fields!Column1.Value)/(IIF(Fields!Column1.Value=0,1,Fields!Column1.Value))))
    For more information, please refer to this article:
    FAQ: Why does the “Attempted to divide by zero” error still happen?
    If you still have any problem, please feel free to ask.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • In bdc how we handle page phone area in transaction pa30

    in bdc how we handle page phone area in transaction pa30.suppose one maintain phone no but not pager no.in that case how we will handle

    in my system ..i have phone number only displayed...if you want to put page number also then add a ddition qualifier like PG or some number by contacting functional guys..
    regards:)

Maybe you are looking for

  • Multiple APP run's for  same vendor

    Dear Friends, I would like to know whether it is possible to do multiple payment proposals for a vendor on same dates. here is the scenario: Each business area would like to creat and edit payment proposals for the same dates, for ex: Run date is 1.1

  • Bind Variables in SPARQL Queries

    Hi, I am interested in bind variables and their use between queries, however while I see the concept behind the example given in the documentation (http://docs.oracle.com/cd/E11882_01/appdev.112/e25609/sem_jena.htm#autoId15) I am not able to grasp ho

  • Windows Server 2008 Enterprise SP2 64bit BugCheck 3B Probably caused by : win32k.sys ( win32k!PFFOBJ::pPvtDataMatch+12 )

    Hi Guys, Has anyone come across this BSOD error and found a fix, as I'm at a lost as to what is causing the BSOD Please see Windows Debugger output below:- Microsoft (R) Windows Debugger Version 6.2.9200.16384 AMD64 Copyright (c) Microsoft Corporatio

  • Logic Pro Environment Templates for Various Ensembles

    I'm an old salt that started composing digitally only last year - always composed for live performance prior to this. Been tweaking VSL for eight months trying to find the right combination of Logic Pro plug-ins and settings on those plug-ins for a t

  • Photo booth - camera used by another application

    Photo Booth suddenly gives the message that it is in use by another application - I have never used it in any other application nor is any other application running - using "user friendly" language, please tell me how to get this running again. The o