Solved

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

Posted on 2001-07-26
5
911 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 50 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

734 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