How to send large amount of XML data in one CLOB variable

Hi,
I am sending large amount of XML data to TCP/IP port in one CLOB variable.
My requirement is to send the whole data in one go in one CLOB variable.
But that CLOB variable is not sufficient to hold all the data.
Please suggest some solution.
Thanks in advance

Hi Here is my code:
CREATE OR REPLACE PACKAGE BODY APPS.XXMB_WIP_PROD_TAG_DOOR_PKG
AS
PROCEDURE xxmb_get_xml_data_1270 (
-- errbuf OUT VARCHAR2,
-- retcode OUT NUMBER,
p_org IN VARCHAR2,
p_limit_to_global IN VARCHAR2,
p_label IN VARCHAR2,
p_printer IN VARCHAR2,
p_quantity IN VARCHAR2,
p_print_method IN VARCHAR2,
p_enable_release IN VARCHAR2,
p_enable_serial_no IN VARCHAR2,
p_release IN VARCHAR2,
p_rep_group IN VARCHAR2,
p_cart_type IN VARCHAR2,
p_cart_no_from IN VARCHAR2,
p_cart_no_to IN VARCHAR2,
p_serial_no IN VARCHAR2
AS
CURSOR c_xml_data_door (
p_org IN VARCHAR2,
p_label IN VARCHAR2,
p_printer IN VARCHAR2,
p_quantity IN VARCHAR2,
p_print_method IN VARCHAR2,
p_rep_group IN VARCHAR2,
p_release IN VARCHAR2,
p_cart_type IN VARCHAR2,
p_cart_no_from IN VARCHAR2,
p_cart_no_to IN VARCHAR2,
p_serial_no IN VARCHAR2
IS
SELECT xxasa.item_id AS item_id, xcs.serial_number AS serial_number,xxcpf.cart_type,xcs.destination_cart_num cart,xcs.destination_slot_num slot
CURSOR c_product_detail (
l_product IN NUMBER,
l_serial_num IN VARCHAR2,
p_limit_to_global IN VARCHAR2
IS
SELECT xcra_specie.reference_id AS reference_id,
xcra_ege.attribute_value AS ege, xcs.item_id AS item_id,
AND msib.inventory_item_id = l_product
and xcs.organization_id = nvl(p_org, xcs.organization_id)
AND xcs.serial_number = NVL (l_serial_num, xcs.serial_number);
/*-------------------------------------------------------+
| Cursor to fetch the data for special Message Label |
+-------------------------------------------------------*/
CURSOR c_count (p_item_id IN NUMBER)
IS
SELECT xcrav.attribute_value, xcs.serial_number, xcs.cabinet_number
FROM xxmb_czmfg_ref_attributes xcrav,
cz_config_attributes cca,
AND msib.organization_id = xcs.organization_id
AND msib.inventory_item_id = xcs.item_id;
/*--------------------------+
| Common variables |
+--------------------------*/
v_limit_to_global VARCHAR2 (100);
l_label_count NUMBER := 1;
total_rec NUMBER;
l_rewrite VARCHAR2 (1) := 'N';
l_file_count NUMBER := 1;
l_separate_line VARCHAR2 (10);
BEGIN
fnd_profile.get ('WMS_LABEL_OUTPUT_DIRECTORY', l_output_dir);
fnd_profile.get ('WMS_LABEL_FILE_PREFIX', l_output_file_prefix);
l_request_id := apps.fnd_global.conc_request_id;
l_output_file_name :=
l_output_file_prefix || l_request_id || l_file_end;
l_dir_seperator := '/';
IF (INSTR (l_output_dir, l_dir_seperator) = 0)
THEN
l_dir_seperator := '\';
END IF;
v_label := p_label;
v_printer := p_printer;
v_quantity := p_quantity;
V_LIMIT_TO_GLOBAL := P_LIMIT_TO_GLOBAL;
L_XML_CONTENT := '<?xml version="1.0" encoding="UTF-8" ?>';
L_XML_CONTENT := L_XML_CONTENT || '<!DOCTYPE labels SYSTEM "label.dtd">';
L_XML_CONTENT := L_XML_CONTENT || '<labels>';
FOR r_xml_data_door IN c_xml_data_door (p_org,
p_label,
p_printer,
p_quantity,
p_print_method,
p_rep_group,
p_release,
p_cart_type,
p_cart_no_from,
p_cart_no_to,
p_serial_no
LOOP
-- dbms_output.put_line ( 1 );
FOR r_product_detail IN
c_product_detail (r_xml_data_door.item_id,
r_xml_data_door.serial_number,
v_limit_to_global
LOOP
-- dbms_output.put_line ( 2 );
-- l_xml_content := '<?xml version="1.0" encoding="UTF-8" ?>';
-- l_xml_content := l_xml_content || '<!DOCTYPE labels SYSTEM "label.dtd">';
-- l_xml_content := l_xml_content || '<labels>';
fnd_file.put_line (fnd_file.LOG, 'label cnt: ' || l_label_count);
dbms_output.put_line (l_label_count);
L_XML_CONTENT := L_XML_CONTENT || '<label _FORMAT='
|| '"'
|| 'lib://FRD/'
|| v_label
|| '"'
|| ' _PRINTERNAME='
|| '"'
|| v_printer
|| '"'
|| ' _QUANTITY='
|| '"'
|| v_quantity
|| '"'
|| '>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Color">'
|| R_PRODUCT_DETAIL.COLOR
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT ||'<variable name= "Model">'
|| R_PRODUCT_DETAIL.model
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Build_Date">'
|| R_PRODUCT_DETAIL.BUILD_DATE
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Assy_Cart">'
|| R_PRODUCT_DETAIL.ASSY_CART
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Assy_Slot">'
|| R_PRODUCT_DETAIL.ASSY_SLOT
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Assy_Line">'
|| R_PRODUCT_DETAIL.ASSY_LINE
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Finish_Cart">'
|| R_PRODUCT_DETAIL.FINISH_CART
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Finish_Slot">'
|| R_PRODUCT_DETAIL.FINISH_SLOT
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Serial_Number">'
|| R_PRODUCT_DETAIL.SERIAL_NO
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Serial_Number_Barcode">'
|| R_PRODUCT_DETAIL.SERIAL_NO
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Specie">'
|| R_PRODUCT_DETAIL.SPECIE
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT ||'<variable name= "Truck_Group">'
|| R_PRODUCT_DETAIL.TRUCK_GROUP
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Label_Sequence_No">'
|| L_LABEL_COUNT
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT ||'<variable name= "WIP_Cart">'
|| R_PRODUCT_DETAIL.WIP_CART
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "WIP_Slot">'
|| R_PRODUCT_DETAIL.WIP_SLOT
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Cabinet_Sequence_No">'
|| R_PRODUCT_DETAIL.CAB_SEQ_NO
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "RAW_PART_NO">'
|| R_PRODUCT_DETAIL.RAW_PART_NO
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "JC">'
|| R_PRODUCT_DETAIL.JC
|| '</variable>' ;
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "QC">'
|| R_PRODUCT_DETAIL.QC
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Thickness">'
|| R_PRODUCT_DETAIL.THICKNESS
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Width">'
|| R_PRODUCT_DETAIL.width
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Length">'
|| R_PRODUCT_DETAIL.length
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Overlay">'
|| R_PRODUCT_DETAIL.OVERLAY
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Options">'
|| R_PRODUCT_DETAIL.OPTIONS
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Stop">'
|| R_PRODUCT_DETAIL.stop
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Profile_No">'
|| R_PRODUCT_DETAIL.PROFILE_NO
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Door_Style">'
|| R_PRODUCT_DETAIL.DOOR_STYLE
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Glaze">'
|| R_PRODUCT_DETAIL.GLAZE
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Shape">'
|| R_PRODUCT_DETAIL.SHAPE
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Glass">'
|| R_PRODUCT_DETAIL.GLASS
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Hinge_Side">'
|| R_PRODUCT_DETAIL.HINGE_SIDE
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Hinge_Type">'
|| R_PRODUCT_DETAIL.HINGE_TYPE
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "EGE">'
|| R_PRODUCT_DETAIL.EGE
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Door_Style_Code">'
|| R_PRODUCT_DETAIL.DOOR_STYLE_CODE
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Finish_Technique">'
|| R_PRODUCT_DETAIL.FINISH_TECHNIQUE
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Hinge_Location">'
|| R_PRODUCT_DETAIL.HINGE_LOCATION
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Construction_Type">'
|| R_PRODUCT_DETAIL.CONSTRUCTION_TYPE
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Panel_Type">'
|| R_PRODUCT_DETAIL.PANEL_TYPE
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Panel_Profile_No">'
|| R_PRODUCT_DETAIL.PANEL_PROFILE_NO
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Rail_Profile_No">'
|| R_PRODUCT_DETAIL.RAIL_PROFILE_NO
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Rail_1_Length">'
|| R_PRODUCT_DETAIL.RAIL_1_LENGTH
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Stile_Profile_No">'
|| R_PRODUCT_DETAIL.STILE_PROFILE_NO
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Rail_2_Length">'
|| R_PRODUCT_DETAIL.RAIL_2_LENGTH
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Stile_1_Length">'
|| R_PRODUCT_DETAIL.STILE_1_LENGTH
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Stile_2_Length">'
|| R_PRODUCT_DETAIL.STILE_2_LENGTH
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Panel_1_Width">'
|| R_PRODUCT_DETAIL.PANEL_1_WIDTH
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Panel_1_Length">'
|| R_PRODUCT_DETAIL.PANEL_1_LENGTH
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Panel_2_Width">'
|| R_PRODUCT_DETAIL.PANEL_2_WIDTH
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Panel_2_Length">'
|| R_PRODUCT_DETAIL.PANEL_2_LENGTH
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT ||'</label>';
/*-----------------------------------------+
| Handling XML data for special message |
+-----------------------------------------*/
FOR rec_count IN c_count (r_product_detail.item_id)
LOOP
L_XML_CONTENT := L_XML_CONTENT || '<label _FORMAT='
|| '"'
|| 'lib://FRD/SpecMessage_Door.btw'
|| '"'
|| ' _PRINTERNAME='
|| '"'
|| v_printer
|| '"'
|| ' _QUANTITY='
|| '"'
|| v_quantity
|| '"'
|| '>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Serial_Number">'
|| REC_COUNT.SERIAL_NUMBER
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Special_Message">'
|| REC_COUNT.ATTRIBUTE_VALUE
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT || '<variable name= "Cabinet_Sequence_No">'
|| REC_COUNT.CABINET_NUMBER
|| '</variable>';
L_XML_CONTENT := L_XML_CONTENT ||'</label>';
EXIT WHEN c_count%NOTFOUND;
end LOOP;
-- L_XML_CONTENT := L_XML_CONTENT || '</labels>';
fnd_file.put_line (fnd_file.LOG, l_xml_content);
dbms_output.put_line ( l_xml_content );
L_LABEL_COUNT := L_LABEL_COUNT + 1;
-- apps.inv_print_request.sync_print_tcpip (l_xml_content,
-- l_job_status,
-- l_printer_status,
-- l_status_type,
-- l_return_status,
-- l_return_msg
END LOOP;
END LOOP;
l_xml_content := l_xml_content || '</labels>';
fnd_file.put_line (fnd_file.LOG, l_xml_content);
apps.inv_print_request.sync_print_tcpip (l_xml_content,
l_job_status,
l_printer_status,
l_status_type,
l_return_status,
l_return_msg
L_XML_CONTENT := null;
/*--------------------------------------------------------------------------------------+
| APPS.INV_PRINT_REQUEST.SYNC_PRINT_TCPIP will send the XML data to TCP/IP Port |
+--------------------------------------------------------------------------------------*/
fnd_file.put_line (fnd_file.LOG,
'Printer Status:' || ' ' || l_printer_status
fnd_file.put_line (fnd_file.LOG,
'Return Status:' || ' ' || l_return_status
fnd_file.put_line (fnd_file.LOG,
'Return Message:' || ' ' || L_RETURN_MSG
COMMIT;
EXCEPTION
WHEN OTHERS
THEN
fnd_file.put_line
(fnd_file.LOG,
'Unexpected error in the xxmb_get_xml_data_1270 procedure, error is : '
|| SQLERRM
|| ', '
|| SQLCODE
END xxmb_get_xml_data_1270;
END xxmb_wip_prod_tag_door_pkg;
/

Similar Messages

  • How to insert more than 32k xml data into oracle clob column

    how to insert more than 32k xml data into oracle clob column.
    xml data is coming from java front end
    if we cannot use clob than what are the different options available

    Are you facing any issue with my code?
    String lateral size error will come when you try to insert the full xml in string format.
    public static boolean writeCLOBData(String tableName, String id, String columnName, String strContents) throws DataAccessException{
      boolean isUpdated = true;
      Connection connection = null;
      try {
      connection = ConnectionManager.getConnection ();
      //connection.setAutoCommit ( false );
      PreparedStatement PREPARE_STATEMENT = null;
      String sqlQuery = "UPDATE " + tableName + " SET " + columnName + "  = ?  WHERE ID =" + id;
      PREPARE_STATEMENT = connection.prepareStatement ( sqlQuery );
      // converting string to reader stream
      Reader reader = new StringReader ( strContents );
      PREPARE_STATEMENT.setClob ( 1, reader );
      // return false after updating the clob data to DB
      isUpdated = PREPARE_STATEMENT.execute ();
      PREPARE_STATEMENT.close ();
      } catch ( SQLException e ) {
      e.printStackTrace ();
      finally{
      return isUpdated;
    Try this JAVA code.

  • Need to update a table that contains large volume of xml data

    Hi,
    i want to update a table that contains large amount of XML data.
    when execute the query it shows an error .
    Xml parsing is failed .But tghe data in xml is well formed.don't know why its happening .
    Pls help me on this.
    Thanks,
    Fahad

    below is my code..
    pls do the needful.
    create or replace
    PROCEDURE SPFETCHRETRIEVEDATA (
        p_txteordernum IN trnorderitem.TXTEORDERNUM%TYPE,
        p_intversionnum IN trnorderitem.INTVERSIONNUM%TYPE ,
        p_interrorcode OUT NUMBER)
        AS
        ------variable declaration---
        v_xmlorderitem XMLTYPE;
        v_trnsiebelmodification XMLTYPE;
        diff XMLTYPE;
            BEGIN
                BEGIN
                select xmlorderitemxml into v_xmlorderitem
                from trnorderitem
                where TXTEORDERNUM= p_txteordernum
                AND INTVERSIONNUM= p_intversionnum;
                  END;
               --insert into tempxml values ('xmlorderitem',v_xmlorderitem);commit;
                BEGIN
                SELECT TrnSiebelModificationXML into v_trnsiebelmodification
                from trnsiebelmodification
                where TXTEORDERNUM= p_txteordernum
                AND INTVERSIONNUM= p_intversionnum
                AND TXTSIEBELFIELDNAME='Asset XML';
              --  insert into tempxml values ('trnsiebelmodification',v_trnsiebelmodification);commit;
    --            EXCEPTION
    --            WHEN TOO_MANY_ROWS THEN
    --            dbms_output.put_line('Statement return multiple rows');
                 END;
    --------comparing differences between xml data and storing into a variable -----------
               BEGIN
               select xmldiff(v_xmlorderitem, v_trnsiebelmodification)
               into   diff
               from   dual;
               --insert into tempxml values ('diffxml',diff);commit;
               if diff IS NOT NULL THEN
               UPDATE trnsiebelmodification
                SET TXTACTIONTYPE='Update2'
                WHERE TXTEORDERNUM= p_txteordernum
                AND INTVERSIONNUM= p_intversionnum
                 AND TXTSIEBELFIELDNAME='Asset XML';
                ELSE
                UPDATE trnsiebelmodification
                SET TXTACTIONTYPE='No Change2'
                WHERE TXTEORDERNUM= p_txteordernum
                AND INTVERSIONNUM= p_intversionnum
                 AND TXTSIEBELFIELDNAME='Asset XML';
                END IF;
                END;
        END SPFETCHRETRIEVEDATA;Edited by: BluShadow on 11-Sep-2012 14:13
    added {noformat}{noformat} tags. Please read: {message:id=9360002} and learn to do this yourself.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Large Amount of text data in a Field

    I have a VB front end application and now need to store what could be a very large amount of text data in one field (ie more that a varchar field can hold) What data type could i use for the field and what is the capacity of this field
    Thanks

    hi
    BFILE is a data type in Oracle that allows you to store the location and name of any file. To store large anounts of text data, you better use this type. You can store all the txt into a '.dat" or".txt" or still ".rtf" and then save the file name and its location in the Oracle Database. I believe that ione can save upto 4gb of Data using this type. I never used this data tye, but just read about it in documentation. Hope it works.
    All the best.
    Kiranmayee

  • How to read XML data stored in CLOB in Concurrent prog Output

    Hi All,
    I'm trying to Generate the XML Data as concurrent Program output. I have a PL/SQL package which generated the XML data by using SQL/XML functions. I'm storing the generated XML data in a CLOB variable. But when i try to read the data using fnd_file.put_line(fnd_file.OUTPUT,XML_Data) it doesn't display data more than 32767 bytes.
    Please help me out to understand what could be done to read the data in chunks. I have tried many logic's to print chunks of data but the output tags are either chopped off and errors out saying Tag not found.
    My logic is as below:
    v_handler:= DBMS_XMLGEN.newContext(v_xml_query);
    --Sets NULL handling options
    DBMS_XMLGen.SetNullHandling(v_handler, dbms_xmlgen.EMPTY_TAG ) ;
    --Set special character handling
    DBMS_XMLGEN.setConvertSpecialChars(v_handler, TRUE);
    -- Specified whether to use an XML attribute to indicate NULLness of particular entity in the XML document
    DBMS_XMLGen.useNullAttributeIndicator(v_handler,TRUE);
    -- set Checking invalid chars
    DBMS_XMLGEN.setCheckInvalidChars(v_handler, TRUE);
    -- get the xml data as required
    v_xml_data:= DBMS_XMLGEN.getXMLtype(v_handler);
    SELECT XMLROOT(v_xml_data.extract('/*'),VERSION '1.0').getClobVal() into v_new_xml_Data from dual;
    -- get the length of the xml generated
    v_clob_len := dbms_lob.getlength(v_new_xml_Data);
    FND_FILE.PUT_LINE(FND_FILE.LOG,'The Clob length is :'|| v_clob_len);
    -- logic to process string more than 32767 Processing by each character
    v_offset :=1;
    while (v_offset <= v_clob_len)
    LOOP
    v_char := dbms_lob.substr(v_new_xml_Data, 1, v_offset);
    IF (v_char = CHR(10))
    then
    fnd_file.new_line(fnd_file.output, 1);
    else
    fnd_file.put(fnd_file.output, v_char);
    end if;
    v_offset := v_offset + 1;
    END LOOP;
    FND_FILE.PUT_LINE(FND_FILE.LOG,'The offset is :'|| v_offset);
    FND_FILE.NEW_LINE(FND_FILE.OUTPUT, 1);
    THe above logic is for character by character which is a performance burden? Please let me know if there is any other work around for this

    Hi,
    Thanks for Replying. I have refered http://blog.oraclecontractors.com/?p=69 and then i added that piece of code. Basically, i'm trying to generate a report using XML publisher. To generate the XML data i'm writing a pl/sql package with SQl/XML functions. DBMS_XMLGEN would help me convert the XML Data as is. When the concurrent program runs this XML data will merge with RTF layout and generate required report. I'm able to generate the Report for data less then 32767 bytes. More than the limit i need to pass chunks of XML data to read as output. That's the reason i'm using fnd_file.output. But it reads only 32767 size at a time.
    WHen i use the given logic, it works perfectly fine, but it loops for each character, for example if you have 30,000 characters it loops the same, which is peformance burden.
    So i tried to write the logic of chunks but still i get the error that XML tag is not found or missing. I'm hoping this is very common issue, but after all my trails, i didn't find the right solution.
    the other logic i tried was :
    v_new_xml_data varchar2(32767)
    v_iterations := CEIL(v_clob_len/v_chunk_length); -- v_chunk_length is 32767 and v_clob_length is length of the XML data stored inthe clob variable
    For i in 0..v_iterations
    LOOP
    FND_FILE.put_line (fnd_file.log,'the loops v_pos :'||i||' and v_clob_length :'||v_clob_len);
    v_new_xml_data := DBMS_LOB.SUBSTR ( V_XML_DATA,v_chunk_length,(i*v_chunk_length)+1);
    FND_FILE.PUT_LINE (FND_FILE.OUTPUT,v_new_xml_data); -- read the output for every 32767 chunks
    FND_FILE.PUT_LINE(FND_FILE.LOG, 'Chunk length is :'||((i*v_chunk_length)+1));
    END LOOP;
    FND_FILE.put_line (fnd_file.log,'out of loop');
    FND_FILE.put_line (fnd_file.log,'length of new xml is '||v_clob_len);
    Please, let me know if you need Further clarifications on the same.

  • How do i delete a large amount of locked files at one time?

    How do i delete a large amount of locked files at one time or batch unlock the files to delete them?

    Drag them to the Trash and hold your Option key down when selecting Empty Trash.   
    17" 2.2GHz i7 Quad-Core MacBook Pro  8G RAM  750G HD + OCZ Vertex 3 SSD Boot HD 
    Got problems with your Apple iDevice-like iPhone, iPad or iPod touch? Try Troubleshooting 101

  • How to check particluar string in xml data

    Dear oracle Experts.
    Im using the following oracle database.
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE 10.2.0.4.0 Production
    TNS for Linux: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - Production
    I have a following xml data..
    p_msg_in CLOB :=
    <DATA>
    <FLD FNR="ZZ0584" DTE="26SEP12" SRC="DXB" DES="DAC" />
    <AAA LBP="22334455" ETK="1234567/4" ACT="123" />
    <AAA LBP="223344" ETK="2345678/1" />
    <AAA LBP="223344" ETK="123456/1" ACT="345" />
    </DATA>
    then, im fetching header details like this..
    v_msg_xml := xmltype(p_msg_in);
    FOR i IN multicur(v_msg_xml, '/DATA/FLD') LOOP
    v_1:= i.xml.extract('//@FNR').getstringval();
    v_4:= to_date(i.xml.extract('//@DTE').getstringval(),'DDMONYY');
    v_5:= i.xml.extract('//@SRC').getstringval();
    v_6:= i.xml.extract('//@DES').getstringval();
    END LOOP;
    after this, I need to loop all the actual records one by one using this for loop. Here for each iteration , i need to check some string ( example ACT) is there or not. in the above example, records 1,3 have ACT value in it. So here i need to check some thing like this. if instr('<AAA LBP="223344" ETK="123456/1" ACT="345" />','ACT)>0 before I perform the below step.
    How to achieve this.
    I appreciate your help.
    thank you.
    FOR c IN multicur(v_msg_xml, '/DATA/AAA') LOOP
    v_7 := c.xml.extract('//@LBP').getstringval();
    v_8 := c.xml.extract('//@ETK').getstringval();

    SQL> DECLARE
      2 
      3    p_msg_in  clob := '<DATA>
      4  <FLD FNR="ZZ0584" DTE="26SEP12" SRC="DXB" DES="DAC" />
      5  <AAA LBP="22334455" ETK="1234567/4" ACT="123" />
      6  <AAA LBP="223344" ETK="2345678/1" />
      7  <AAA LBP="223344" ETK="123456/1" ACT="345" />
      8  </DATA>';
      9 
    10    v_msg_xml xmltype;
    11 
    12    v_1       varchar2(30);
    13    v_4       date;
    14    v_5       varchar2(30);
    15    v_6       varchar2(30);
    16    v_7       varchar2(30);
    17    v_8       varchar2(30);
    18 
    19  BEGIN
    20 
    21    v_msg_xml := xmltype(p_msg_in);
    22 
    23    select fnr, to_date(dte, 'DDMONRR'), src, des
    24    into v_1, v_4, v_5, v_6
    25    from xmltable('/DATA/FLD'
    26           passing v_msg_xml
    27           columns fnr  varchar2(30) path '@FNR'
    28                 , dte  varchar2(30) path '@DTE'
    29                 , src  varchar2(30) path '@SRC'
    30                 , des  varchar2(30) path '@DES'
    31         ) ;
    32 
    33     dbms_output.put_line('V1 = '||v_1);
    34     dbms_output.put_line('V4 = '||v_4);
    35     dbms_output.put_line('V5 = '||v_5);
    36     dbms_output.put_line('V6 = '||v_6);
    37 
    38     for r in (
    39       select lbp, etk
    40       from xmltable('/DATA/AAA[@ACT]'
    41              passing v_msg_xml
    42              columns lbp  varchar2(30) path '@LBP'
    43                    , etk  varchar2(30) path '@ETK'
    44            )
    45     )
    46     loop
    47       dbms_output.put_line('LBP = '||r.lbp||' ETK = '||r.etk);
    48     end loop;
    49 
    50  END;
    51  /
    V1 = ZZ0584
    V4 = 26/09/12
    V5 = DXB
    V6 = DAC
    LBP = 22334455 ETK = 1234567/4
    LBP = 223344 ETK = 123456/1
    PL/SQL procedure successfully completed

  • How to send an email using XML Publisher

    Can any body help me how to send an email using XML Publisher.
    Regards,
    Suresh

    Sorry ,
    when a http://blogs.oracle.com/xmlpublisher/newsItems/departments/documentDelivery
    this it show this not answer the question.
    Thanks
    Welcome to Oracle Blogs
    Welcome to the Oracle blogging community, where Oracle executives, employees, and non-employees exchange views about customer requirements and best practices.
    We're sorry, the weblog you requested cannot be accessed.
    - You may not have the necessary permission for access the weblog.
    - This weblog does not exist.
    You may wish to try again using one of the tools below.
    - Check the URL and contact your System Administrator for access.
    - Or click here to go back to Oracle Blogs homepage.
    Powered by
    Movable Type and Oracle
    The views expressed on this blog are my own and do not necessarily reflect the views of Oracle. Terms of Use

  • Update XML data stored in CLOB Column

    Hi All,
    i am new to Oracle and new to SQL
    i am trying to update XML data stored in CLOB cloumn,data is stored with the follwoing format
    <attrs><attr name="name"><string>Schade</string></attr></attrs>
    i am using the following query for updating the value
    UPDATE PRODUCT p SET ATTRIBUTES_nl_nl=UPDATEXML(XMLTYPE.createXML(ATTRIBUTES_nl_nl),'/attrs/attr[@name="name"]/string/text()','Schade').getClobVal() WHERE p.sku='000000000000040576_200911-5010057'
    this query is working fine but it changing the data to the following format
    <attrs><attr name="name">Schade</attr></attrs>
    some how it is ommiting the <string> tag from it, i am unable to figure it out whats the reason.
    any help in this regard will b e much appriciated
    Thanks in Advance
    -Umesh

    Hi,
    You should have created your own thread for this, and included database version.
    This works for me on 11.2.0.2 and 10.2.0.5 :
    SQL> create table t_org ( xml_clob clob );
    Table created
    SQL>
    SQL> insert into t_org
      2  values(
      3  '<Message>
      4  <Entity>
      5  <ASSIGNMENT>
      6  <OAVendorLocation> </OAVendorLocation>
      7  <Vendorid>1</Vendorid>
      8  </ASSIGNMENT>
      9  </Entity>
    10  </Message>'
    11  );
    1 row inserted
    SQL> commit;
    Commit complete
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    SQL> update t_org set xml_clob =
      2  updatexml(xmltype(xml_clob),
      3  '/Message/Entity/ASSIGNMENT/OAVendorLocation/text()','LONDON').getClobVal()
      4  ;
    1 row updated
    SQL> select '*' ||
      2         extractvalue(xmltype(xml_clob),'/Message/Entity/ASSIGNMENT/OAVendorLocation')
      3         || '*' as result
      4  from t_org;
    RESULT
    *LONDON*
    Does the OAVendorLocation really have a whitespace value?
    If not then it's expected behaviour, you're trying to update a text() node that doesn't exist. In this case, the solution is to use appendChildXML to create the text() node, or update the whole element.
    Is it your real document? Do you actually have some namespaces?

  • How To send DMS(Documents cv01,cv03n,cv04n) from one sap system to othersap

    Hello Experts,
    I am working Document management system(CV01,cv02n,cv03n,cv04n)...
    I want to send the documents from one SAP system to Other SAP system
    Using ALE/Idocs....
    Please Help on this any sample programs....or function module....
    Thanks
    Preethi

    Hello,
    Please refer to the thread:
    How To send DMS(Documents cv01,cv03n,cv04n) from one sap system to othersap
    Best Regards, Murugesh AS

  • Advice needed on how to keep large amounts of data

    Hi guys,
    Im not sure whats the best way is to make large amounts of data available to my android  app on the local device.
    For example records of food ingredients, in the 100's?
    I have read and successfully created .db's using this tutorial.
    http://help.adobe.com/en_US/AIR/1.5/devappsflex/WS5b3ccc516d4fbf351e63e3d118666ade46-7d49. html
    However to populate the database I use flash? So this kind of defeats the purpose of it. No point in me shifting a massive array of data from flash to a sql database, when I could access the data direct from the as3 array?
    So maybe I could create the .db with an external program? but then how would I include that .db in the apk file and then deploy it to users android device.
    Or maybe I create a as3 class with an xml object init and use that as a means of data storage?
    Any advice would be appreciated

    You can use any means you like to populate your SQLite database, including using external programs, (temporarily) embedding a text file with SQL statements, executing some SQL from AS3 code etc etc.
    Once you have populated your db, deploy it with your project:
    http://chrisgriffith.wordpress.com/2011/01/11/understanding-bundled-sqlite-databases-in-ai r-for-mobile/
    Cheers, - Jon -

  • Sending large amounts of data spontaneously

    In my normal experience with the internet connection, the bits of data sent is about 50 to 80% of that received, but occasionally Firefox starts transmitting large amounts of data spontaneously; what it is, I don't know and where it's going to, I don't know. For example, today the AT&T status screen showed about 19 MB received and about 10 MB sent after about an hour of on-line time. A few minutes later, I looked down at the status screen and it showed 19.5 MB received and 133.9 MB sent, and the number was steadily increasing. Just before I went on line today, I ran a complete scan of the computer with McAfee and it reported nothing needing attention. I ran the scan because a similar effusion of sending data spontaneously had happened yesterday. When I noticed the data pouring out today, I closed Firefox and it stopped. When I opened Firefox right afterward, the transmission of data from did not recommence. My first thought was that my computer had been captured by the bad guys and now I was a robot, but McAfee says not to worry. But should I worry anyway? What's going on, or that not having a good answer now, how can I find out what's going on? And how can I make it stop, unless I'm seeing some kind of maintenance operation that Mozilla or Microsoft is subjecting me to?

    Instead of using URLConnection open a Socket to the server port (80 probably) send a POST http request followed by the data, you may then (optional) recieve data from the server to check that the servlet is ok, this is the same protocol as URLConnection, but you have control over when the data is actually sent...
    Socket sock=new Socket(getHost(),80);
    DataOutputStream dos=new DataOutputStream(sock.getOutputStream());
    dos.writeBytes("POST servletname\r\n");
    dos.writeBytes("Content-type: text/plain\r\n");  //optional, but good if you know
    dos.writeBytes("Content-length: "+lengthOfData+"\r\n")  //again, optional, but good if you can know it without caching the data first
    dos.writeBytes("\r\n");   // gotta have a blank line before the data
      // send data now
    DataInputStream=new DataInputStream(sock.getInputStream());  //optional if you want to recieve
      // recieve any feedback from servlet if you want
    dis.close();
    dos.close();
    sock.close();im guessing that URLConnection caches the data so it can fill in "Content-length"

  • Send large amounts of data

    Hello everyone,
    I made an applet that receives data, signs and returns the signed data. When the amount of data is too big, I break it into blocks of 255 bytes and use the method Signature.update.
    OK, this is working fine, but perfomarnce is poor due to large amount of blocks. Is it possible to increase the size of the blocks?
    Thanks.

    Hi,
    You cannot change the block size but you can change what you send in.
    You may get better performance by sending multiples of your hash function block size as the card will not have to do internal buffering.
    You could also do as much of the work in your host application as possible and then just send in the data that you need to operate on with the private key. Generating the hash of the message does not require a private key so can be done in your host. You then send the result of the hash to the card to be encrypted with the private key. This will be the fastest method.
    Cheers,
    Shane

  • I have a large amount of "Other" data on my iPhone 5 after the last 2 updates. Why and how do I get rid of it?

    After I sync my phone, it has a large amount of data under the category-"other".  About 11gigs. This is an issue. Does anyone know why and how I can delete it?  I think it's from iMessage, email, etc..., but I have deleted lots of it with no result.

    You might look at PhoneClean
    <http://www.imobie.com/phoneclean/download.htm>

  • How to pass large amount of data between steps

    Hi all,
    I have some LabVIEW VIs for data acquisition。
    I need to pass large amount of data(array size >5000000 each time) from one step to another.
    But it is not allowed to set array size larger than 5000000.
    Any suggestion?
    czhen
    Win 7 SP1 & LabVIEW 2012 SP1, Teststand 2012 SP1
    Solved!
    Go to Solution.
    Attachments:
    Array Size Limits.png ‏34 KB

    In your LabVIEW code, put the data into a data value reference.  Pass this reference between your TestStand steps.  As an added bonus, you will not get an extra copy of the data at each step.  You will need to use the InPlace element structure to get your data out of the data value reference.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

Maybe you are looking for

  • Whats the difference between list and lov ?

    Whats the difference between list and lov ? i can do the same things with a list what an lov can do . infact a list is more better. cause the list doesnt hold/show a range of values, and only has the items value iteself. while the lov can get all the

  • Using Creative Cloud to edit video on multiple computers

    Hello, Is there any way that I can use the creative cloud to continually edit a single video across two seperate computers? I've read that the cloud does not currently support video sharing, but I got the impression that this referred specifically to

  • Hp color laserjet 2500l

    Hp Color Laserjet 2500L XP Doesn't recognize paper try 2 NO

  • Restarting taking forever after Security Update 2014-002

    I just downloaded Security Update 2014-002 and my Mac Mini is taking forever to restart after the download and installation process finished. I'm running the latest version of Mavericks and my Mac is stuck on restart! What should I do? Need help! Tha

  • N80 Fonts too small to read

    Does anyone know how to increase the size of the fonts so that things like phone numbers from phone book and text messages can be read by anyone ove the age of 30. The text size on my N80 is about half the size of newspaper fonts and having a blue ba