Home » RDBMS Server » Server Administration » TEXT_IO_FILE
TEXT_IO_FILE [message #62454] Thu, 22 July 2004 12:38 Go to next message
Sanjay Bajracharya
Messages: 279
Registered: October 2001
Location: Florida
Senior Member
Can someone shed light on TEXT_IO_FILE ??

I have been using UTL_FILE, but one of the developers want to use the TEXT_IO_FILE. Did a search but cannot find much document.

Env:
Oracle 9.2.0.4.0 EE 64-Bit
AIX 5L

Any info is much appreciated.

Thanx.
--
Sanjay
Re: TEXT_IO_FILE [message #62463 is a reply to message #62454] Fri, 23 July 2004 00:38 Go to previous message
Frank Naude
Messages: 4587
Registered: April 1998
Senior Member
Hi,

Your developer might be referring to the TEXT_IO package available in Oracle Forms. However, unlike UTL_FILE, TEXT_IO is used to read/write client side files.

Here's an example program showing how to use TEXT_IO:

DECLARE
   file1  TEXT_IO.FILE_TYPE;
   file2  TEXT_IO.FILE_TYPE;
   str    VARCHAR2(80);
BEGIN
   file1 := TEXT_IO.FOPEN( 'input.txt','r' );
   file2 := TEXT_IO.FOPEN( 'output.txt', 'w' );
   TEXT_IO.GET_LINE( file1, str );
   TEXT_IO.PUT_LINE( file2, str );
   TEXT_IO.FCLOSE( file1 );
   TEXT_IO.FCLOSE( file2 );
END;


Best regards.

Frank
Previous Topic: Am unable to create database on IBM AIX Server
Next Topic: Reserved words, Special Characters, etc.
Goto Forum:
  


Current Time: Thu Jan 09 04:26:34 CST 2025