SQLAnywhere: Failure on creation of procedure
The problem is you are mixing the CREATE FUNCTION syntax with that for CREATE PROCEDURE

This should work:

CREATE OR REPLACE PROCEDURE __generate_new_VSN(@oldVSN varchar(100), OUT @newVSN  varchar(100)) 
BEGIN
      RETURN '1'
END


the full syntax is here