I have some stored procedures with input parameters that I need to execute in Data Stage. How can this be done?
Brian G Nagel
Executing Store Procedures in DB2 UDB
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Has anyone been able to successfully call a stored proc from within the DB2 stage?
My java stored procedure is a simple count(*) on a table. My call, which works find from the db2 commandline, has been:
Call Get_Count(?)
I've tried several variations on this call in the 'Before' routine and in the 'user generated sql' sections of the DB2 stage, but I don't think my call syntax is correct. No matter what, I get the same error:
"07001 The number of host variables is not the same as the number of parameter markers."
Does anyone have an example of calling a stored proc from the DB2 stage that actually worked?
My java stored procedure is a simple count(*) on a table. My call, which works find from the db2 commandline, has been:
Call Get_Count(?)
I've tried several variations on this call in the 'Before' routine and in the 'user generated sql' sections of the DB2 stage, but I don't think my call syntax is correct. No matter what, I get the same error:
"07001 The number of host variables is not the same as the number of parameter markers."
Does anyone have an example of calling a stored proc from the DB2 stage that actually worked?
-
- Charter Member
- Posts: 88
- Joined: Tue Jan 13, 2004 3:07 pm
Have there been any updates on this topic from the Ascential releases? or does someone have an example of a query that works. We are executing in test on a one server machine (DB2 and DS on same server). In production we have DS on one server and DB2 on another. The call statement used in test does not work in production. We have checked the dsenv and brought in all of the env variables from the server. We get file not found as an error message. The call works from a command line on the DS server in production. SQL statements work as well in DS, we are just having issues with the call of a stored procedure in this environment within DS. Thanks for any assistance.