DB2 10.5 for Linux, UNIX, and Windows

NEW_LINE procedure - Put an end-of-line character sequence in the message buffer

The NEW_LINE procedure puts an end-of-line character sequence in the message buffer.

Syntax

Read syntax diagramSkip visual syntax diagram
>>-DBMS_OUTPUT.NEW_LINE----------------------------------------><

Authorization

EXECUTE privilege on the DBMS_OUTPUT module.

Example

Use the NEW_LINE procedure to write an end-of-line character sequence to the message buffer. In this example, the text that is followed by an end-of-line character sequence displays as output because SET SERVEROUTPUT ON is specified. However, the text that is in the message buffer, but is not followed by an end-of-line character, does not display.

SET SERVEROUTPUT ON@  

CREATE PROCEDURE proc1() 
BEGIN
  CALL DBMS_OUTPUT.PUT( 'T' );
  CALL DBMS_OUTPUT.PUT( 'h' );    
  CALL DBMS_OUTPUT.PUT( 'i' );    
  CALL DBMS_OUTPUT.PUT( 's' );    
  CALL DBMS_OUTPUT.NEW_LINE;  
  CALL DBMS_OUTPUT.PUT( 'T' );
  CALL DBMS_OUTPUT.PUT( 'h' );
  CALL DBMS_OUTPUT.PUT( 'a' );
  CALL DBMS_OUTPUT.PUT( 't' );
END@  

CALL proc1@  

SET SERVEROUTPUT OFF@
This example results in the following output:
This