Page 1 of 1

stored procedure

Posted: Thu Feb 16, 2006 7:46 am
by scorpion
hi all,

can any one please direct me to find "how to call stored procedures in datastage"

tx in advance

Posted: Thu Feb 16, 2006 7:59 am
by chulett
Search the forum. If you have 7.5.x there is an official Stored Procedure stage, other than that you need to use an ODBC stage.

Posted: Thu Feb 16, 2006 8:49 am
by gmorey
We're using DataStage 7.1

Here's an example of what we use (I've changed the names):

There's a sequential text file with 1 row of dummy data -> transformer -> odbc connection, which inserts into a table (dummytable) in SQL Server and then executes the stored procedure dbo.CreateReportTable (which returns no rows).

The sql in the odbc stage is similar to this (#$DestinationDB# is our environment variable for the database name):

INSERT INTO #$DestinationDB#.dbo.dummytable(number, text) VALUES (?,?);EXEC #$DestinationDB#.dbo.CreateReportTable

------------------------

Here's another link:

viewtopic.php?t=93936&highlight=stored+ ... l=continue