Utl_file truncates the line and fillowing records

Here is my code ,I am seeing an unusual problem It was all ok untill two weeks ago . AfterI made somechanges (added || Chr(13)|| Chr(10) to the ce_line at the end) , A csv file that should have more that 500 records is being truncated , after nearly 113 lines , i dont see any data . It looks some thing like Below. It terminates in between the line and no data after that .
I looked at the DBM_Output , Its shows me all 500+ records , Looks like the problem while writing to the file some things is going wrong.
Or is it because of some data issue that its does'nt consider.
"602992121     602992121     DATASCRUB     602992121     W     3/31/2011     6/1/2011     5/1/2031     4.875     400000
602992315 602992315 DATASCRUB     602992315     W     DATASCRUB     602992315     K     3/14/2011     5/1/2011     4/1/2031     4.75     153000
602992336 602992336 DATASCRUB     602992336     DATASCRUB     602992336     3/28/2011     5/1/2011     4/1/2031     4.75     278400
602992717 602992717     DATASCRU     
CE_LINE VARCHAR2 (500);
CE_FILE UTL_FILE.FILE_TYPE;
L_C1 to L_C55 are defined SYS.ODCIVARCHAR2LIST;
L_LIMIT NUMBER := 1000;
<<Code>>
OPEN CUSTODIAN_EXTRACT_DETAILS FOR V_CHR_SQL;
IF UTL_FILE.IS_OPEN (CE_FILE) THEN
LOOP
FETCH CUSTODIAN_EXTRACT_DETAILS
BULK COLLECT INTO L_C1,
L_C2,L_C3,L_C4,L_C5,L_C6,L_C7,L_C8,L_C9,L_C10,L_C11,L_C12,L_C13,L_C14,L_C15,L_C16,L_C17,L_C18,L_C19,L_C20,L_C21,L_C22,L_C23,L_C24,L_C25,L_C26,L_C27,L_C28,L_C29,L_C30,L_C31,L_C32,L_C33,L_C34,L_C35,L_C36,L_C37,L_C38,L_C39,L_C40,L_C41,L_C42,L_C43,L_C44,L_C45,L_C46,L_C47,L_C48,L_C49,L_C50,L_C51,L_C52,L_C53,L_C54,L_C55 LIMIT L_LIMIT;
FOR I IN 1 .. L_C1.COUNT LOOP
IF INSTR (L_C21 (I), ',') > 0 THEN
L_C21 (I) := '"' || L_C21 (I) || '"';
END IF;
CE_LINE :=L_C1 (I) || ',' || L_C2 (I) || ',' || L_C3 (I)|| ','|| L_C4 (I)|| ','|| L_C5 (I)|| ','|| L_C6 (I)|| ','|| L_C7 (I)|| ','|| L_C8 (I)|| ','|| L_C9 (I)|| ','|| L_C10 (I)|| ','|| L_C11 (I)|| ','|| L_C12 (I)|| ','|| L_C13 (I)|| ','|| L_C14 (I)|| ','|| L_C15 (I)|| ','|| L_C16 (I)|| ','|| L_C17 (I)|| ','|| L_C18 (I)|| ','|| L_C19 (I)|| ','|| L_C20 (I)|| ','|| L_C21 (I)|| ','|| L_C22 (I)|| ','|| L_C23 (I) || ','|| L_C24 (I)|| ','|| L_C25 (I)|| ','|| L_C26 (I)|| ','|| L_C27 (I)|| ','|| L_C28 (I)|| ','|| L_C29 (I)|| ','|| L_C30 (I)|| ','|| L_C31 (I)|| ','|| L_C32 (I)|| ','|| L_C33 (I)|| ','|| L_C34 (I)|| ','|| L_C35 (I)|| ','|| L_C36 (I)|| ','|| L_C37 (I)|| ','|| L_C38 (I)|| ','|| L_C39 (I)|| ','|| L_C40 (I)|| ','|| L_C41 (I)|| ','|| L_C42 (I)|| ','|| L_C43 (I)|| ','|| L_C44 (I)|| ','|| L_C45 (I)|| ','|| L_C46 (I)|| ','|| L_C47 (I)|| ','|| L_C48 (I)|| ','|| L_C49 (I)|| ','|| L_C50 (I)|| ','|| L_C51 (I)|| ','|| L_C52 (I)|| ','|| L_C53 (I)|| ','|| L_C54 (I)|| ','|| L_C55 (I) || Chr(13)|| Chr(10);
UTL_FILE.PUT (CE_FILE, CE_LINE);
dbms_output.put_line (CE_LINE);
DBMS_OUTPUT.NEW_LINE;
END LOOP;
EXIT WHEN CUSTODIAN_EXTRACT_DETAILS%NOTFOUND;
end loop;
END IF;
CLOSE CUSTODIAN_EXTRACT_DETAILS;
END IF;
UTL_FILE.FCLOSE (CE_FILE);
<<Code>>

