I have some problem using transform groups, I'm working with DB2 V8.1.0.36.
I have following code

CREATE TYPE AddressType AS (
street Varchar(50),
city Varchar(30),
zip Integer,
country Varchar(10)
)NOT FINAL
MODE DB2SQL;


CREATE TABLE person_tab (
name Varchar(15),
addr AddressType
);

I want to be able to execute the query:

SELECT * FROM person_tab

Therefore it seems I have to define a transform, calling a method or function. I wrote 2 working methods:

CREATE METHOD giveAll() FOR AddressType RETURNS Varchar() RETURN SELF..street || ', ' ||CAST(SELF..zip AS CHAR(5)) ||' '||SELF..city

CREATE METHOD fill(Str Varchar(50), cit Varchar(30), zip Integer, cou Varchar(10)) FOR AddressType
RETURNS AddressType()
RETURN AddressType()..street(Str)..city(cit)..zip(zip)..c ountry(cou)


and thought following would work:

CREATE TRANSFORM FOR AddressType
myGroup (FROM SQL WITH METHOD giveAll() FOR AddressType
TO SQL WITH METHOD fill( Varchar(), Varchar(), Integer, Varchar()) FOR AddressType)


But I got following error

SQL0104N An unexpected token "METHOD" was found following "Group
(FROM SQL WITH". Expected tokens may include: "FUNCTION ".
sqlcode : -104
sqlstate : 42601

Trivial question: What is wrong?