
----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:29:34.597
select 'Test connection' from dual;

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:29:34.738
BEGIN SYS.DBMS_OUTPUT.ENABLE(buffer_size => NULL); END;

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:29:34.956
select PARAMETER,VALUE from nls_session_parameters where PARAMETER in('NLS_NUMERIC_CHARACTERS','NLS_DATE_FORMAT','NLS_CURRENCY');

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:29:35.145
select to_char(9,'9C') from dual;

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:29:35.180
BEGIN
    UT.run('UT3.UT_NACHMELDEN');
END;

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:31:29.962
begin
  sys.dbms_output.get_lines(:LINES, :NUMLINES);
end;
:LINES(VARCHAR[32767],)=<PL/SQL TABLE[10]> 
:NUMLINES(INTEGER,)=10

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:31:30.000
DECLARE
   v_lines      SYS.DBMS_OUTPUT.chararr;
   v_line       VARCHAR2 (32767);
   v_clob       CLOB;
   v_cnt        NUMBER;
   v_output     VARCHAR2 (32767);
   v_output_len NUMBER;

   PROCEDURE write_to_clob AS
   BEGIN
     if v_output is not null then
       BEGIN
         DBMS_LOB.writeappend (v_clob, v_output_len, v_output);
       EXCEPTION
         WHEN VALUE_ERROR THEN
           NULL;
       END;
     end if;
     v_output := NULL;
     v_output_len := 0;
   END;

BEGIN
  v_cnt := :inOutCnt;
  SYS.DBMS_OUTPUT.get_lines (v_lines, v_cnt);
  :inOutCnt := v_cnt;
  IF v_lines.COUNT > 0 THEN
    DBMS_LOB.createtemporary (v_clob, FALSE, DBMS_LOB.session);
    DBMS_LOB.open (v_clob, DBMS_LOB.lob_readwrite);
    v_output := NULL;
    FOR line IN 1 .. v_lines.COUNT
    LOOP
       IF :trim_line = 1 THEN
          v_line := TRIM (v_lines (line));
       ELSE
        v_line := v_lines (line);
       END IF;
       IF v_line IS NOT NULL THEN
          v_line := REPLACE (v_line, CHR (0));
          v_output_len := LENGTH(v_output);
          IF v_output_len + LENGTH (v_line) > 32767 THEN
             write_to_clob;
          END IF;
          v_output := v_output || v_line;
          v_output_len := LENGTH(v_output);
          IF line < v_lines.COUNT THEN
            IF v_output_len + 2 > 32767 THEN
              write_to_clob;
            END IF;
            v_output := v_output || CHR (13) || CHR (10);
            v_output_len := LENGTH(v_output);
         END IF;
       END IF;
    END LOOP;
    IF v_output_len > 0 THEN
      write_to_clob;
    END IF;
    :outLines := v_clob;
    DBMS_LOB.freetemporary (v_clob);
  ELSE
    :outLines := null;
  END IF;
END;
:trim_line(INTEGER,IN)=1 
:inOutCnt(INTEGER,IN/OUT)=1000 
:outLines(CLOB,OUT)=<LOB:400620>

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:31:30.534
DECLARE
   v_lines      SYS.DBMS_OUTPUT.chararr;
   v_line       VARCHAR2 (32767);
   v_clob       CLOB;
   v_cnt        NUMBER;
   v_output     VARCHAR2 (32767);
   v_output_len NUMBER;

   PROCEDURE write_to_clob AS
   BEGIN
     if v_output is not null then
       BEGIN
         DBMS_LOB.writeappend (v_clob, v_output_len, v_output);
       EXCEPTION
         WHEN VALUE_ERROR THEN
           NULL;
       END;
     end if;
     v_output := NULL;
     v_output_len := 0;
   END;

