     BEGIN END;
 
   SET EXPECTED = 'TRUE';
-  SET CASCADE = VAL_57B;
+  SET CASCADE = VAL_A_55_56;
+  CALL LOGGING(1, 1, CASCADE);
+  SELECT 'TRUE' INTO ACTUAL
+    FROM LOGS
+    WHERE MESSAGE = 'LG001. Cascade call limit achieved, for LOG: Cascade call '
+    || 'for "LOGGING" enters with ' || CASCADE
+    AND DATE = (SELECT MAX(DATE) FROM LOGDATA.LOGS);
+
+  CALL DB2UNIT.ASSERT_STRING_EQUALS('Test05: Limit logging to ROOT 60',
+    EXPECTED, ACTUAL);
+ END @
+
+-- Test06: Limit logging to ROOT 56 - 57.
+CREATE OR REPLACE PROCEDURE TEST_06A()
+ BEGIN
+  DECLARE EXPECTED ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
+  DECLARE CASCADE SMALLINT; -- Cascade calls.
+  DECLARE ACTUAL ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
+  DECLARE CONTINUE HANDLER FOR SQLSTATE 'LG001'
+    BEGIN END;
+
+  SET EXPECTED = 'TRUE';
+  SET CASCADE = VAL_A_55_56;
+  CALL LOGGING(1, 1, CASCADE);
+  SELECT 'TRUE' INTO ACTUAL
+    FROM LOGS
+    WHERE MESSAGE = 'LG001. Cascade call limit achieved, for LOG: Cascade call '
+    || 'for "LOGGING" enters with ' || CASCADE
+    AND DATE = (SELECT MAX(DATE) FROM LOGDATA.LOGS);
+
+  CALL DB2UNIT.ASSERT_STRING_EQUALS('Test06: Limit logging to ROOT 61',
+    EXPECTED, ACTUAL);
+ END @
+
+-- Test07: Limit achieved logging to ROOT with warn.
+CREATE OR REPLACE PROCEDURE TEST_08B()
+ BEGIN
+  DECLARE EXPECTED ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
+  DECLARE CASCADE SMALLINT; -- Cascade calls.
+  DECLARE ACTUAL ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
+  DECLARE RAISED_LG001 BOOLEAN DEFAULT FALSE; -- Just one ROOT.
+  DECLARE CONTINUE HANDLER FOR SQLSTATE 'LG001'
+    SET RAISED_LG001 = TRUE;
+
+  SET CASCADE = VAL_B_55_57;
   CALL LOGGING(1, 3, CASCADE);
