   READS SQL DATA
   SECURED
  F_GET_NAME: BEGIN
-  DECLARE COMPLETE_NAME VARCHAR(256);
+  DECLARE COMPLETE_NAME ANCHOR COMPLETE_LOGGER_NAME;
   DECLARE PARENT ANCHOR LOGDATA.CONF_LOGGERS.LOGGER_ID;
   DECLARE NAME ANCHOR LOGDATA.CONF_LOGGERS.NAME;
-  DECLARE RETURNED VARCHAR(256);
+  DECLARE RETURNED ANCHOR COMPLETE_LOGGER_NAME;
   
   -- The logger is ROOT.
   IF (LOG_ID = 0) THEN

  CALL LOG (LOGGER_ID, 1, MESSAGE);
 END P_FATAL @

CREATE OR REPLACE VIEW LOGDATA.LOG_MESSAGES 
  (DATE, LEVEL, LOGGER, MESSAGE) AS
  SELECT L.DATE, LE.NAME, LOGGER.GET_LOGGER_NAME(L.LOGGER_ID), L.MESSAGE

ALTER MODULE LOGGER ADD
 FUNCTION GET_LOGGER_NAME (
  IN LOG_ID ANCHOR LOGDATA.CONF_LOGGERS.LOGGER_ID
  ) RETURNS ANCHOR COMPLETE_LOGGER_NAME
  LANGUAGE SQL
  PARAMETER CCSID UNICODE
  SPECIFIC F_GET_NAME
