Help Needed in calling DB2 Stored Procedure
Moderators: chulett, rschirm, roy
Help Needed in calling DB2 Stored Procedure
I have searched a lot and tried few trial and error methods with stored procedure stage but not able to be success in calling a DB2 Stored Procedure
I have 12 parameters, one Input, One Input/Output and 10 Output types. Like;
Column_Names|SQL_Type|I/O Type|Length
PARM|Char|IN|23
MSG|Char|OUT|193
INPUT|Char|INOUT|100
Remaining columns are DB2Messages fields which are empty
Requirement is that I have to enter value in INPUT parameter and retrieve the MSG
How can this be implemented in datastage?
Thanks,
LakiRay
I have 12 parameters, one Input, One Input/Output and 10 Output types. Like;
Column_Names|SQL_Type|I/O Type|Length
PARM|Char|IN|23
MSG|Char|OUT|193
INPUT|Char|INOUT|100
Remaining columns are DB2Messages fields which are empty
Requirement is that I have to enter value in INPUT parameter and retrieve the MSG
How can this be implemented in datastage?
Thanks,
LakiRay
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
My job design would be
Stored Procedure Stage ---------> DataSet
I am using stored procedure transform type, import all the parameters and column mapping has to be done based on what you said, is that right?
What about the default proccode and procmess fields created, should I map them to any fields too?
Also, should the procedure call syntax be Generated or not.
CALL Stored_Proc_Name(:PARM,?,:INPUT,?,?,?,?,?,?,?,?,?);
I am not familiar with stored procedures so its all new
Stored Procedure Stage ---------> DataSet
I am using stored procedure transform type, import all the parameters and column mapping has to be done based on what you said, is that right?
What about the default proccode and procmess fields created, should I map them to any fields too?
Also, should the procedure call syntax be Generated or not.
CALL Stored_Proc_Name(:PARM,?,:INPUT,?,?,?,?,?,?,?,?,?);
I am not familiar with stored procedures so its all new
The parameters do come from input. This Stored Procedure will be in middle of the job.
Should I need to use Generate Procedure Call.
So on the input tab, the columns should be only two (Parm, Input) - I/O Type Input
On the output tab, should all the in and out type columns present. There are also two extra columns Proc Code and Proc Mess
In the Stage/parameters tab, how should the mapping done, what about the two extra columns (Proc Code and Proc Mess)?
Should I need to use Generate Procedure Call.
So on the input tab, the columns should be only two (Parm, Input) - I/O Type Input
On the output tab, should all the in and out type columns present. There are also two extra columns Proc Code and Proc Mess
In the Stage/parameters tab, how should the mapping done, what about the two extra columns (Proc Code and Proc Mess)?
Bit of an incomplete job design posted, eh? Back to a type of "transform". I'll let others with practical DB2 experience handle the other questions.wittyme wrote:The parameters do come from input. This Stored Procedure will be in middle of the job.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
I could able to achieve it. Just did trial and error methods and could able to get it after like 20 trials.
Maybe I didn't got it in first place as my dsxchange account expired and I renewed just for this to see if I can get help immediately.
bummer.. need to be more patience from next time before renewing the account back.
Thanks for your inputs though.
Maybe I didn't got it in first place as my dsxchange account expired and I renewed just for this to see if I can get help immediately.
bummer.. need to be more patience from next time before renewing the account back.
Thanks for your inputs though.