BEGIN
  v_cnt := :inOutCnt;
  SYS.DBMS_OUTPUT.get_lines (v_lines, v_cnt);
  :inOutCnt := v_cnt;
  IF v_lines.COUNT > 0 THEN
    DBMS_LOB.createtemporary (v_clob, FALSE, DBMS_LOB.session);
    DBMS_LOB.open (v_clob, DBMS_LOB.lob_readwrite);
    v_output := NULL;
    FOR line IN 1 .. v_lines.COUNT
    LOOP
       IF :trim_line = 1 THEN
          v_line := TRIM (v_lines (line));
       ELSE
        v_line := v_lines (line);
       END IF;
       IF v_line IS NOT NULL THEN
          v_line := REPLACE (v_line, CHR (0));
          v_output_len := LENGTH(v_output);
          IF v_output_len + LENGTH (v_line) > 32767 THEN
             write_to_clob;
          END IF;
          v_output := v_output || v_line;
          v_output_len := LENGTH(v_output);
          IF line < v_lines.COUNT THEN
            IF v_output_len + 2 > 32767 THEN
              write_to_clob;
            END IF;
            v_output := v_output || CHR (13) || CHR (10);
            v_output_len := LENGTH(v_output);
         END IF;
       END IF;
    END LOOP;
    IF v_output_len > 0 THEN
      write_to_clob;
    END IF;
    :outLines := v_clob;
    DBMS_LOB.freetemporary (v_clob);
  ELSE
    :outLines := null;
  END IF;
END;
:trim_line(INTEGER,IN)=1 
:inOutCnt(INTEGER,IN/OUT)=1000 
:outLines(CLOB,OUT)=<LOB:454202>

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:31:31.041
DECLARE
   v_lines      SYS.DBMS_OUTPUT.chararr;
   v_line       VARCHAR2 (32767);
   v_clob       CLOB;
   v_cnt        NUMBER;
   v_output     VARCHAR2 (32767);
   v_output_len NUMBER;

   PROCEDURE write_to_clob AS
   BEGIN
     if v_output is not null then
       BEGIN
         DBMS_LOB.writeappend (v_clob, v_output_len, v_output);
       EXCEPTION
         WHEN VALUE_ERROR THEN
           NULL;
       END;
     end if;
     v_output := NULL;
     v_output_len := 0;
   END;

BEGIN
  v_cnt := :inOutCnt;
  SYS.DBMS_OUTPUT.get_lines (v_lines, v_cnt);
  :inOutCnt := v_cnt;
  IF v_lines.COUNT > 0 THEN
    DBMS_LOB.createtemporary (v_clob, FALSE, DBMS_LOB.session);
    DBMS_LOB.open (v_clob, DBMS_LOB.lob_readwrite);
    v_output := NULL;
    FOR line IN 1 .. v_lines.COUNT
    LOOP
       IF :trim_line = 1 THEN
          v_line := TRIM (v_lines (line));
       ELSE
        v_line := v_lines (line);
       END IF;
       IF v_line IS NOT NULL THEN
          v_line := REPLACE (v_line, CHR (0));
          v_output_len := LENGTH(v_output);
          IF v_output_len + LENGTH (v_line) > 32767 THEN
             write_to_clob;
          END IF;
          v_output := v_output || v_line;
          v_output_len := LENGTH(v_output);
          IF line < v_lines.COUNT THEN
            IF v_output_len + 2 > 32767 THEN
              write_to_clob;
            END IF;
            v_output := v_output || CHR (13) || CHR (10);
            v_output_len := LENGTH(v_output);
         END IF;
       END IF;
    END LOOP;
    IF v_output_len > 0 THEN
      write_to_clob;
    END IF;
    :outLines := v_clob;
    DBMS_LOB.freetemporary (v_clob);
  ELSE
    :outLines := null;
  END IF;
END;
:trim_line(INTEGER,IN)=1 
:inOutCnt(INTEGER,IN/OUT)=1000 
:outLines(CLOB,OUT)=<LOB:402932>

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:31:31.650
DECLARE
   v_lines      SYS.DBMS_OUTPUT.chararr;
   v_line       VARCHAR2 (32767);
   v_clob       CLOB;
   v_cnt        NUMBER;
   v_output     VARCHAR2 (32767);
   v_output_len NUMBER;

   PROCEDURE write_to_clob AS
   BEGIN
     if v_output is not null then
       BEGIN
         DBMS_LOB.writeappend (v_clob, v_output_len, v_output);
       EXCEPTION
         WHEN VALUE_ERROR THEN
           NULL;
       END;
     end if;
     v_output := NULL;
     v_output_len := 0;
   END;

