SQLAnywhere: Failure on creation of procedure I wanted to create a procedure like this: 

CREATE OR REPLACE PROCEDURE __generate_new_VSN(@oldVSN varchar(100)) 
RETURNS VARCHAR(100)
AS
BEGIN
    RETURN '1'
END


but getting when running it via isql:

Anweisung konnte nicht ausgeführt werden.
Syntaxfehler bei 'RETURNS' in Zeile 2
SQLCODE=-131, ODBC 3-Status="42000"
Zeile 1, Spalte 1


which can be translated to something like 

Command couldn't be executed
Syntax error at 'RETURNS' on line 2
SQLCODE=-131, ODBC 3-Status="42000"
Zeile 1, Spalte 1


What did I wrong?
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