How to increase the text file when using the UTL_FILE

I am writing the Procedure and the output of that data is storing in the text file.
 the text file sixe is 300KB

UTL_FILE.FOPEN('DIR','/filename3.txt', 'w','32767');

getting below error:
ORA-06502: PL/SQL: numeric or value error

how to incerease the output text file size.
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
I'm not aware of a file size limitation using UTL_FILE but I can guarantee that 300K isn't it.

The 32767 is the maximum size for a single line that is written out.

Change the code to write the data out in sizes smaller than 32K chunks.
johnsoneSenior Oracle DBACommented:
The last parameter to FOPEN is a number, so I wouldn't put quotes around it.

The last parameter is also the maximum size of a single line, not the maximum size of a file. (see documentation here ->  If you are saying that you have a 300K file that contains only one line, they you may have an issue.

I am a little confused about your question on increasing the output file size.  Are you saying that you want to add to a file rather than overwrite it?  That would be a change to the open mode, which is in the documentation link.

Also, are you sure that the open is the line that is causing the issue.
Mark GeerlingsDatabase AdministratorCommented:
The size limit in UTL_FILE only applies to the number of bytes written per line, not to the total size of the file.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.