BEGIN
  v_cnt := :inOutCnt;
  SYS.DBMS_OUTPUT.get_lines (v_lines, v_cnt);
  :inOutCnt := v_cnt;
  IF v_lines.COUNT > 0 THEN
    DBMS_LOB.createtemporary (v_clob, FALSE, DBMS_LOB.session);
    DBMS_LOB.open (v_clob, DBMS_LOB.lob_readwrite);
    v_output := NULL;
    FOR line IN 1 .. v_lines.COUNT
    LOOP
       IF :trim_line = 1 THEN
          v_line := TRIM (v_lines (line));
       ELSE
        v_line := v_lines (line);
       END IF;
       IF v_line IS NOT NULL THEN
          v_line := REPLACE (v_line, CHR (0));
          v_output_len := LENGTH(v_output);
          IF v_output_len + LENGTH (v_line) > 32767 THEN
             write_to_clob;
          END IF;
          v_output := v_output || v_line;
          v_output_len := LENGTH(v_output);
          IF line < v_lines.COUNT THEN
            IF v_output_len + 2 > 32767 THEN
              write_to_clob;
            END IF;
            v_output := v_output || CHR (13) || CHR (10);
            v_output_len := LENGTH(v_output);
         END IF;
       END IF;
    END LOOP;
    IF v_output_len > 0 THEN
      write_to_clob;
    END IF;
    :outLines := v_clob;
    DBMS_LOB.freetemporary (v_clob);
  ELSE
    :outLines := null;
  END IF;
END;
:trim_line(INTEGER,IN)=1 
:inOutCnt(INTEGER,IN/OUT)=1000 
:outLines(CLOB,OUT)=<LOB:412058>

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:31:32.096
DECLARE
   v_lines      SYS.DBMS_OUTPUT.chararr;
   v_line       VARCHAR2 (32767);
   v_clob       CLOB;
   v_cnt        NUMBER;
   v_output     VARCHAR2 (32767);
   v_output_len NUMBER;

   PROCEDURE write_to_clob AS
   BEGIN
     if v_output is not null then
       BEGIN
         DBMS_LOB.writeappend (v_clob, v_output_len, v_output);
       EXCEPTION
         WHEN VALUE_ERROR THEN
           NULL;
       END;
     end if;
     v_output := NULL;
     v_output_len := 0;
   END;

BEGIN
  v_cnt := :inOutCnt;
  SYS.DBMS_OUTPUT.get_lines (v_lines, v_cnt);
  :inOutCnt := v_cnt;
  IF v_lines.COUNT > 0 THEN
    DBMS_LOB.createtemporary (v_clob, FALSE, DBMS_LOB.session);
    DBMS_LOB.open (v_clob, DBMS_LOB.lob_readwrite);
    v_output := NULL;
    FOR line IN 1 .. v_lines.COUNT
    LOOP
       IF :trim_line = 1 THEN
          v_line := TRIM (v_lines (line));
       ELSE
        v_line := v_lines (line);
       END IF;
       IF v_line IS NOT NULL THEN
          v_line := REPLACE (v_line, CHR (0));
          v_output_len := LENGTH(v_output);
          IF v_output_len + LENGTH (v_line) > 32767 THEN
             write_to_clob;
          END IF;
          v_output := v_output || v_line;
          v_output_len := LENGTH(v_output);
          IF line < v_lines.COUNT THEN
            IF v_output_len + 2 > 32767 THEN
              write_to_clob;
            END IF;
            v_output := v_output || CHR (13) || CHR (10);
            v_output_len := LENGTH(v_output);
         END IF;
       END IF;
    END LOOP;
    IF v_output_len > 0 THEN
      write_to_clob;
    END IF;
    :outLines := v_clob;
    DBMS_LOB.freetemporary (v_clob);
  ELSE
    :outLines := null;
  END IF;
