I discussed with my co-work before for similar question, and the conclusion is that there is no way to do this in a single standard sql query(no external UDF or stored proc). And should be fair easy and efficient by using an application. (for example StringBuffer class in java).
Anyway, with the latest XML functions, it is doable with XMLAGG and XMLQUERY functions, such as(run on db2/zos):
CREATE TABLE TT
(COL1 VARCHAR(10));
INSERT INTO TT VALUES('welcome');
INSERT INTO TT VALUES('udb');
INSERT INTO TT VALUES('db2base');
SELECT
XMLSERIALIZE(
XMLQUERY('/fn:data(COL1)' PASSING
XMLDOCUMENT(
XMLAGG(XMLELEMENT(NAME "COL1", COL1))) )
AS CLOB(50) EXCLUDING XMLDECLARATION)
FROM TT;
+----------------------------------------------------+
| |
+----------------------------------------------------+
1_| welcome udb db2base |
+----------------------------------------------------+
DB2/LUW should support similar functions, but you need V9.
Anyway, I won't suggest you use above method(which suffer too much overhead when deal with xml).
Hope someone else has smarter ideas.