This appears to be a duplicate of UTL_FILE create a csv with 1002, 2003 and 3004 rows empty. Having two threads open simultaneously in the same forum for the same issue is counterproductive. In which thread would you like us to answer? Please close whichever thread you don't want us to answer in.
It would be helpful if you used the \ tag (6 characters, all lower case) before and after your code to preserve formatting.  That makes it much easier to read.
Exactly what changes did you make?  Why did you add the CHR(13) || CHR(10)?  Did you, at the same time, change utl_file.put_line to utl_file.put? 
Justin                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • How can i delay the line and charactor rate of my serial port transmisio​n?

    In hyperterminal I can pick the line and charactor rate , but I can't seem to slow down the rate when using the serial port by itself.
    Attachments:
    remod_chan_4.txt ‏1 KB
    serial_INT_chan3.vi ‏31 KB
    read_text_file.vi ‏20 KB

    There's nothing built into the VISA or old serial functions but it's pretty simple to program yourself. Here's a VI for specifying a delay between characters. It uses VISA but you can easily swap that out with the old serial write if you want. It just breaks out the text string character by character and adds a delay before each character is written. To add a line delay, just add another delay after the entire string is written.
    Attachments:
    Serial_Write_With_InterCharacter_Delay.vi ‏45 KB

  • I have an ipod touch 4th genereation and have problems when i record you can barley hear the voices and sounds recording i don't know what the problem is?

    i have an ipod touch 4th genereation and have problems when i record you can barley hear the voices and sounds recording i don't know what the problem is?

    sounds like ur ipod's mic is blocked with something check the back on the ipod near the back camera

  • How do I get the line-in to record low frequencies?

    The iPhone with GarageBand is potentially one of the most powerful tools for mobile recording ever.  Unfortunately there are several tragic yet avoidable drawbacks that reduce it to nothing more than a mere toy.  1. You can't use the camera usb adapter to bring in loss-less digital stereo input.  2. Even if you could, you can't split the stereo into 2 seperate mono tracks.  And to take the cake...  3. You can't do much recording with the 3.5 jack's line-in because you get ABSOLUTELY NO LOWS!  This is due to the iPhones roll-off low frequency limiter filter, which i'm told since ios6 can possibly be disabled, though it's not in the Settings and i have yet to find an app that will do it in the background while running Garageband.  Sure, the Garageband app could do that, but then it would be a powerful incalculably valuable tool in the hands of everyone.  No lows means no drums, no bass, and vocals that sound like...well...like they were recorded via telephone.  Yes, it's painfully clear you recorded that demo on a phone, because when you play it back in your home or car it sounds like your listening to someone play it for you on the other end of a phone call.  There is no adjustment to compensate for the absence of low frequencies.  SOMEONE PLEASE TELL ME I AM WRONG and that you have a work-around or know of something I've missed.  How do you get lows into Garageband???

    Thanks for the info.  I am not wanting flat stereo nor digital input from the 3.5.  Only wanting flat mono.  But before I go the apogee route (which is a $150-200 solution, not to mention a solution that will add more devices to the connection and thus more opportunities for noise), I will probably just resort to purchasing an ipad (can get a mini for $299) .  My mixer has usb out, and I can go straight into the ipad digitally with the usb camera kit, albeit I still can't split 1 stereo channel into 2 mono channels.  But I digress:  my entire purpose for this post is that i would like to stay as mobile as possible by using the iphone, but with all the darn limitations imposed by no one other than Apple, what could be an easy way to record has been nullified.  What's frustrating is that all the components are there and I have them, all the hardware is more than capable; but in both cases (the 3.5 mono or the usb stereo) there is a software feature (or lack thereof) blocking me.
    Again if anyone knows of an app that will disable the software low-cut, please respond...

  • Help need in Drag and drop the Lines and rectangle in applet

    hi
    i want to create a simple paint applictaion which is capable of draw lines, rectangle, images etc. after that lines and other thinks can be moveable and rotate and scaling also.
    the major restrictions in its implemented only in jdk1.1.
    so if you people found any solutions or sample codings or application(this one is best) send it to [email protected]
    thanks in advance
    Giri

    the major restrictions in its implemented only in
    jdk1.1.Why!

  • How to synchronize files in the iFS and a record of table ?

    I have table that contains information about a documents. Document's name, author, project number, etc... Documents are files made by Word or Autocad etc.. Documents are saved in the iFS.
    One record in the table should correspond one document in the iFS.
    Do somebody know how can I syncronice the Table and iFS so, that if someone add's (or delete) a file to the iFS, that reflects to the table too ? This mean that a record should be added to the table.
    Do I need some special column in the record that points to document ?
    Thanks,
    Antti

    A better solution is to use iFS metadata to store your additional properties, instead of using a custom table. You could create a Document subclass with additional attributes, your you could attach a Category with the additional attributes to Documents in iFS. Then you could use the iFS API to get and set these attributes and they would be stored, managed, and exposed as part of the iFS content management.

  • Flash line chart: manipulating the line and data point

    In Apex 3.1 Flash line chart
    Is there a way to change the line thickness and suppress the circular data point? We think it looks cartoonish and ugly especially when there are many data points.
    Thanks,
    Fred

    Hello,
    Use Custom XML in the Chart attributes and replace the line_chart section with:
          <line_chart left_space="5" right_space="5">
            <block_names enabled="no" />
            <dots type='circle' radius='2' />
            <lines size='1' auto_color='yes' tone='0xFFC700' color='0xC1C1C1' />
          </line_chart>I've put the example here also: http://examples.apex-evangelists.com/pls/apex/f?p=286:34:0
    If you come to ODTUG, OOW or our "European Apex Training Days" I'll go into more depth about all this.
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://eurotraining.apex-evangelists.com/
    -- http://apexblogs.info/

  • I have a horizontal line across the middle of the ipod screen and the ipod and itunes won't sync.  What is the line and is it connected to the no sync.

    I have a horizontal line across the middle of the ipod screen and itunes and the ipod won't sync.  What is the horizontal line and is it connected to the no sync.

    Hey Dean Marvin,
    Thanks for the question. These two symptoms are probablyh related. To troubleshoot, let's try resetting your iPod:
    How to reset iPod
    http://support.apple.com/kb/HT1320
    Thanks,
    Matt M.

  • How to get the first and last record

    Hai All
    I have table called T1 and there are more than 8 lakhs records and i have a column called Timestamp so i need to get the first record value and time stampvalue and last record and time stamp value so that i can conclude that For Example
    form 13 june to 15 june data are here
    Kind Regards
    SrikkanthM

    Something like this can also indicate the first and last rows as you query...
    SQL> select empno, ename, hiredate
      2        ,case row_number() over (order by hiredate)
      3           when 1 then 'First Row'
      4           when count(*) over () then 'Last Row'
      5         end as flag
      6  from emp;
         EMPNO ENAME      HIREDATE            FLAG
          7369 SMITH      17/12/1980 00:00:00 First Row
          7499 ALLEN      20/02/1981 00:00:00
          7521 WARD       22/02/1981 00:00:00
          7566 JONES      02/04/1981 00:00:00
          7698 BLAKE      01/05/1981 00:00:00
          7782 CLARK      09/06/1981 00:00:00
          7844 TURNER     08/09/1981 00:00:00
          7654 MARTIN     28/09/1981 00:00:00
          7839 KING       17/11/1981 00:00:00
          7900 JAMES      03/12/1981 00:00:00
          7902 FORD       03/12/1981 00:00:00
          7934 MILLER     23/01/1982 00:00:00
          7788 SCOTT      19/04/1987 00:00:00
          7876 ADAMS      23/05/1987 00:00:00 Last Row
    14 rows selected.
    SQL>

  • OAF matester detail page : How to have a "Show All" feature on screen, so that all the master and details records are expanded .

    Hi ,
    I was trying to have a "SHOW ALL" feature on the master - detail page,
    the detail table is an advancec table.
    Please help me with inputs on how to have  "SHOW ALL" feature,
    Currently, we have to click on  ":Show" for each record at master level to view the child data.
    Trying to achive "Show All" Feature so that on click of this the master records on the page 'Expands"  showiing all master records with respective detail records.
    Regards
    bhuvanm

    Hi,
    You should not set DetailFlag = "Y" in whereclause because there is no such record.
    Also detail flag is transient attribute and not the query column, hence the error "Invalid indentifier".
    I asked you to use DetailFlag as query column with static value "Y".
    for example:
    SELECT "Y" detail_flag
    FROM <table_name>
    This will display all the table records in expanded format. if you want it conditionally then use decode on some bind parameters.
    For example:
    SELECT DECODE(:1, "SHOWALL", "Y", "N") detail_flag
    FROM <table_name>
    This bind parameter should be passed whenever you want to execute query for the table.
    Regards,
    Sandeep M.

  • Displaying the master and detail records ....

    Hi ,
    There is a master - detail form. The end-user make some insertions/updates in the detail block...
    How is it possible to display these detail records and its master when the user presses a custom button 'refresh' which just requery the records in both master and detail blocks...?????
    When i write "to display these detail records and its master " i mean that the current record (the one which the cursor would be focused in ) would be this master record... however,all other records would be displayed as well....
    Many thanks,
    Simon

    From what I understand you want to re-query and go to the record where you were just before re-querying??
    Interesting requirement, why you wanna do this? if for the user to see the changes of the updates, that is the default behavior.
    You can do this in two ways.
    1- in your "Refresh" button save the :system.trigger_record in a parameter :parameter.record_num, for the Master block and after the query you do a go_record(:parameter.record_num) .
    BEGIN
         GO_BLOCK('EMP'); --Master Block
         :PARAMETER.RECORD_NUM := :SYSTEM.TRIGGER_RECORD;
         EXECUTE_QUERY;
         GO_RECORD(:PARAMETER.RECORD_NUM);
    END;2 you can loop through the block with next_record built-in and an exit condition of a key value you saved in a parameter.
    BEGIN
         GO_BLOCK('EMP'); --Master Block
         :PARAMETER.EMPNO := :EMP.EMPNO;
         EXECUTE_QUERY;
         FIRST_RECORD;
         LOOP
              EXIT WHEN :EMP.EMPNO = :PARAMETER.EMPNO;
              NEXT_RECORD;
         END LOOP;
    END;Tony

  • Why all the lines and question marks on my recovered iWeb pages?

    My iWeb recovered pages (which I did find, thanks to several of you) are covered with question marks and horizontal and < and > lines. Why would this happen and how do I know it won't happen when I publish?
    G4 Dual   Mac OS X (10.4.10)   all software updates

    is this what you see:
    http://www.geocities.com/[email protected]/images/badkidblue.jpg
    it was from this thread:
    http://discussions.apple.com/thread.jspa?messageID=2746077&#2746077
    if you see something similar as above, you may have corrupted iweb template, re-install iweb...

  • Accounting the differences between the group and statutory record

    Hi guys,
    In our set up, the group reporting requires the book to be closed within 10 days from the year end. However, due to various tax reasons, the stutory books can be kept open till 25th.
    For example, there could be a credit note to be accounted between 10th and 25th which should appear in the statutory books as part of current year. But in  Group reporting it should consider as the transaction for next year.
    We have considered 2 options:
    a) Do an adjustment transaction using Gl accounts with differnet range and exclude these accounts from group reporting. next year, reverse these transaction and account using normal GL accounts.
    b) Account the adjustment transactions in a special period. In Group reporting, exclude these spacial transactions. However, the group reporting should include the special period from the previous year.
    c) Use special purpose ledger. Account the transactions in special period and consider changing the period in the mapping rule (yet to prove).
    Can anbody think about any other options?
    many thanks
    AMA

    Commitment limit is not related to order value.
    As per help file:
    A warning message appears if <the customer's account balance>+ <the total amount in undeposited checks> + <the amount of the current document> exceeds the customer's commitment limit.

  • Is SDO_DISTANCE bug between the line and multipoints?

    SDO_GEOM.SDO_DISTANCE(MDSYS.SDO_GEOMETRY(2002,8307,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(113.363258142822,23.133208779985,113.3633,23.13331)),
    MDSYS.SDO_GEOMETRY(2005,8307,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1,2),MDSYS.SDO_ORDINATE_ARRAY(
    113.363258142822,23.1868700130491,113.365811605804,23.1322024265981))
    ,0.000005)
    the result is 5955.609972214.
    SDO_GEOM.SDO_DISTANCE(MDSYS.SDO_GEOMETRY(2002,8307,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(113.363258142822,23.133208779985,113.3633,23.13331)),
    MDSYS.SDO_GEOMETRY(2005,8307,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1,2),MDSYS.SDO_ORDINATE_ARRAY(
    113.365811605804,23.1322024265981,113.363258142822,23.1868700130491
    ,0.005)
    the result is 284.072193675135.
    In my points the results should be the same. Why are they different?
    If change the Element_Info
    SDO_GEOM.SDO_DISTANCE(MDSYS.SDO_GEOMETRY(2002,8307,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,2,1),MDSYS.SDO_ORDINATE_ARRAY(113.363258142822,23.133208779985,113.3633,23.13331)),
    MDSYS.SDO_GEOMETRY(2005,8307,null,MDSYS.SDO_ELEM_INFO_ARRAY(1,1,1,3,1,1),MDSYS.SDO_ORDINATE_ARRAY(
    113.363258142822,23.1868700130491,113.365811605804,23.1322024265981))
    ,0.000005)
    the result will be 284.072193675135.
    Why?Is it a bug of SDO_DISTANCE?

    Have a look here:
    Re: How to use java to store Multipolygon
    this is the javadoc:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14373/oracle/spatial/geometry/JGeometry.html#JGeometry_int__int__int____double___
    public JGeometry(int gtype,
    int srid,
    int[] elemInfo,
    double[] ordinates)
    Constructs a JGeometry instance with given information
    Parameters:
    gtype - the geometry type
    srid - the SRS id; if 0 is used then the MDSYS.SDO_GEOMETRY.SDO_SRID will be set to null when converted into DB format.
    elemInfo - geometry element info array
    ordinates - geometry ordinates array
    Maybe something like:
    JGeometry ps = New JGeometry (2005, 8307, new int[]{1,1, YOUR NUMBER OF POINTS IN YOUR CLUSTER}, new double[]{YOUR ORDINATES})
    Luc

  • I did a COPY of some text from a web page, and then did a PASTE into notepad.exe (Windows). The text from each line was duplicated -- on the line! Instead of "Fred", it became "Fred Fred".

    I just recently installed Firefox for the first time. It seems nice and quick. The version is reported as: "10.0.1".
    I wanted to save some text from a web page, so navigated to that page, selected the text, and pressed the Control-C combination to COPY the selected text to the buffer. For example, the text I selected looked something like this:
    Harry
    Ron
    Hermione
    Hagrid
    Albus
    NOTE: Each line of text has a small icon to the left of the text.
    It is not reasonable to COPY and PASTE each line individually, as there can be hundreds of lines of data. I recall, however, that
    doing a COPY and PASTE on this data into Microsoft's Excel will produce cells which have the icons included in the cell, but unfortunately one cannot can't get rid of them! At least I've never found a way to remove them, but that's another issue. :)
    Once I'd done the COPY operation I switched to a Notepad window and did a PASTE operation. To my surprise, the text from each line was duplicated. It looked like this:
    Harry Harry
    Ron Ron
    Hermione Hermione
    Hagrid Hagrid
    Albus Albus
    Thinking that there might be something unusual about the web page I looked at the source, but it appeared "normal" -- that is, as expected.
    Note: I have done this operation several times before, and have never seen this occur before.
    Note: In the actual data some of the lines have quoted text in them. Curiously there is weird behavior on these lines. In some cases the entire line is shown only once. (These occur at the top of the line, and the quoted text is at the beginning of the name.)
    When quoted text appears "later" in the name, in some cases the quoted text is duplicated, and in other cases the quoted text is missing altogether! I have also noticed an error with the quoted text, and so will be reporting that to the web site which generates the HTML.
    Note that each line of "text" is "anchor text", so if I click on a name the browser navigates to a page for that name.
    I believe that the problem is that the COPY operating in Firefox is not simply copying the visible text, but also the ALT=
    Below is a sample of what the source HTML looks like:
    &lt;a class="lnk" target="_blank" href="http://details.aspx?id=Harry">
    &lt;img width="16" height="16" alt="Harry" class="tb_icon" src="http://.../Harry.gif"/>
    &lt;span>Harry&lt;/span>&lt;/a>
    <br/>
    (Because of the true length of the lines in the source HTML, I have stripped out the actual URL of the site.)
    To make sure I wasn't imaging this difference I repeated the process within Internet Explorer. In that browser I did not get duplicated data.

    Try:
    *Extended Copy Menu (fix version): https://addons.mozilla.org/firefox/addon/extended-copy-menu-fix-vers/

Maybe you are looking for

  • IPad thinks its connected to a Tv when it isn't.

    Whenever I try to play a video online or off on my iPad 2 I get a standard airplay message that the video is playing on a tv. However my Apple TV is not plugged. I tried watching something from the videos app with wifi and cellular disabled and got t

  • Overwriting in batch processing

    Switching from Audition 3 to CS6 has been problematic for me, in the Batch Conversion department. In Audition 3, I could open many hundreds of WAV files, convert them in mp3, and the processor would then erase the old WAV versions. Now, in CS6, I che

  • How do i crop?

    i want to crop a to 4x6 photo. i choose crop and choose 2x3 format. when i crop and then edit in photoshop it is bigger than 4x6. usually like 7.6x11.4 in but what is showing up in photoshop is the cropped image. hope this makes sense

  • Single photo removal from iPad2 files

    How do I remove pictures from files/albumns without removing them from other files or albumns. After copying pictures from "Photos", Last in or dated Events file into a newly developed titled albumn, I've tried to delete the original picture from the

  • Full length movies

    Okay I am new at this iPod thing. I have held out til now so that I can watch movies on it. So I am thinking about buying this new iPod, but I am not sure it will be worth it unless I know if eventually I will be able to purchase full length movies f