The following example shows a SQL Server stored procedure that can execute a remote stored procedure (RSP). The SQL Server stored 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:
@custname is the variable representing the customer name to be added.
@custno is the variable representing the customer number to be added.
servername specifies the DB2 access service instance to use. The three periods (. . .) following the servername are required.
addcust is the stored procedure name on the host.
@addname is the stored procedure variable representing the new customer name.
@addno is the stored procedure variable representing the new customer number.
Copyright © 2005. Sybase Inc. All rights reserved. |