Home » RDBMS Server » Server Administration » Re: Creating an ASCII file (line size -- 2000 chars) in PL/SQL
Re: Creating an ASCII file (line size -- 2000 chars) in PL/SQL [message #369653] Fri, 04 February 2000 12:18 Go to next message
Subrahmanyam Thodla
Messages: 6
Registered: February 2000
Junior Member
How do I create an ASCII file from a PL/SQL procedure on Unix. The line size is 2000 charectars.
The DBMS_OUTPUT.Put_line has a limitation of 255 charectars.

Any answers are really appreciated. You can call me at: (313)-506-7029.

Thanks.
Re: Creating an ASCII file (line size -- 2000 chars) in PL/SQL [message #369673 is a reply to message #369653] Tue, 14 March 2000 12:03 Go to previous messageGo to next message
fundu
Messages: 2
Registered: March 2000
Junior Member
try utl_file package...that lets u write upto 1022 chars per line...if u want more chars..i dont know..in case u find out..lemme know too..
Re: Creating an ASCII file (line size -- 2000 chars) in PL/SQL [message #369676 is a reply to message #369653] Wed, 26 July 2000 11:05 Go to previous messageGo to next message
Seb
Messages: 7
Registered: July 2000
Junior Member
Here is the method :

PROCEDURE DEBUG_PRINT(str VARCHAR2) IS
characterwrote NUMBER;
position NUMBER;
character VARCHAR2(1);
BEGIN
DBMS_OUTPUT.ENABLE(20000);
characterwrote := 0;
position := 1;
DBMS_OUTPUT.PUT_LINE('DEBUG_PRINT');
WHILE (position<=LENGTH(str)) LOOP
IF (characterwrote = 255) THEN
characterwrote := 0;
DBMS_OUTPUT.PUT_LINE(' ');
END IF;
character := SUBSTR(str,position,1);
IF (character = '''') THEN
NULL;
ELSE
DBMS_OUTPUT.PUT(character);
END IF;
position := position +1;
characterwrote := characterwrote + 1;
END LOOP;
DBMS_OUTPUT.PUT_LINE('DEBUG_PRINT');
EXCEPTION
/* If an exception is raised, reraise it */
WHEN OTHERS THEN
RAISE;
END DEBUG_PRINT;
Re: Creating an ASCII file (line size -- 2000 chars) in PL/SQL [message #369677 is a reply to message #369653] Wed, 26 July 2000 11:06 Go to previous messageGo to next message
Seb
Messages: 7
Registered: July 2000
Junior Member
Here is the method :

PROCEDURE DEBUG_PRINT(str VARCHAR2) IS
characterwrote NUMBER;
position NUMBER;
character VARCHAR2(1);
BEGIN
DBMS_OUTPUT.ENABLE(20000);
characterwrote := 0;
position := 1;
DBMS_OUTPUT.PUT_LINE('DEBUG_PRINT');
WHILE (position<=LENGTH(str)) LOOP
IF (characterwrote = 255) THEN
characterwrote := 0;
DBMS_OUTPUT.PUT_LINE(' ');
END IF;
character := SUBSTR(str,position,1);
IF (character = '''') THEN
NULL;
ELSE
DBMS_OUTPUT.PUT(character);
END IF;
position := position +1;
characterwrote := characterwrote + 1;
END LOOP;
DBMS_OUTPUT.PUT_LINE('DEBUG_PRINT');
EXCEPTION
/* If an exception is raised, reraise it */
WHEN OTHERS THEN
RAISE;
END DEBUG_PRINT;
Re: Creating an ASCII file (line size -- 2000 chars) in PL/SQL [message #369678 is a reply to message #369653] Wed, 26 July 2000 11:07 Go to previous message
Seb
Messages: 7
Registered: July 2000
Junior Member
Here is the method :

PROCEDURE DEBUG_PRINT(str VARCHAR2) IS
characterwrote NUMBER;
position NUMBER;
character VARCHAR2(1);
BEGIN
DBMS_OUTPUT.ENABLE(20000);
characterwrote := 0;
position := 1;
DBMS_OUTPUT.PUT_LINE('DEBUG_PRINT');
WHILE (position<=LENGTH(str)) LOOP
IF (characterwrote = 255) THEN
characterwrote := 0;
DBMS_OUTPUT.PUT_LINE(' ');
END IF;
character := SUBSTR(str,position,1);
IF (character = '''') THEN
NULL;
ELSE
DBMS_OUTPUT.PUT(character);
END IF;
position := position +1;
characterwrote := characterwrote + 1;
END LOOP;
DBMS_OUTPUT.PUT_LINE('DEBUG_PRINT');
EXCEPTION
/* If an exception is raised, reraise it */
WHEN OTHERS THEN
RAISE;
END DEBUG_PRINT;
Previous Topic: Backup and Recovery
Next Topic: Re: Help ASAP:- 'OSD-04016: Error queuing an asynchronous I/O request.
Goto Forum:
  


Current Time: Sat Oct 24 04:14:08 CDT 2020