I am new to Sybase. I have would like to use Embedded SQL to call stored procedure which is already defined in Sybase database. However, all the examples i found from Sybase homepage is creating the stored procedure at runtime and hardcoded the code in the program.
e.g.
MOVE "create proc testproc as select * from publishers"
TO BUFFER.
EXEC SQL EXECUTE IMMEDIATE :BUFFER END-EXEC.
EXEC SQL EXEC :RET-STATUS = testproc INTO <-- hardcoded
:PUB-ID,
:PUB-NAME,
:PUB-CITY,
:PUB-STATE END-EXEC.

I have used dynamic SQL Method 4 for oracle extensively and it works for everything but seems there are so many restriction in sybase. Can anyone give me some hints to solve the problem? I heard that i can use Method 2 to run stored procedure at run time but i have tried that with no success. It will be great if anyone can give me some samples. Thanks in advance!