END;
:trim_line(INTEGER,IN)=1 
:inOutCnt(INTEGER,IN/OUT)=1000 
:outLines(CLOB,OUT)=<LOB:429146>

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:31:32.587
DECLARE
   v_lines      SYS.DBMS_OUTPUT.chararr;
   v_line       VARCHAR2 (32767);
   v_clob       CLOB;
   v_cnt        NUMBER;
   v_output     VARCHAR2 (32767);
   v_output_len NUMBER;

   PROCEDURE write_to_clob AS
   BEGIN
     if v_output is not null then
       BEGIN
         DBMS_LOB.writeappend (v_clob, v_output_len, v_output);
       EXCEPTION
         WHEN VALUE_ERROR THEN
           NULL;
       END;
     end if;
     v_output := NULL;
     v_output_len := 0;
   END;

BEGIN
  v_cnt := :inOutCnt;
  SYS.DBMS_OUTPUT.get_lines (v_lines, v_cnt);
  :inOutCnt := v_cnt;
  IF v_lines.COUNT > 0 THEN
    DBMS_LOB.createtemporary (v_clob, FALSE, DBMS_LOB.session);
    DBMS_LOB.open (v_clob, DBMS_LOB.lob_readwrite);
    v_output := NULL;
    FOR line IN 1 .. v_lines.COUNT
    LOOP
       IF :trim_line = 1 THEN
          v_line := TRIM (v_lines (line));
       ELSE
        v_line := v_lines (line);
       END IF;
       IF v_line IS NOT NULL THEN
          v_line := REPLACE (v_line, CHR (0));
          v_output_len := LENGTH(v_output);
          IF v_output_len + LENGTH (v_line) > 32767 THEN
             write_to_clob;
          END IF;
          v_output := v_output || v_line;
          v_output_len := LENGTH(v_output);
          IF line < v_lines.COUNT THEN
            IF v_output_len + 2 > 32767 THEN
              write_to_clob;
            END IF;
            v_output := v_output || CHR (13) || CHR (10);
            v_output_len := LENGTH(v_output);
         END IF;
       END IF;
    END LOOP;
    IF v_output_len > 0 THEN
      write_to_clob;
    END IF;
    :outLines := v_clob;
    DBMS_LOB.freetemporary (v_clob);
  ELSE
    :outLines := null;
  END IF;
END;
:trim_line(INTEGER,IN)=1 
:inOutCnt(INTEGER,IN/OUT)=1000 
:outLines(CLOB,OUT)=<LOB:446868>

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:31:33.055
DECLARE
   v_lines      SYS.DBMS_OUTPUT.chararr;
   v_line       VARCHAR2 (32767);
   v_clob       CLOB;
   v_cnt        NUMBER;
   v_output     VARCHAR2 (32767);
   v_output_len NUMBER;

   PROCEDURE write_to_clob AS
   BEGIN
     if v_output is not null then
       BEGIN
         DBMS_LOB.writeappend (v_clob, v_output_len, v_output);
       EXCEPTION
         WHEN VALUE_ERROR THEN
           NULL;
       END;
     end if;
     v_output := NULL;
     v_output_len := 0;
   END;

BEGIN
  v_cnt := :inOutCnt;
  SYS.DBMS_OUTPUT.get_lines (v_lines, v_cnt);
  :inOutCnt := v_cnt;
  IF v_lines.COUNT > 0 THEN
    DBMS_LOB.createtemporary (v_clob, FALSE, DBMS_LOB.session);
    DBMS_LOB.open (v_clob, DBMS_LOB.lob_readwrite);
    v_output := NULL;
    FOR line IN 1 .. v_lines.COUNT
    LOOP
       IF :trim_line = 1 THEN
          v_line := TRIM (v_lines (line));
       ELSE
        v_line := v_lines (line);
       END IF;
       IF v_line IS NOT NULL THEN
          v_line := REPLACE (v_line, CHR (0));
          v_output_len := LENGTH(v_output);
          IF v_output_len + LENGTH (v_line) > 32767 THEN
             write_to_clob;
          END IF;
          v_output := v_output || v_line;
          v_output_len := LENGTH(v_output);
          IF line < v_lines.COUNT THEN
            IF v_output_len + 2 > 32767 THEN
              write_to_clob;
            END IF;
            v_output := v_output || CHR (13) || CHR (10);
            v_output_len := LENGTH(v_output);
         END IF;
       END IF;
    END LOOP;
    IF v_output_len > 0 THEN
      write_to_clob;
    END IF;
    :outLines := v_clob;
    DBMS_LOB.freetemporary (v_clob);
  ELSE
    :outLines := null;
  END IF;
