The following CREATE METHOD statement installs the cast method in the database:
CREATE METHOD VarcharCast() RETURNS VARCHAR(80) FOR circle_t EXTERNAL NAME 'CS!c_cast!udmsrc/c_cast.c!F!circle_t_Cast';
The following statement registers the VarcharCast UDM as a cast routine for the circle_t UDT:
CREATE CAST (circle_t AS VARCHAR(80)) WITH SPECIFIC METHOD circle_t_Cast AS ASSIGNMENT;