This example shows an ASE stored procedure that can execute an RSP. The ASE 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.