String truncate while calling stored procedure from DS
Moderators: chulett, rschirm, roy
String truncate while calling stored procedure from DS
Hi
I am using stored procedure stage to call oracle stored procedure. This stage reads a string parameter "Error Message" and updates message into oracle table. The message is truncating while calling stored procedure from DataStage job And it writes only first char of the message in database table.
When I call the same stored procedure from oracle toad, the input message is not truncating. It write entire message into table.
BEGIN DBSchema.Stp('Message'); END;
could any one please explain why it is happening.
Thanks in Advance
I am using stored procedure stage to call oracle stored procedure. This stage reads a string parameter "Error Message" and updates message into oracle table. The message is truncating while calling stored procedure from DataStage job And it writes only first char of the message in database table.
When I call the same stored procedure from oracle toad, the input message is not truncating. It write entire message into table.
BEGIN DBSchema.Stp('Message'); END;
could any one please explain why it is happening.
Thanks in Advance
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
datatype is Varchar. If i hardcode the value I am getting below error messageSainath.Srinivasan wrote:What is the datatype for the message column ?
What happens if you hardcode the value ?
APT_CombinedOperatorController(1),0: Fatal Error: Fatal: Inserted value too large for column, row rejected.
Please let me know if you need any more details
Thanks
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
After Setting APT_DISABLE_COMBINATION to true . I am getting the same error message in stored procedue stage onlySainath.Srinivasan wrote:Set APT_DISABLE_COMBINATION to true and re-run the job.
It appears to be a length issue.
Thanks
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Now you know the source of the error and may more closely focus your diagnostic efforts. Check whether there is a metadata mismatch; the stored procedure stage does not report these.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Hi Ray,ray.wurlod wrote:Now you know the source of the error and may more closely focus your diagnostic efforts. Check whether there is a metadata mismatch; the stored procedure stage does not report these. ...
I dont have any datatype mismatch. in addition to this, i dont have any defined length for this varcher field in datastage and database stored procedure.
Thanks
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In this situation, what length should i define in DataStage table definition?ray.wurlod wrote:The database has a defined length, and may be objecting to metadata suggesting that the string may have a potentially larger (that is, unlimited) size. ...
currently i am using varchar2 in both datastage and database without specifying any length. but it is giving me only first char of message in target table.
Thanks
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
when i am specifying the length 10 for message field. I am getting below ewarning message followed by error message.Sainath.Srinivasan wrote:Try the following
1.) Make the length as 10 and re-run
2.) Change the stored procedure to take 2 parameters.
Set one to be hardcoded and next from the link variable. ...
warning messages:
STp_Stage,0: Error: Output link column definitions failed validation. Refer to previous messages for details.
The SQL precision (10) of input link column P_ERROR_MESSAGE must be equal to the SQL precision (0) of output link column P_ERROR_MESSAGE.
The SQL precision (10) of input link column P_PROCESS_MESSAGE must be equal to the SQL precision (0) of output link column P_PROCESS_MESSAGE.
Error Message:
STp_Stage,0: Error occurred in call to ORPHCallActivePluginInitialize().
This error is coming for any change in length other than 0.
Thanks
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
Hi
I have done some workaround to resolve this issue. Now I am directly putting job parameters in side the stored procedure stage in Procedure call Syntax box instead of passing from transformer. I am passing only one field from transformer stage, and rest of the fields from job parameters.
For example:
BEGIN #DB_SCHEMA#.PKG_Name.ProcedureName(:1,'#PROCESS_MSG#', '#ERROR_MSG#'); END;
It is working for me without any issue.
Thanks for all your replies.
I have done some workaround to resolve this issue. Now I am directly putting job parameters in side the stored procedure stage in Procedure call Syntax box instead of passing from transformer. I am passing only one field from transformer stage, and rest of the fields from job parameters.
For example:
BEGIN #DB_SCHEMA#.PKG_Name.ProcedureName(:1,'#PROCESS_MSG#', '#ERROR_MSG#'); END;
It is working for me without any issue.
Thanks for all your replies.
Regards,
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.
Deepak Singhal
Everything is okay in the end. If it's not okay, then it's not the end.