Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

UTL help me please....ORU-10028: line length overflow, limit of 255 bytes per line

Posted on 2001-07-26
5
Medium Priority
?
916 Views
Last Modified: 2011-10-03
I want to read a line from text file whose have about 500 characters and the error :
ORU-10028: line length overflow, limit of 255 bytes per line
appear...

how can i get read more than 255 bytes from Text file with UTL_File.Get line??

If its impossible how can i do this???

Thanks!!!
0
Comment
Question by:cdlima
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:fva
ID: 6322670
Maybe you'll have to live with that.
Try to split the file in some external way before.(something like the C-style "\" before the end of line for continuing the line)
Or you might want to look into external procs and do your stuff there.

F.
0
 
LVL 1

Accepted Solution

by:
chdba earned 200 total points
ID: 6322909
It's a problem of dbms_output and not a problem of UTL_FILE.

I tried it. As soon, as I try to print the variable on screen (DBMS_OUTPUT) it fails with ORU-10028. If you need dbms_output, you'll have to split before using dbms_output.

This example works fine (change path and file_name):
Of course you have to create a test_input with long lines.

PROCEDURE test_ch2 IS
  vcLinebuffer  VARCHAR2(1022);
  vxFilehandle  UTL_FILE.FILE_TYPE;
BEGIN
  vxFilehandle := UTL_FILE.FOPEN('[/path]','[file_name]','r');
  WHILE 1 < 2
  LOOP
    UTL_FILE.GET_LINE(vxFilehandle,vcLinebuffer);
--   dbms_output.put_line('Test:    '||vcLinebuffer);
    dbms_output.put_line('Length:  '||LENGTH(vcLinebuffer));
  END LOOP;
EXCEPTION
  WHEN no_data_found THEN
    -- Statements
    dbms_output.put_line('End');
    UTL_FILE.FCLOSE(vxFilehandle);
END;
--

My exaple-output:

DBBV8_SQL> exec test_ch2
Length:  12
Length:  43
Length:  114
Length:  309
Length:  4
Length:  8
Length:
Ende

PL/SQL procedure successfully completed.

Good luck
chdba
0
 

Author Comment

by:cdlima
ID: 6322933
Thank you!!!
Our friend said me "maybe you have to live with it"...
Its worst!!!!!

But now i retire the dbms_output and its run....


See you later!!!
0
 
LVL 4

Expert Comment

by:fva
ID: 6323072
I'm glad I was wrong.

F. :)
0
 

Author Comment

by:cdlima
ID: 6323106
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Suggested Courses

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question