PUT procedure - Put a partial line in the message buffer
The PUT procedure puts a string in the message buffer. No end-of-line character sequence is written at the end of the string.
Syntax
Procedure parameters
- item
- An input argument of type VARCHAR(32672) that specifies the text to write to the message buffer.
Authorization
EXECUTE privilege on the DBMS_OUTPUT module.
Examples
Use the PUT procedure to put a partial line in the message buffer. In this example, the NEW_LINE procedure adds an end-of-line character sequence to the message buffer. When proc1 runs, because SET SERVEROUTPUT ON is specified, a line of text is returned.
SET SERVEROUTPUT ON@
CREATE PROCEDURE proc1()
BEGIN
CALL DBMS_OUTPUT.PUT( 'H' );
CALL DBMS_OUTPUT.PUT( 'e' );
CALL DBMS_OUTPUT.PUT( 'l' );
CALL DBMS_OUTPUT.PUT( 'l' );
CALL DBMS_OUTPUT.PUT( 'o' );
CALL DBMS_OUTPUT.PUT( '.' );
CALL DBMS_OUTPUT.NEW_LINE;
END@
CALL proc1@
SET SERVEROUTPUT OFF@
This example results in the following output:Hello.
Usage notes
After using the PUT procedure to add text to the message buffer, use the NEW_LINE procedure to add an end-of-line character sequence to the message buffer. Otherwise, the text is not returned by the GET_LINE and GET_LINES procedures because it is not a complete line.