-  SELECT 'TRUE' INTO ACTUAL
-    FROM LOGS
-    WHERE MESSAGE = 'LG001. Cascade call limit achieved, for WARN: (0) Cascade '
-    || 'call for "LOGGING" enters with ' || CASCADE
-    AND DATE = (SELECT MAX(DATE) FROM LOGDATA.LOGS);
-
-  CALL DB2UNIT.ASSERT_STRING_EQUALS('Test09: Limit logging to ROOT with warn',
-    EXPECTED, ACTUAL);
- END @
-
--- Test10: Limit achieved logging to ROOT with warn.
-CREATE OR REPLACE PROCEDURE TEST_10()
- BEGIN
-  DECLARE EXPECTED ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
-  DECLARE CASCADE SMALLINT; -- Cascade calls.
-  DECLARE ACTUAL ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
-  DECLARE RAISED_LG001 BOOLEAN DEFAULT FALSE; -- Just one ROOT.
-  DECLARE CONTINUE HANDLER FOR SQLSTATE 'LG001'
-    SET RAISED_LG001 = TRUE;
-
-  SET CASCADE = VAL_56_58;
-  CALL LOGGING(1, 3, CASCADE);
-
-  CALL DB2UNIT.ASSERT_BOOLEAN_TRUE('Test10: Limit achieved to ROOT with warn',
+
+  CALL DB2UNIT.ASSERT_BOOLEAN_TRUE('Test07: Limit achieved to ROOT with warn',
     RAISED_LG001);
 
   SET RAISED_LG001 = FALSE;

    || 'Cascade call for "LOGGING" en%'
    AND DATE = (SELECT MAX(DATE) FROM LOGDATA.LOGS);

  CALL DB2UNIT.ASSERT_STRING_EQUALS('Test11: Limit passed to ROOT with warn',
    EXPECTED, ACTUAL);
  DELETE FROM LOGS
    WHERE MESSAGE LIKE 'LG001. Cascade call limit achieve, for %';
 END @

-- Test12: Cascade call limit with warn.
CREATE OR REPLACE PROCEDURE TEST_12()
 BEGIN
  DECLARE CASCADE SMALLINT; -- Cascade calls.
  DECLARE RAISED_724 BOOLEAN DEFAULT FALSE; -- Null value.
  DECLARE CONTINUE HANDLER FOR SQLSTATE '54038'
    SET RAISED_724 = TRUE;

  SET CASCADE = MIN_59;
  CALL LOGGING(1, 3, CASCADE);

  CALL DB2UNIT.ASSERT_BOOLEAN_TRUE('Test12: Cascade call limit with warn',
    RAISED_724);
 END @

-- Test13: Limit logging to ROOT with info.
CREATE OR REPLACE PROCEDURE TEST_13()
 BEGIN
  DECLARE EXPECTED ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE CASCADE SMALLINT; -- Cascade calls.
  DECLARE ACTUAL ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE CONTINUE HANDLER FOR SQLSTATE 'LG001'
    BEGIN END;

  SET EXPECTED = 'TRUE';
  SET CASCADE = VAL_57B;
  CALL LOGGING(1, 4, CASCADE);
  SELECT 'TRUE' INTO ACTUAL
    FROM LOGS
    WHERE MESSAGE = 'LG001. Cascade call limit achieved, for INFO: (0) Cascade '
    || 'call for "LOGGING" enters with ' || CASCADE
    AND DATE = (SELECT MAX(DATE) FROM LOGDATA.LOGS);

  CALL DB2UNIT.ASSERT_STRING_EQUALS('Test13: Limit logging to ROOT with info',
    EXPECTED, ACTUAL);
 END @

-- Test14: Limit achieved logging to ROOT with info.
CREATE OR REPLACE PROCEDURE TEST_14()
 BEGIN
  DECLARE EXPECTED ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE CASCADE SMALLINT; -- Cascade calls.
  DECLARE ACTUAL ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE RAISED_LG001 BOOLEAN DEFAULT FALSE; -- Just one ROOT.
  DECLARE CONTINUE HANDLER FOR SQLSTATE 'LG001'
    SET RAISED_LG001 = TRUE;

  SET EXPECTED = 'TRUE';
  SET CASCADE = VAL_56_57;
  CALL LOGGING(1, 4, CASCADE);

  CALL DB2UNIT.ASSERT_BOOLEAN_TRUE('Test14: Limit achieved to ROOT with info',
    RAISED_LG001);

  SELECT 'TRUE' INTO ACTUAL
    FROM LOGS
    WHERE MESSAGE LIKE 'LG001. Cascade call limit achieved, for LOG: Cascade '
    || 'call for "LOGGING" enters w%'
    AND DATE = (SELECT MAX(DATE) FROM LOGDATA.LOGS);

  CALL DB2UNIT.ASSERT_STRING_EQUALS('Test14: Limit achieved to ROOT with info',
    EXPECTED, ACTUAL);
 END @

-- Test15: Limit passed logging to ROOT with info.
CREATE OR REPLACE PROCEDURE TEST_15()
 BEGIN
  DECLARE EXPECTED ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE CASCADE SMALLINT; -- Cascade calls.
  DECLARE ACTUAL ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE RAISED_LG001 BOOLEAN DEFAULT FALSE; -- Just one ROOT.
  DECLARE CONTINUE HANDLER FOR SQLSTATE 'LG001'
    SET RAISED_LG001 = TRUE;

  SET EXPECTED = 'TRUE';
  SET CASCADE = VAL_57A;
  CALL LOGGING(1, 4, CASCADE);

  CALL DB2UNIT.ASSERT_BOOLEAN_TRUE('Test15: Limit passed to ROOT with info',
    RAISED_LG001);

  SELECT 'TRUE' INTO ACTUAL
    FROM LOGS
    WHERE MESSAGE LIKE 'LG001. Cascade call limit achieved, for INFO: (0) '
    || 'Cascade call for "LOGGING" en%'
    AND DATE = (SELECT MAX(DATE) FROM LOGDATA.LOGS);

  CALL DB2UNIT.ASSERT_STRING_EQUALS('Test15: Limit passed to ROOT with info',
    EXPECTED, ACTUAL);
  DELETE FROM LOGS
    WHERE MESSAGE LIKE 'LG001. Cascade call limit achieve, for %';
 END @

-- Test16: Cascade call limit with info.
CREATE OR REPLACE PROCEDURE TEST_16()
 BEGIN
  DECLARE CASCADE SMALLINT; -- Cascade calls.
  DECLARE RAISED_724 BOOLEAN DEFAULT FALSE; -- Null value.
  DECLARE CONTINUE HANDLER FOR SQLSTATE '54038'
    SET RAISED_724 = TRUE;

  SET CASCADE = MIN_59;
  CALL LOGGING(1, 4, CASCADE);

  CALL DB2UNIT.ASSERT_BOOLEAN_TRUE('Test16: Cascade call limit with info',
    RAISED_724);
 END @

-- Test17: Limit logging to ROOT with debug.
CREATE OR REPLACE PROCEDURE TEST_17()
 BEGIN
  DECLARE EXPECTED ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE CASCADE SMALLINT; -- Cascade calls.
  DECLARE ACTUAL ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE CONTINUE HANDLER FOR SQLSTATE 'LG001'
    BEGIN END;

  SET EXPECTED = 'TRUE';
  SET CASCADE = VAL_57B;
  CALL LOGGING(1, 5, CASCADE);
  SELECT 'TRUE' INTO ACTUAL
    FROM LOGS
    WHERE MESSAGE = 'LG001. Cascade call limit achieved, for DEBUG: (0) '
    || 'Cascade call for "LOGGING" enters with ' || CASCADE
    AND DATE = (SELECT MAX(DATE) FROM LOGDATA.LOGS);

  CALL DB2UNIT.ASSERT_STRING_EQUALS('Test17: Limit logging to ROOT with debug',
    EXPECTED, ACTUAL);
 END @

-- Test18: Limit achieved logging to ROOT with debug.
CREATE OR REPLACE PROCEDURE TEST_18()
 BEGIN
  DECLARE EXPECTED ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE CASCADE SMALLINT; -- Cascade calls.
  DECLARE ACTUAL ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE RAISED_LG001 BOOLEAN DEFAULT FALSE; -- Just one ROOT.
  DECLARE CONTINUE HANDLER FOR SQLSTATE 'LG001'
    SET RAISED_LG001 = TRUE;

  SET EXPECTED = 'TRUE';
  SET CASCADE = VAL_56_57;
  CALL LOGGING(1, 5, CASCADE);

  CALL DB2UNIT.ASSERT_BOOLEAN_TRUE('Test18: Limit achieved to ROOT with debug',
    RAISED_LG001);

  SELECT 'TRUE' INTO ACTUAL
    FROM LOGS
    WHERE MESSAGE LIKE 'LG001. Cascade call limit achieved, for LOG: Cascade '
    || 'call for "LOGGING" enters w%'
    AND DATE = (SELECT MAX(DATE) FROM LOGDATA.LOGS);

  CALL DB2UNIT.ASSERT_STRING_EQUALS('Test18: Limit achieved to ROOT with debug',
    EXPECTED, ACTUAL);
 END @

-- Test19: Limit passed logging to ROOT with debug.
CREATE OR REPLACE PROCEDURE TEST_19()
 BEGIN
  DECLARE EXPECTED ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE CASCADE SMALLINT; -- Cascade calls.
  DECLARE ACTUAL ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE RAISED_LG001 BOOLEAN DEFAULT FALSE; -- Just one ROOT.
  DECLARE CONTINUE HANDLER FOR SQLSTATE 'LG001'
    SET RAISED_LG001 = TRUE;

  SET EXPECTED = 'TRUE';
  SET CASCADE = VAL_57A;
  CALL LOGGING(1, 5, CASCADE);

  CALL DB2UNIT.ASSERT_BOOLEAN_TRUE('Test19: Limit passed to ROOT with debug',
    RAISED_LG001);

  SELECT 'TRUE' INTO ACTUAL
    FROM LOGS
    WHERE MESSAGE LIKE 'LG001. Cascade call limit achieved, for DEBUG: (0) '
    || 'Cascade call for "LOGGING" en%'
    AND DATE = (SELECT MAX(DATE) FROM LOGDATA.LOGS);

  CALL DB2UNIT.ASSERT_STRING_EQUALS('Test19: Limit passed to ROOT with debug',
    EXPECTED, ACTUAL);
  DELETE FROM LOGS
    WHERE MESSAGE LIKE 'LG001. Cascade call limit achieve, for %';
 END @

-- Test20: Cascade call limit with debug.
CREATE OR REPLACE PROCEDURE TEST_20()
 BEGIN
  DECLARE CASCADE SMALLINT; -- Cascade calls.
  DECLARE RAISED_724 BOOLEAN DEFAULT FALSE; -- Null value.
  DECLARE CONTINUE HANDLER FOR SQLSTATE '54038'
    SET RAISED_724 = TRUE;

  SET CASCADE = MIN_59;
  CALL LOGGING(1, 5, CASCADE);

  CALL DB2UNIT.ASSERT_BOOLEAN_TRUE('Test20: Cascade call limit with debug',
    RAISED_724);
 END @

-- Test21: Limit passed logging to ROOT with default.
CREATE OR REPLACE PROCEDURE TEST_22()
 BEGIN
  DECLARE EXPECTED ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE CASCADE SMALLINT; -- Cascade calls.
  DECLARE ACTUAL ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE RAISED_LG001 BOOLEAN DEFAULT FALSE; -- Just one ROOT.
  DECLARE CONTINUE HANDLER FOR SQLSTATE 'LG001'
    SET RAISED_LG001 = TRUE;

  SET EXPECTED = 'TRUE';
  SET CASCADE = VAL_57_58;
  CALL LOGGING(1, -1, CASCADE);

  CALL DB2UNIT.ASSERT_BOOLEAN_TRUE('Test21: Limit passed to ROOT with default',
    RAISED_LG001);

  SELECT 'TRUE' INTO ACTUAL
    FROM LOGS
    WHERE MESSAGE LIKE 'LG001. Cascade call limit achieved, for LOG: Cascade '
    || 'call for "LOGGING" enters w%'
    AND DATE = (SELECT MAX(DATE) FROM LOGDATA.LOGS);

  CALL DB2UNIT.ASSERT_STRING_EQUALS('Test21: Limit passed to ROOT with default',
    EXPECTED, ACTUAL);
  DELETE FROM LOGS
    WHERE MESSAGE LIKE 'LG001. Cascade call limit achieve, for %';
 END @

-- Test22: Cascade call limit with default.
CREATE OR REPLACE PROCEDURE TEST_23()
 BEGIN
  DECLARE CASCADE SMALLINT; -- Cascade calls.
  DECLARE RAISED_724 BOOLEAN DEFAULT FALSE; -- Null value.
  DECLARE CONTINUE HANDLER FOR SQLSTATE '54038'
    SET RAISED_724 = TRUE;

  SET CASCADE = MIN_59;
  CALL LOGGING(1, -1, CASCADE);

  CALL DB2UNIT.ASSERT_BOOLEAN_TRUE('Test22: Cascade call limit with default',
    RAISED_724);
 END @

-- Test23: Limit logging to ROOT  56 - 57.
CREATE OR REPLACE PROCEDURE TEST_24()
 BEGIN
  DECLARE EXPECTED ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE CASCADE SMALLINT; -- Cascade calls.
  DECLARE ACTUAL ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE CONTINUE HANDLER FOR SQLSTATE 'LG001'
    BEGIN END;

  SET EXPECTED = 'TRUE';
  SET CASCADE = VAL_56_57;
  CALL LOGGING(1, 1, CASCADE);
  SELECT 'TRUE' INTO ACTUAL
    FROM LOGS
    WHERE MESSAGE = 'LG001. Cascade call limit achieved, for LOG: Cascade call '
    || 'for "LOGGING" enters with ' || CASCADE
    AND DATE = (SELECT MAX(DATE) FROM LOGDATA.LOGS);

  CALL DB2UNIT.ASSERT_STRING_EQUALS('Test23: Limit logging to ROOT 60',
    EXPECTED, ACTUAL);
 END @

-- Test24: Limit logging to ROOT 56 - 57.
CREATE OR REPLACE PROCEDURE TEST_25()
 BEGIN
  DECLARE EXPECTED ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE CASCADE SMALLINT; -- Cascade calls.
  DECLARE ACTUAL ANCHOR DATA TYPE TO LOGDATA.LOGS.MESSAGE;
  DECLARE CONTINUE HANDLER FOR SQLSTATE 'LG001'
    BEGIN END;

  SET EXPECTED = 'TRUE';
  SET CASCADE = VAL_56_57;
  CALL LOGGING(1, 1, CASCADE);
  SELECT 'TRUE' INTO ACTUAL
    FROM LOGS
    WHERE MESSAGE = 'LG001. Cascade call limit achieved, for LOG: Cascade call '
    || 'for "LOGGING" enters with ' || CASCADE
    AND DATE = (SELECT MAX(DATE) FROM LOGDATA.LOGS);

  CALL DB2UNIT.ASSERT_STRING_EQUALS('Test24: Limit logging to ROOT 61',
    EXPECTED, ACTUAL);
 END @

-- Register the suite.

-- Test fixtures
CREATE OR REPLACE PROCEDURE ONE_TIME_SETUP()
 BEGIN
  CALL DB2UNIT.SET_AUTONOMOUS(FALSE);
  DELETE FROM LOGDATA.CONF_LOGGERS WHERE LOGGER_ID <> 0;
  UPDATE LOGDATA.CONF_LOGGERS
    SET LEVEL_ID = 3
    WHERE LOGGER_ID = 0;
 END @

CREATE OR REPLACE PROCEDURE SETUP()
 BEGIN
-- DELETE FROM LOGS;
  -- Empty
 END @

