How to identify a blank new line in an open txt file

hi all
i'm reading a file, and i have to identify all the blank new lines.
does anybody can help me?
thanks to all !!
follows a sample of the code i'm writing:
fHandler := UTL_FILE.FOPEN(FileAttuale.Oracle_Input,FileAttuale.Nome_File, 'r');
-- Lettura file
BEGIN
WHILE 1 < 2 LOOP
Line_Number := Line_Number + 1;
-- Leggo riga per riga finche non viene lanciata la eccezione NO_DATA_FOUND
UTL_FILE.GET_LINE(fHandler, buf);
if (buf is a blank new line) then
end if;
END LOOP;
END;
documentation says:
http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/u_file.htm
Because the line terminator character is not read into the buffer, reading blank lines returns empty strings.
but if i try
IF (BUF ='') THEN
do something
END IF;
IF (BUF is null) THEN
do something
END IF;
don't do nothing!!
thanks all
Edited by: Massimo T. on 4-mag-2011 12.05

13 is ^K also known as Vertical Tab No Massimo, it's ^M, that is Carriage Return : you have to consider Dec column, since ASCII function returns the decimal representation in the database character set of the first character of char.

Similar Messages

  • How to get string (specified by line and column) from txt file with labview

    Hi everyone
    How to get string (specified by line and column) from txt file with labview
    thx 
    Solved!
    Go to Solution.

    As far as I know, a text file has no columns.  Please be more specific.  Do you mean something like the 5th word on line 4, where words are separated by a space, and lines are separated by a newline character?  You could the Read from Spreadsheet String function and set the delimiter to a space.  This will produce a 2D array of strings.  Then use index array and give the line number and column number.
    - tbob
    Inventor of the WORM Global

  • How can I add a new line item for production order?

    HI all,
    How can I add a new line item for production order through BAPI/FM? Thanks in advance.

    Hi Mil,
      Unfortunetly SAP is not in front of me.
    But if possible go to BAPI transaction , check for any production order's bapi for CHANGE purpose. Where you will be able to add your new line.
    Reward if useful!

  • How to write on a new line ("\n") to a file

    I dont know how to write on a new line ... this method writes everything in long line. I tried doing pS.println("\n") before the pS.println(buffer.toString());
    Some one please direct me :)
    public void WriteToFile() {
         try {
              byte[] record = new byte[100];
              ByteArrayInputStream iS = new ByteArrayInputStream(record);
             DataInputStream iDS = new DataInputStream(iS);
              StringBuffer buffer = new StringBuffer();
              OutputConnection connection = (OutputConnection)
                                          Connector.open("file:///CFCard/readme.txt");
              OutputStream oS = connection.openOutputStream();
              PrintStream pS = new PrintStream( oS );          
              try {
               for(int x=1; x<=rs.getNumRecords();x++) {
               rs.getRecord(x, record, 0);                                                                                               
                  buffer.append(iDS.readUTF());                          
                  buffer.append(iDS.readUTF());              
                  buffer.append(iDS.readInt());              
                  buffer.append(iDS.readInt());              
                  buffer.append("\n");
                  pS.println("\n");
                  pS.println(buffer.toString());                                          
                 iS.reset();                   
              oS.close();
              connection.close();
             iS.close();
             iDS.close();        
              catch(ConnectionNotFoundException err) {
                   Alert alert = new Alert("Error", "Cannot access file.", null, null);
                 alert.setTimeout(Alert.FOREVER);
                 alert.setType(AlertType.ERROR);
                 display.setCurrent(alert);     
              catch(IOException err) {
              Alert alert = new Alert("Error", err.toString(), null, null);
            alert.setTimeout(Alert.FOREVER);
            alert.setType(AlertType.ERROR);
            display.setCurrent(alert);     
              Alert alr = new Alert("Completed Sending to a File", "Data written successfully!",null,null);
              alr.setTimeout(Alert.FOREVER);
              alr.setType(AlertType.WARNING);
              display.setCurrent(alr);
              }catch(Exception err) {
    }

    Stinkin' crossposter
    http://forum.java.sun.com/thread.jspa?threadID=613784

  • How to provide space and new line to the text in AI Script

    how to provide space and new line to the text in AI Script

    ?? can you explain better, can you at least add another sentence?
    space
    var mySpace = " ";
    new line
    var newLine = "\n";

  • How can i go to new line

    How can i go to new line when iam writing data to a file by using write to spraedsheet file.vi every time.i mean i would like to go to newline everytime.

    Take a look at the attached code. I am writing a 2-D array to the file using the default method so it looks like
    1 2 3
    4 5 6
    7 8 9
    in the file.
    I then use the Line Feed Constant as a delimiter, and you can see it then looks like
    1
    2
    3
    4
    5
    6
    7
    8
    9
    The line feed and carriage return constant is on the String Pallette.
    Attachments:
    WriteSpreadSheet.vi ‏19 KB

  • After installing a new motherboard, my imac opens pdf files with colorsync.  How do I reset it to open them with Adobe?

    After installing a new motherboard, my imac opens pdf files with colorsync.  How do I reset it to open them with Adobe?

    That makes sense Dennis.  I did that but was unable to find Adobe Reader in my Applications folder.  Of note though is that after a restart, the problem seems to have gone away.  So, disaster averted.  Thanks for responding though.  It's nice to have help on this stuff.
    D

  • Problem is occurring in docx format; it is not printing "New Line" character in extracted txt using IFilter (offfiltx.dll) while with doc file IFilter (OffFilt.dll) is working fine.

    Problem: Problem
    is occurring in docx format; it is not printing “New Line” character in extracted txt using IFilter (offfiltx.dll) while with doc file IFilter (OffFilt.dll) is working fine.
    Environment: -
    Operating
    System:
    Windows XP SP2/7
    Language:
    C#
    MS
    Office Version: - MS Office 2007/2010/2013
    Problem
    Description: -
    We
    havedocx
    file with new line character, and we are processing this file in IFilter for extracting text, and it is giving output with concatenation of lines.
    Docx
    file format (Sample.docx)
    Test this music
    Word processing
    Testing docx file
    Output:
    - Test this music Word processing Testing docx file
    Requirement:
    - We
    have requirement to get following text in particular format with New Line from docx because client is using docx format only.
    Test this music
    Word processing
    Testing docx file
    Attempt:
    We have tried a lot after changing IFilter configuration,
    but it is not giving required output. Then we saved same file in doc format (Sample.doc), which is giving required output.
    Because it is application specific problem, kindly
    assist to resolve issue on priority. We are sharing IFilter paths for extracting text for doc and docx.
    Doc Filter Location: - %systemroot%\system32\OffFilt.dll
    Docx Filter Location: - <Drive>:\PROGRA~1\COMMON~1\MICROS~1\Filters\offfiltx.dll
    Code Snippet for setting property of filter
    internal static IFilter LoadAndInitIFilter(string fileName, string extension)
                IFilter filter
    = LoadIFilter(extension);
                if (filter
    == null)
                    return null;
                IPersistFile persistFile
    = (filter as IPersistFile);
                if (persistFile
    != null)
    persistFile.Load(fileName, 0);
                    IFILTER_FLAGS flags;
                    IFILTER_INIT iflags
    =
                                IFILTER_INIT.CANON_HYPHENS
    |
                                IFILTER_INIT.CANON_PARAGRAPHS
    |
                                IFILTER_INIT.CANON_SPACES
    |
                                IFILTER_INIT.APPLY_INDEX_ATTRIBUTES
    |
                                IFILTER_INIT.HARD_LINE_BREAKS
    |
                                IFILTER_INIT.FILTER_OWNED_VALUE_OK;
                    if (filter.Init(iflags,
    0, IntPtr.Zero, out flags)
    ==IFilterReturnCode.S_OK)
                        return filter;
                Marshal.ReleaseComObject(filter);
                return null;
    Kindly
    assist to resolve this issue and also let us know if any input is required.
    For any help, we would be really
    thankful.

    Kindly
    assist to resolve this issue and also let us know if any input is required.
    For any help, we
    would be really thankful.

  • When I try to open something in a new tab, Firefox instead opens a file called as untitled.

    When I try to open something in a new tab, Firefox instead opens a file tab called "untitled." Anything that would automatically open new nab instead opens a file tab called "untitled." "Untitled appears to be empty.
    == This happened ==
    Every time Firefox opened
    == This past week

    Hello David.
    It's possible that you are having a problem with some Firefox add-on that is hindering your Firefox's normal behavior. Have you tried disabling all add-ons (just to check), to see if Firefox goes back to normal?
    Whenever you have a problem with Firefox, whatever it is, you should make sure it's not caused by one (or more than one) of your installed add-ons, be it an extension, a theme or a plugin. To do that easily and cleanly, run Firefox in [http://support.mozilla.com/en-US/kb/Safe+Mode safe mode] (don't forget to select ''Disable all add-ons'' when you start safe mode). If the problem disappears, you know it's from an add-on. Disable them all in normal mode, and enable them one at a time until you find the source of the problem. See [http://support.mozilla.com/en-US/kb/Troubleshooting+extensions+and+themes this article] for information about troubleshooting extensions and themes and [https://support.mozilla.com/en-US/kb/Troubleshooting+plugins this one] for plugins.
    If you need support for one of your add-ons, you'll have to contact its author.
    If the problem is not disappears when all add-ons are disabled, please tell me, so we can work from there.

  • How do you get a new line in a description of an iCal event?

    I need to be able to create multiple lines in a description of an iCal event.  In the past, I used control return to get a new line.  In Mountain Lion, this does not show up as a new line, once the event has been saved.  It merges all of the text onto one line and creates new lines as the space dictates.  How can I force new lines in the event description between the words that I have chosen?

    I'm interested too.
    Please help, I had own method to management  iCal's event – new line, of 10.7 worked great – now is a little terrible for me :/

  • How do i create a new line item (say 20) in reference to line item 10

    Hi all,
    I am trying to map a scenario where i want to create a new line item with reference to an existing line item. Where do i get this option in SD, and how could i go about it?
    Thanks & Regards
    Ravi

    > In ECC6 if u go to VA01 and enter the SP and SH,
    > Press Propose Item Icon, then one window will pop-up
    > asking for Sale Document Number, enter the Number and
    > select- selection list, there  u will get all the
    > line item of the Sale Doc. Select and copy Material
    Hi i am on SAP 4.7. How could be the same handled here?

  • Using dbms_lob append to insert text how do you insert a new line inbetween

    DBMS_LOB.APPEND (P_TEXT,'* Operator Phone,');
    ---- inbetween I need to insert new I am using DBMS_LOB.APPEND (P_TEXT,CHR(10)); IS there amy better method?
    DBMS_LOB.APPEND (P_TEXT,'* Operator Email Address,');

    Sorry if the question was not clear ---
    Lets say in the folowing example every write append needs to start on a new line followed by text. How do we do that?
    Do we add another writeappend(cvar,22, chr(10)); inbetween?
    dbms_lob.writeappend(cvar, 19, '<root><book><title>');
    dbms_lob.writeappend(cvar, length(r.title), r.title);
    dbms_lob.writeappend(cvar, 14, '</title><desc>');
    dbms_lob.writeappend(cvar, length(r.description), r.description);
    dbms_lob.writeappend(cvar, 27, '</desc></book><author_name>');
    dbms_lob.writeappend(cvar, length(r.author_name), r.author_name);
    dbms_lob.writeappend(cvar, 21, '</author_name></root>');
    Edited by: user521218 on May 7, 2009 12:34 PM

  • How to search for a new line character in sql

    hi..i am using oracle 10g.
    basically i am looking for usage of columns.I want to see which all columns are used in
    joins.
    this is the quey i have written.
    but
    if there a new line between WHERE ,AND those scenarios are ignored.how to take care of these new line characters?
    SELECT DISTINCT s.TYPE, s.NAME, s.owner, table_name, column_name --,line,text
    FROM all_source s, cols c, all_dependencies d
    WHERE s.NAME = d.NAME
    AND d.referenced_name = c.table_name
    AND c.table_name = 'WSF_EDUCATION_ORGUNIT'
    AND column_name ='ORGUNIT_TYPECODE_OID'
    AND d.TYPE = s.TYPE
    AND d.TYPE <> 'PACKAGE'
    AND d.owner = s.owner ---FOR OVERLOADED OBJECTS
    AND ( (UPPER (text) LIKE
    '%' || 'AND' || '%' || column_name || ' ' || '=%'
    OR (UPPER (text) LIKE
    '%' || 'AND' || '%=' || ' ' || '%' || column_name
    || '%'
    UNION ---if there is where
    SELECT DISTINCT s.TYPE, s.NAME, s.owner, table_name,
    column_name ----,line,text
    FROM all_source s, cols c, all_dependencies d
    WHERE s.NAME = d.NAME
    AND d.referenced_name = c.table_name
    AND c.table_name = 'WSF_EDUCATION_ORGUNIT'
    AND column_name ='ORGUNIT_TYPECODE_OID'
    AND d.TYPE = s.TYPE
    AND d.TYPE <> 'PACKAGE'
    AND d.owner = s.owner ---FOR OVERLOADED OBJECTS
    AND ( (UPPER (text) LIKE
    '%' || 'WHERE' || '%' || column_name || ' ' || '=%'
    OR (UPPER (text) LIKE
    '%' || 'WHERE' || '%=' || ' ' || '%' || column_name
    || '%'
    )

    Hi,
    Not sure if I get it, but you can look for characters using the ascii and chr functions.
    You can change them using replace:
    A new line:
    SQL> select ascii('
      2  ') from dual;
    ASCII('')
            10(Just press enter between the quotes)
    Example how to replace it with a space:
    SQL> with t as ( -- generating test string:
      2  select 'this string has
      3  a new line' str from dual
      4  )
      5  --
      6  -- actual query:
      7  --
      8  select str
      9  ,      replace(str, chr(10), chr(32))
    10  from   t;
    STR                        REPLACE(STR,CHR(10),CHR(32
    this string has            this string has a new line
    a new lineIf that isn't clear of when I'm missing the point then please post some narrowes down examples of what you get now and your desired output. Remember to put the tag around any code example you're posting.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How would BT wire a new line to my property for £1...

    Hi guys, it's question time for me this week .
    Anyway, does anyone have a clue on earth how BT would wire a second line to my property for £124.99? My primary line is a pavement one and there are no telegraph poles near my property. The good ol' street cabinet is around 100 meters up the street.
    Thanks for your help answering my curious questions hehe
    Like this post? Give it a Star . If this post answers your question, please Mark it as the Accepted Solution.

    Thought so... I couldn't imagine them digging up an entire pavement and laying the new material over it once the cable has been placed
    Thanks for your quick response
    Like this post? Give it a Star . If this post answers your question, please Mark it as the Accepted Solution.

  • How do I add a new line to an already open but exhausted PO?

    Hello,
    I am looking for way(s) I can add a new line to an already open  PO, (whose funds are exhausted) to accomodate unplanned expenses related to the same project/vendor.  Is adding a new line to the original purshase requisition the right way to go?
    Thank you
    Fatima
    Edited by: Fatima Imraan on Jul 4, 2008 8:05 PM

    Hi Fatima,
    For unplanned expenses we actually do not need additional line item.
    In case the invoice from vendor shows other expenses then in MIRO there is a TAB for Unplanned Expenses and we can put such expenses there. These expenses should be with in the tolerances limits set. Now if the expenses cross the limit, depending on the settings you have made, the invoice is posted but blocked for payment. Then some one in the approval list should approve the same and the payment can be made.
    This whole process also gets recorded as PO history and hence is very well documented as well
    Normally once a PO is signed it is binding on both parties. So as a Business Process we should not try to add a line item when the PO is exsausted.
    In such case i think it would be a good idea to either create a new PO.
    Some times companies aslo use OPEN PO if it is a year round activity.
    Hope my explanation is useful. assign points if yes.
    Thanks
    Anand

Maybe you are looking for

  • Export to Excel and Txt File

    Is there a way to export a report to more than one option? In other words, I need to be able to provide an option to report to excel and report to a txt file in a tilde-delimited format.

  • I can't sync my ipod with purchased music on a different computer

    I purchased music on a new computer that I have allowed access to for my ipod but now because my library is on my other computer it says this computer is not synced to my ipod so now I can't even sync my purchased music unless I want to erase all of

  • 10.4.7 and Palm Desktop not launching

    I upgraded to 10.4.7 via Software Update, and now can't launch my Palm desktop. I get the following error message: I/O Error - my only option is to click OK, when I do, I get the same error message with the same OK button - when I click it again, the

  • RMS performance testing using HP Loadrunner

    Hi, We are currently planning on how to do our performance testing of Oracle Retail. We are planning to use HP Loadrunner and use different virtual users for Java, GUI, webservices and database requests. Have anyone here done performance testing in R

  • 6509E Fan tray 1 mode change failed

    I have just installed a CEF720 8 port 10GE with DFC   WS-X6708-10GE card in an existing 6509E Chassis and it shuts down due to inadequate cooling. I have another 6509E Chassis with exactly the same setup and it works ok with that. Both are brand new.