Utl_file.utl_raw adds a line feed at the end of the line. How to avoid it.

utl_file.utl_raw adds a line feed at the end of the line. I have to send some binary files to my vendor and they do not want a line feed at the end of the line.
When I execute the sample program below, it creates a file with a line feed(chr(10)) at the end of the line. When I do dump in hexa, it shows a character x0A
How to avoid the line feed at end of line?
We are using Oracle 9i on unix platform.
declare
l_output           utl_file.file_type;
v_raw      raw(32767);
v_trlr_rec_code      VARCHAR2(2);
v_trlr_evnt_title      VARCHAR2(6);
begin
l_output := utl_file.fopen( 'RM_MHE_IN_DIR', 'abc.dat', 'w', 14 );
v_trlr_rec_code      := '99';
v_trlr_evnt_title      := 'STARTD';
v_raw := HEXTORAW(v_trlr_rec_code) || utl_raw.cast_to_raw(v_trlr_evnt_title);
utl_file.put_raw( l_output, v_raw );
utl_file.fflush( l_output );
utl_file.fclose( l_output );
dbms_output.put_line( utl_raw.cast_to_varchar2( v_raw ) );
EXCEPTION
WHEN OTHERS THEN
     dbms_output.put_line( sqlerrm );
end;
/

oops, sorry i overlooked the fact that the db is 9i; thanks for pointing it out Solomon.
Not sure about this, but a workaround could be to remove the "\n" characters at the end of each line using one of the many Unix utilities after the file has been created.
isotope

