stored procedure

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
scorpion
Participant
Posts: 144
Joined: Thu May 12, 2005 4:19 am

stored procedure

Post by scorpion »

hi all,

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

tx in advance
Thanx&Regards
scorpion
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
gmorey
Participant
Posts: 27
Joined: Tue Nov 01, 2005 9:07 am
Location: Midwest, USA
Contact:

Post 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
Greg Morey
DBA/Developer
Post Reply