You use the CREATE FUNCTION statement to create user-defined functions. However, you must have RESOURCE authority.
See ”Creating user-defined functions” in SQL Anywhere Server - SQL Usage.
For a complete description of the CREATE FUNCTION syntax, including performance considerations and differences between SQL Anywhere and IQ, see Chapter 1, “SQL Statements,” in Reference: Statements and Options.