END;
:trim_line(INTEGER,IN)=1 
:inOutCnt(INTEGER,IN/OUT)=1000 
:outLines(CLOB,OUT)=<LOB:438542>

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:31:33.546
DECLARE
   v_lines      SYS.DBMS_OUTPUT.chararr;
   v_line       VARCHAR2 (32767);
   v_clob       CLOB;
   v_cnt        NUMBER;
   v_output     VARCHAR2 (32767);
   v_output_len NUMBER;

   PROCEDURE write_to_clob AS
   BEGIN
     if v_output is not null then
       BEGIN
         DBMS_LOB.writeappend (v_clob, v_output_len, v_output);
       EXCEPTION
         WHEN VALUE_ERROR THEN
           NULL;
       END;
     end if;
     v_output := NULL;
     v_output_len := 0;
   END;

BEGIN
  v_cnt := :inOutCnt;
  SYS.DBMS_OUTPUT.get_lines (v_lines, v_cnt);
  :inOutCnt := v_cnt;
  IF v_lines.COUNT > 0 THEN
    DBMS_LOB.createtemporary (v_clob, FALSE, DBMS_LOB.session);
    DBMS_LOB.open (v_clob, DBMS_LOB.lob_readwrite);
    v_output := NULL;
    FOR line IN 1 .. v_lines.COUNT
    LOOP
       IF :trim_line = 1 THEN
          v_line := TRIM (v_lines (line));
       ELSE
        v_line := v_lines (line);
       END IF;
       IF v_line IS NOT NULL THEN
          v_line := REPLACE (v_line, CHR (0));
          v_output_len := LENGTH(v_output);
          IF v_output_len + LENGTH (v_line) > 32767 THEN
             write_to_clob;
          END IF;
          v_output := v_output || v_line;
          v_output_len := LENGTH(v_output);
          IF line < v_lines.COUNT THEN
            IF v_output_len + 2 > 32767 THEN
              write_to_clob;
            END IF;
            v_output := v_output || CHR (13) || CHR (10);
            v_output_len := LENGTH(v_output);
         END IF;
       END IF;
    END LOOP;
    IF v_output_len > 0 THEN
      write_to_clob;
    END IF;
    :outLines := v_clob;
    DBMS_LOB.freetemporary (v_clob);
  ELSE
    :outLines := null;
  END IF;
END;
:trim_line(INTEGER,IN)=1 
:inOutCnt(INTEGER,IN/OUT)=1000 
:outLines(CLOB,OUT)=<LOB:441582>

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:31:34.040
DECLARE
   v_lines      SYS.DBMS_OUTPUT.chararr;
   v_line       VARCHAR2 (32767);
   v_clob       CLOB;
   v_cnt        NUMBER;
   v_output     VARCHAR2 (32767);
   v_output_len NUMBER;

   PROCEDURE write_to_clob AS
   BEGIN
     if v_output is not null then
       BEGIN
         DBMS_LOB.writeappend (v_clob, v_output_len, v_output);
       EXCEPTION
         WHEN VALUE_ERROR THEN
           NULL;
       END;
     end if;
     v_output := NULL;
     v_output_len := 0;
   END;

