Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2011
    Posts
    7

    Unanswered: PL/SQL put_line adds space $

    I'm outputing a file for a vendor who wants a ASCII Carriage Return and ASCII Line Feed at the end of each record. I was concatenating a CHR(13) to the end of the record and the Put_line places the Line feed at the end. However, the system places a CR followed by a Space followed by a LF. This Space is causing the recipent of the file hardache. I have tried using the Put statement and concatenated a CHR(13) with a CHR(10). This seems to work, except the system does not recognize the CHR(10) as a new line in leu of the max line size of 32K. In other words, the system does not reset the counter for line size after my use of CHR(10), it only allows over 32K when you use a Put_Line or New_Line. I have also tried using a Put statement where I just concatenate a CHR(13), then use a new_Line statement. Unfortunately, it places a Space between the CR and LF. Any ideas?

    Thanks.

  2. #2
    Join Date
    Aug 2003
    Location
    Where the Surf Meets the Turf @Del Mar, CA
    Posts
    7,776
    Provided Answers: 1
    what happens if you use PUT_RAW instead of PUT_LINE?
    You can lead some folks to knowledge, but you can not make them think.
    The average person thinks he's above average!
    For most folks, they don't know, what they don't know.
    Good judgement comes from experience. Experience comes from bad judgement.

  3. #3
    Join Date
    Aug 2011
    Posts
    7
    Will it place a Line Feed or do I need to manually add one? Thanks.

  4. #4
    Join Date
    Aug 2011
    Posts
    7
    put_raw failed (ORA-06502: numeric or value error: hex to raw conversion error.

  5. #5
    Join Date
    Aug 2011
    Posts
    7
    Determined that using the PUT statement and placing our own CR LF at the end of each record and following the PUT with a FFLUSH statement, flushed the data and reset the line count. Thus we were able to place a CR and LF side-by-side at the end of the line, as requested by our vendor (receiver of file) and place over 32K data into our file (23,082 records).

    Hope this helps someone else out.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •