|
|
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 |
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 |
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 |
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;
|
|
|