BEGIN
  v_cnt := :inOutCnt;
  SYS.DBMS_OUTPUT.get_lines (v_lines, v_cnt);
  :inOutCnt := v_cnt;
  IF v_lines.COUNT > 0 THEN
    DBMS_LOB.createtemporary (v_clob, FALSE, DBMS_LOB.session);
    DBMS_LOB.open (v_clob, DBMS_LOB.lob_readwrite);
    v_output := NULL;
    FOR line IN 1 .. v_lines.COUNT
    LOOP
       IF :trim_line = 1 THEN
          v_line := TRIM (v_lines (line));
       ELSE
        v_line := v_lines (line);
       END IF;
       IF v_line IS NOT NULL THEN
          v_line := REPLACE (v_line, CHR (0));
          v_output_len := LENGTH(v_output);
          IF v_output_len + LENGTH (v_line) > 32767 THEN
             write_to_clob;
          END IF;
          v_output := v_output || v_line;
          v_output_len := LENGTH(v_output);
          IF line < v_lines.COUNT THEN
            IF v_output_len + 2 > 32767 THEN
              write_to_clob;
            END IF;
            v_output := v_output || CHR (13) || CHR (10);
            v_output_len := LENGTH(v_output);
         END IF;
       END IF;
    END LOOP;
    IF v_output_len > 0 THEN
      write_to_clob;
    END IF;
    :outLines := v_clob;
    DBMS_LOB.freetemporary (v_clob);
  ELSE
    :outLines := null;
  END IF;
END;
:trim_line(INTEGER,IN)=1 
:inOutCnt(INTEGER,IN/OUT)=1000 
:outLines(CLOB,OUT)=<LOB:432708>

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:31:34.380
DECLARE
   v_lines      SYS.DBMS_OUTPUT.chararr;
   v_line       VARCHAR2 (32767);
   v_clob       CLOB;
   v_cnt        NUMBER;
   v_output     VARCHAR2 (32767);
   v_output_len NUMBER;

   PROCEDURE write_to_clob AS
   BEGIN
     if v_output is not null then
       BEGIN
         DBMS_LOB.writeappend (v_clob, v_output_len, v_output);
       EXCEPTION
         WHEN VALUE_ERROR THEN
           NULL;
       END;
     end if;
     v_output := NULL;
     v_output_len := 0;
   END;

BEGIN
  v_cnt := :inOutCnt;
  SYS.DBMS_OUTPUT.get_lines (v_lines, v_cnt);
  :inOutCnt := v_cnt;
  IF v_lines.COUNT > 0 THEN
    DBMS_LOB.createtemporary (v_clob, FALSE, DBMS_LOB.session);
    DBMS_LOB.open (v_clob, DBMS_LOB.lob_readwrite);
    v_output := NULL;
    FOR line IN 1 .. v_lines.COUNT
    LOOP
       IF :trim_line = 1 THEN
          v_line := TRIM (v_lines (line));
       ELSE
        v_line := v_lines (line);
       END IF;
       IF v_line IS NOT NULL THEN
          v_line := REPLACE (v_line, CHR (0));
          v_output_len := LENGTH(v_output);
          IF v_output_len + LENGTH (v_line) > 32767 THEN
             write_to_clob;
          END IF;
          v_output := v_output || v_line;
          v_output_len := LENGTH(v_output);
          IF line < v_lines.COUNT THEN
            IF v_output_len + 2 > 32767 THEN
              write_to_clob;
            END IF;
            v_output := v_output || CHR (13) || CHR (10);
            v_output_len := LENGTH(v_output);
         END IF;
       END IF;
    END LOOP;
    IF v_output_len > 0 THEN
      write_to_clob;
    END IF;
    :outLines := v_clob;
    DBMS_LOB.freetemporary (v_clob);
  ELSE
    :outLines := null;
  END IF;
END;
:trim_line(INTEGER,IN)=1 
:inOutCnt(INTEGER,IN/OUT)=1000 
:outLines(CLOB,OUT)=<LOB:445818>

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:31:34.660
DECLARE
   v_lines      SYS.DBMS_OUTPUT.chararr;
   v_line       VARCHAR2 (32767);
   v_clob       CLOB;
   v_cnt        NUMBER;
   v_output     VARCHAR2 (32767);
   v_output_len NUMBER;

   PROCEDURE write_to_clob AS
   BEGIN
     if v_output is not null then
       BEGIN
         DBMS_LOB.writeappend (v_clob, v_output_len, v_output);
       EXCEPTION
         WHEN VALUE_ERROR THEN
           NULL;
       END;
     end if;
     v_output := NULL;
     v_output_len := 0;
   END;

