Creating and executing ASE remote stored procedures

Use the following example to create an ASE stored procedure that executes an remote stored procedure (RSP). The new procedure must specify an existing RSP and provide any arguments that the RSP requires.

create procedure newcust @custname varchar(nn),
 @custno varchar (nn) as
 begin
 execute servername. . .addcust
 @addname=custname, @addno=custno
end

where:

StepsTo execute the example remote stored procedure using isql

  1. Connect to ASE.

  2. At the prompt, enter the following:

    c:>ISQL -Ssybase -Uuser -Ppasswrd
     1> execute newcust xxxx,yyyy
    2> go
    

    where:

The results obtained depend on the defined addcust stored procedure.