Similar Messages

  • How to find end of the Page in Crystal ? or I need to add one Horizontal line at the end of the page.--- URGENT HELP NEEDED

    Hi friends,
    I need to add one horizontal line  for the detail section at the end of the page.
    I tried to put that line in page footer and i tried with Box also. Both are not properly working. Some space problem is coming.
    Is there any feature to find end of the Page.
    I want report format like this.
    set id  |  set name |  date  Name
      1         x           dddd   vijay
                            dddd   sarathi
                            dddd    reddy
    (End of the page)
    Thanks in advance...
    vijay.

    Do you know how many detail records are showing up per page?
    If you do - you could create a Details B section that is suppressed except for on Record N (where N is a counter, and N is the last Detail record that will show up on a page).
    The Page footer is indeed built so that it will be rendered at the bottom of your physical page of paper.

  • Is it possible to add a word at the end of a line?

    Hi, i'm searching a way to automatically add a word at the end of a certain paragraph styles?
    is it something possible doing by using a script?
    i don't script myself but if someone could find me a way to do this it would be really appreciated.
    Here's an example to what i need to do:
    i have paragraph style X in a current  book document, and i need to edit the book and add the copyright source at the end of every line that has the style X to it
    so i would need something that asks me
    the targeted paragraph style
    which word i want to append to it, and then apply it torough the document.
    Thanks in advance

    Yes, the screen shot shows where you got it wrong:
    function(){return A.apply(null,[this].concat($A(arguments)))}
    Find: (.)$
    and set your paragraph style in the find format area
    Change: $1XYZ
    where XYZ is the text you want to insert.
    .. you forgot the '1' right after the '$'. It's an important omission: "$1" is a GREP code, meaning "insert the found text, parenthesized group #1" -- and there is also a "$2", "$3", etc. up to "$9". It's great if you have to switch two, or even more, items around! But without the digit, the dollar sign indicates ... just a dollar sign.
    Change the Change to text to
    $1~S(CEMEQ)
    and you'll be fine.

  • Remove Line feed at the end of the file while using file adapter

    Hi All,
    I have a requirement. We are sending a file from SAP to FTP using file adapter. we are successful in sending the file to FTP but at the end of the file a extra blank line is created .
    Can anyone please suggest how to remove the extra line feed at the end of the file.
    Thanks and Regards,
    LRK.

    check this:
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/frameset.htm
    To define an additional string as a separator after the last column in a row, specify it here. The system skips this string when it processes the last column (otherwise the system would treat it as part of the last column).
    Also there are solved threads which deal with same problem....you can even check them out...
    regards,
    Abhishek.

  • Is it possible to remove hyphens at the end of a line separating parts of a word? Thank you

    Hi there,
    I was wondering, Indesign automatically adds hyphens at the end of a line to join one part of the word with the next part (on the next line). Is there any way to get rid of this in my entire document so that indesign automatically puts the word on the next line rather than separating it with a hyphen? I've been going through it manually and correcting it but it's taking many hours.
    Let me know if it's not clear what I'm saying
    Many thanks

    LegitNZ wrote:
     I've been going through it manually and correcting it but it's taking many hours
    Ouch!  What you need to do is turn "hyphenating" off.  Select all your text and do it in the control panel like this:
    You can also turn it off before you start in the paragraph panel, or by turning it off with no documents open make it off by default.

  • Finding the end of a line in a JTextArea and inserting a comma

    Hi,
    At the moment I am reading in a comma delimited file into a JTextArea.
    This part is ok I can see the file in the window correctly.
    The problem that I am having now is that I want to add a comma to the end of each line in the JTextArea.
    Does anyone know how to do this?
    Thank you

    Well you have to get the String value of the JTextField.
    String text = YourJTextField.getText()
    Then you have to make a loop and check each single character if it equals '\n', that means "RETURN" or "NEW LINE".
    That is the direction I would go. Inform yourself about String manipulations first, like how to look for character, how to compare them and how to add them.

  • BSP adds CR/LF marker at the end of the page even with compression options

    Hello!
    I'm creating normal BSP Page with Flow Logic and setting the contents myself:
    <%@page language="abap" %><%
      response->set_cdata( '-=-' ).
    %>
    The problem is that WebAS somehow always adds a CR/LF (new line) marker at the end of the page (even if I set compression option to "Remove leading and trailing spaces"). I also tried to set different mime-types.
    On the other side there is a BSP Application it00 (described here http://help.sap.com/saphelp_nw04/helpdata/en/eb/8c683c8de8a969e10000000a114084/content.htm ) that shows the uploaded file right.
    So I was trying to include that 'solution' setting OnInputProcessing event to this
    *         set response data to be the file content
              runtime->server->response->set_cdata( '!=!' ).
    *         set the mime-type and file size in the response
              runtime->server->response->set_header_field(
                name  = 'Content-Type'
                value = 'text/plain' ).
              runtime->server->response->set_header_field(
                name  = 'Content-Length'
                value = '3' ).
              navigation->response_complete( ).
    But nothing happens at all.
    Please, help me getting rid of these two annoying bytes ('CR/LF') at the end of page.

    Thank you, Cornelia!
    It works now.
    The following code is "must have"
    navigation->response_complete( ).

  • Empty lines at the end of the payload generated in FTP server

    Hi All,
    I am facing an issue in one of the use cases that I am trying to implement.
    I am getting a purchase order from one of the trading partners through Oracle B2B.
    B2B forwards this B2BM (B2B message ) to AIAB2BInterface. From AIAB2BInterface my BPEL process gets invoked, which in turn invokes the AdapterComposite which has a FTP adapter that writes the purchase order to a FTP server. PFB the end to end flow.
    PurchaseOrder from ABC trading pertner--> Oracle B2B --> AIAB2BInterface --> TestInputProvABCS --> TestInputAdapter -> Host trading partner picks up the file from FTP location
    In the ProvABCS I retrieve the actual payload from the B2BM and convert it into a string using ora:getContentasString. I am then invoking the adapter composite and sending the string as the input to FTP adapter. At the adapter composite I use a simple native schema (for validation of the input string) which has only one element PO_Info of the type string. But when the file gets generated in the FTP server there are empty lines and junk characters at the end of the file.
    Need some advice on this. Why are the empty lines coming in the end of the file? Please help!
    Thanks

    OK, I cannot figure out a way to modify the JTable (in an extended class) directly.
    So, what I did was to add a wrapper around the TreeTableModel which shows an empty row at the end.
    For those of you who are in a similar situation, the methods that I had to modify are
    public boolean isCellEditable(Object node, int column);
    public int getIndexOfChild(Object parent, Object child);
    public int getChildCount(Object node);
    public Object getChild(Object node, int i);
    These other methods are required if you are using a TreeTable instead of just a table (see http://java.sun.com/products/jfc/tsc/articles/treetable2/index.html)
    public Object getValueAt(Object node, int row, int column);
    public Object getValueAt(Object node, int row, String columnName);
    public void setValueAt(Object node, int row, int column, Object newValue);
    public void setValueAt(Object node, int row, String columnName, Object newValue);
    The signature of above methods is slightly different than the ones at: http://java.sun.com/products/jfc/tsc/articles/treetable2/src/TreeTableModel.java
    This is due to the fact that, if you want to display the serial no. (as in row number), then getValue() can just return the row number. IndexedTreeTableModel is another wrapper around the TreeTableModel which can add an extra column to display the serial number.

  • Adding a pipe character '|' at the end of each line

    How can I add a '|' at the end of each line in a text file?
    Please provide an example.
    TIA

    Using Readers and Writers are often a better choice for text: they are designed for character-based I/O, handling different character set encodings and thus more easily localizable.
    BufferedReader and PrintWriter are buffered which in many cases will increase performance.
    These classes also provide line-oriented methods, readLine() and println(), which will handle end-of-line delimiters in a platform-independant way.
    BufferedReader in = null ;
    PrintWriter out = null ;
    try {
        in = new BufferedReader(new FileReader("infile.txt")) ;
        out = new PrintWriter(new FileWriter("outfile.txt")) ;
        String line ;
        while ((line = in.readLine()) != null) {
            out.print(line) ;
            out.println('|') ;
        out.flush() ;
    } catch (FileNotFoundException e) {
        System.err.println("problem opening file for read: "+e) ;
    } catch (IOException e) {
        System.err.println("problem reading file: "+e) ;
    } finally {
        try {
            if (out != null) out.close() ;
            if (in  != null) in.close() ;
        } catch (IOException e) {
            System.err.println("problem closing files: "+e) ;
    }

  • Inserting a '|' at the end of a line

    Is there a Windows script out there where you can add a '|' at the end of each line in a text file? Can you please provide an example?
    TIA

    Which version of photoshop cs6 are you using and operating system?
    Did you try resetting the type tool or resetting the photoshop cs6 preferences?
    Right click on the Big T on the tool options bar and click Reset Tool
    reset preferences:
    http://forums.adobe.com/thread/375776?tstart=0

  • How to add a sub report at the end of the main report whilst grouped

    Hi!
    I have a main report that is grouped by the Customers name and then details of transactions they did with the company.
    I need to add a letter at the end of each group for each customer (With their name displayed in the letter). I tried adding a sub report in the report footer, but it only appears once at the end of the report, rather than at the end of each group for each customer.
    How can I achieve the desired result?
    Regards
    Vik

    Vik,
    You are on the right track with the sub-report.
    1. Create your letter in a separate report.
    2. Add the Letter Report to your original report as a sub report in the group footer.
    3. Set the report links on the "Group By" field.
    This will give you a letter record for each report record with the same grouping as the main report.
    Hope this helps,
    Jason

  • Is it possible to export to PDF without a Return character at the end of every line?

    I am the author of a book whose first edition has been typeset and extensively amended in InDesign.  I now need to rewrite the first edition to produce a second edition.
    When I copy-and-paste from the PDF with which the publisher has supplied me into MS Word, I get a Return character at the end of every line, which means that text doesn’t automatically wrap and sentences are fragmented so that I get spurious grammar errors.
    I know that not all PDF files have a Return at the end of every line.  Is it possible to restrict Returns to the end of paragraphs when exporting from InDesign to PDF?  If so, what should the publisher be asking the typesetter to do?

    Thanks for your lightning-swift and helpful replies, Mike & Ellis.
    I don't have InDesign myself, so I know hardly anything about how it's used.  I'm just trying to research what an internationally-known publisher should already know how to do, but apparently doesn't!
    Following your suggestion, Mike, I have downloaded the trial version of Acrobat and exported the PDF to a Word file.  This has been moderately successful as there are far fewer spurious Return characters, just a few that I suspect may be hangovers from the typesetter having introduced soft returns in ID.
    As you've suggested Peter and Ellis, I'll suggest that the publisher asks the typesettter to export from ID to RTF and Text to see if that's even better.
    Message was edited 15:24 GMT by: AlanS5100

  • Is there a way to link text fields, so when you reach the end of one line it moves to the next?

    I often use Acrobat Pro to create forms, whether it be from an existing document or from scratch, and this has always irritated me.  I know you can create a text field and select the Multi-line option; however, this is not what I am looking to do.  I have a form that has a Yes or No Radio Button, then below it says "If yes, please explain:" followed by 3 lines to respond.  When I run it through the Form Creator, it places three text fields on the response lines - as it should.  The first line is shorter because of the text, which is why I cannot use the Multi-line option.  So is there a way to link these three text fields, so that when I reach the end of the first line it stops and automatically moves to the next? 
    Here is a picture of what I am looking at:

    These types of lines are a left-over from printed forms. There's no reason
    to keep using them if your form is digital.
    The best approach is to combine the fields to a single multiline field, and
    get rid of the first line. Trying to link text fields together is very
    tricky. I haven't yet to see it done properly.

  • Osx 10.7.4   safari 6.0  when I add a new bookmark to the "bookmarks menu" it is added somewhere in the middle instead of at the end of the list.  this just started a few days ago after an update.  Has anyone else noticed this?.

    osx 10.7.4   safari 6.0  When I add a new bookmark to the "bookmarks menu" it is added somewhere in the middle instead of at the end of the list.  This just started a few days ago after an update.  Has anyone else noticed this?.

    Just for those who are interested, this is what cleared the "bookmark menu"  trbl I had.
    Open System Preferences > iCloud
    Deselect the box next to Bookmarks, then reselect it.
    Quit and relaunch Safari. Try a bookmark again.

  • Add JTable Row Headers At The End Of The Rows(At Right)?

    hi all
    i got this example for adding JTable Row Headers,but it adds the headers at the left(beginning of the row)
    and i want to add the headers at the end of the row(at right),any ideas how to do that?
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.AbstractListModel;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JList;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.ListCellRenderer;
    import javax.swing.ListModel;
    import javax.swing.UIManager;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.JTableHeader;
    * @version 1.0 11/09/98
    class RowHeaderRenderer extends JLabel implements ListCellRenderer {
      RowHeaderRenderer(JTable table) {
        JTableHeader header = table.getTableHeader();
        setOpaque(true);
        setBorder(UIManager.getBorder("TableHeader.cellBorder"));
        setHorizontalAlignment(CENTER);
        setForeground(header.getForeground());
        setBackground(header.getBackground());
        setFont(header.getFont());
      public Component getListCellRendererComponent(JList list, Object value,
          int index, boolean isSelected, boolean cellHasFocus) {
        setText((value == null) ? "" : value.toString());
        return this;
    class RowHeaderExample extends JFrame {
      public RowHeaderExample() {
        super("Row Header Example");
        setSize(370, 150);
        ListModel lm = new AbstractListModel() {
          String headers[] = { "Row1", "Row2", "Row3", "Row4"};
          public int getSize() {
            return headers.length;
          public Object getElementAt(int index) {
            return headers[index];
        DefaultTableModel dm = new DefaultTableModel(lm.getSize(), 4);
        JTable table = new JTable(dm);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        table.setRowHeight(18);
        JList rowHeader = new JList(lm);
        rowHeader.setFixedCellWidth(50);
        rowHeader.setFixedCellHeight(18);
        rowHeader.setCellRenderer(new RowHeaderRenderer(table));
        JScrollPane scroll = new JScrollPane(table);
        scroll.setRowHeaderView(rowHeader);
        getContentPane().add(scroll, BorderLayout.CENTER);
      public static void main(String[] args) {
        RowHeaderExample frame = new RowHeaderExample();
        frame.addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            System.exit(0);
        frame.setVisible(true);
    }

    fixed by:
    list.setBackground(table.getTableHeader().getBackground());here's the full code:
    import java.awt.BorderLayout;
    import java.awt.Component;
    import java.awt.ComponentOrientation;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.DefaultListModel;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JList;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.ListCellRenderer;
    import javax.swing.UIManager;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.JTableHeader;
    * @version 1.0 11/09/98
    class RowHeaderRenderer extends JLabel implements ListCellRenderer {
      JTable table;
      RowHeaderRenderer(JTable table) {
        this.table = table;
        JTableHeader header = table.getTableHeader();
        setOpaque(true);
        setBorder(UIManager.getBorder("TableHeader.cellBorder"));
        setHorizontalAlignment(CENTER);
        setForeground(header.getForeground());
        setBackground(header.getBackground());
        setFont(header.getFont());
      public Component getListCellRendererComponent(JList list, Object value,
          int index, boolean isSelected, boolean cellHasFocus) {
        list.setBackground(table.getTableHeader().getBackground());
        setText((value == null) ? "" : value.toString());
        return this;
    class RowHeaderExample extends JFrame {
      public RowHeaderExample() {
        super("Row Header Example");
        setSize(370, 150);
        setLocationRelativeTo(null);
        DefaultListModel lstModel = new DefaultListModel();
        lstModel.addElement("Row 1");
        lstModel.addElement("Row 2");
        lstModel.addElement("Row 3");
        lstModel.addElement("Row 4");
        DefaultTableModel dm = new DefaultTableModel(lstModel.getSize(), 4);
        JTable table = new JTable(dm);
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        table.setRowHeight(18);
        JList rowHeader = new JList(lstModel);
        rowHeader.setFixedCellWidth(50);
        rowHeader.setFixedCellHeight(18);
        rowHeader.setCellRenderer(new RowHeaderRenderer(table));
        JScrollPane scroll = new JScrollPane(table);
        scroll.setRowHeaderView(rowHeader);
        table.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
        scroll.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
        getContentPane().add(scroll, BorderLayout.CENTER);
      public static void main(String[] args) {
        RowHeaderExample frame = new RowHeaderExample();
        frame.addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            System.exit(0);
        frame.setVisible(true);
    }

Maybe you are looking for

  • NetWeaver ABAP AS 7.02 - Import ABAP phase

    Hi all, I encountered the following problem during the installation on Windows 2003 Server on a Compaq 6710b. Problem seems to be related to java memory Xmx1024m that is too high, how can I solve this issue? I found many posts that suggest to decreas

  • [svn:fx-trunk] 11250: Fixing proxy pattern bug in VideoPlayer.

    Revision: 11250 Author:   [email protected] Date:     2009-10-28 17:07:19 -0700 (Wed, 28 Oct 2009) Log Message: Fixing proxy pattern bug in VideoPlayer.  I tried to save a few extra bytes by not keeping around an extra object, but I made a mistake wi

  • ME51(2/3/4)N Reset release purchase requisition

    Hello, I need to reset the issue of the purchase request after a specific condition occurs. To reset the issue I found the user exit EXIT_SAPLMEREQ_010 (Includes ZXM02U12 MEREQ001 and extension). I first used this function:       CALL FUNCTION 'ME_RE

  • Switching between OS X and Win7 on MacBook Pro

    Is there an app or some process to easily switch between OS X and Win7 on my MacBook Pro? Thanks.

  • Consolidation Unknown Error

    After consolidation, i check messages, find many errors. I don't know why. Error Code:{4BAFAE85-A9EF-403B-B91A-6F2DB4E67D5B} System Message Summary Config consolidation muliti dimension data set. An unknown error has occurred in the HsvDSData2 object