BEGIN
  v_cnt := :inOutCnt;
  SYS.DBMS_OUTPUT.get_lines (v_lines, v_cnt);
  :inOutCnt := v_cnt;
  IF v_lines.COUNT > 0 THEN
    DBMS_LOB.createtemporary (v_clob, FALSE, DBMS_LOB.session);
    DBMS_LOB.open (v_clob, DBMS_LOB.lob_readwrite);
    v_output := NULL;
    FOR line IN 1 .. v_lines.COUNT
    LOOP
       IF :trim_line = 1 THEN
          v_line := TRIM (v_lines (line));
       ELSE
        v_line := v_lines (line);
       END IF;
       IF v_line IS NOT NULL THEN
          v_line := REPLACE (v_line, CHR (0));
          v_output_len := LENGTH(v_output);
          IF v_output_len + LENGTH (v_line) > 32767 THEN
             write_to_clob;
          END IF;
          v_output := v_output || v_line;
          v_output_len := LENGTH(v_output);
          IF line < v_lines.COUNT THEN
            IF v_output_len + 2 > 32767 THEN
              write_to_clob;
            END IF;
            v_output := v_output || CHR (13) || CHR (10);
            v_output_len := LENGTH(v_output);
         END IF;
       END IF;
    END LOOP;
    IF v_output_len > 0 THEN
      write_to_clob;
    END IF;
    :outLines := v_clob;
    DBMS_LOB.freetemporary (v_clob);
  ELSE
    :outLines := null;
  END IF;
END;
:trim_line(INTEGER,IN)=1 
:inOutCnt(INTEGER,IN/OUT)=1000 
:outLines(CLOB,OUT)=<LOB:439394>

----------------------------------
-- Session: SCH2010@LRSED.SCH.LOCAL
-- Timestamp: 15:31:35.072
DECLARE
   v_lines      SYS.DBMS_OUTPUT.chararr;
   v_line       VARCHAR2 (32767);
   v_clob       CLOB;
   v_cnt        NUMBER;
   v_output     VARCHAR2 (32767);
   v_output_len NUMBER;

   PROCEDURE write_to_clob AS
   BEGIN
     if v_output is not null then
       BEGIN
         DBMS_LOB.writeappend (v_clob, v_output_len, v_output);
       EXCEPTION
         WHEN VALUE_ERROR THEN
           NULL;
       END;
     end if;
     v_output := NULL;
     v_output_len := 0;
   END;

BEGIN
  v_cnt := :inOutCnt;
  SYS.DBMS_OUTPUT.get_lines (v_lines, v_cnt);
  :inOutCnt := v_cnt;
  IF v_lines.COUNT > 0 THEN
    DBMS_LOB.createtemporary (v_clob, FALSE, DBMS_LOB.session);
    DBMS_LOB.open (v_clob, DBMS_LOB.lob_readwrite);
    v_output := NULL;
    FOR line IN 1 .. v_lines.COUNT
    LOOP
       IF :trim_line = 1 THEN
          v_line := TRIM (v_lines (line));
       ELSE
        v_line := v_lines (line);
       END IF;
       IF v_line IS NOT NULL THEN
          v_line := REPLACE (v_line, CHR (0));
          v_output_len := LENGTH(v_output);
          IF v_output_len + LENGTH (v_line) > 32767 THEN
             write_to_clob;
          END IF;
          v_output := v_output || v_line;
          v_output_len := LENGTH(v_output);
          IF line < v_lines.COUNT THEN
            IF v_output_len + 2 > 32767 THEN
              write_to_clob;
            END IF;
            v_output := v_output || CHR (13) || CHR (10);
            v_output_len := LENGTH(v_output);
         END IF;
       END IF;
    END LOOP;
    IF v_output_len > 0 THEN
      write_to_clob;
    END IF;
    :outLines := v_clob;
    DBMS_LOB.freetemporary (v_clob);
  ELSE
    :outLines := null;
  END IF;
END;
-- ORA-06502: PL/SQL: numerischer oder Wertefehler: Zeichenfolgenpuffer zu klein
ORA-06512: in Zeile 44
:trim_line(INTEGER,IN)=1 
:inOutCnt(INTEGER,IN/OUT)=1000 
:outLines(CLOB,OUT)=<NULL>
