I'm using an ODBC stage to call an MS SQLSERVER stored procedure. The job runs fine if rows are returned. If no rows are found, the stored procedure is coded to print a return message. When this return message is printed, the job interprets it as a failure condition and aborts. Is there anyway to ignore the print message and prevent the job from aborting?
It prints the return message as an informational log in Director then fails with this log:
src_SDB_remit_collateral_sp..remit_collateral_sp.in_remit_collateral_sp: DSD.BCIOpenR call to SQLNumResultCols failed.
SQLSTATE=S1010, DBMS.CODE=0
[DataStage][SQL Client]Can't provide information at this time for this prepared statement.
MS SQLSERVER stored procedure with message causing error
Moderators: chulett, rschirm, roy
hmmm, I can't remember any switches in the ODBC stages that will work. Any reason you can't use the STP (Stored Procedure Stage), it has a lot of features in it?
I'm an idiot, never mind, it's only for Oracle. Can you verify your version doesn't have SQL-Server support?
I'm an idiot, never mind, it's only for Oracle. Can you verify your version doesn't have SQL-Server support?
Kenneth Bland
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
Rank: Sempai
Belt: First degree black
Fight name: Captain Hook
Signature knockout: right upper cut followed by left hook
Signature submission: Crucifix combined with leg triangle
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
When this return message is printed, the job interprets it as a failure condition and aborts. Is there anyway to ignore the print message and prevent the job from aborting?
No. That's the documented behaviour for any programming using the ODBC API. If SQLNumResultCols() does not return a value, then the code can not determine how many variables need to be bound to the result set. It's actually nothing to do with the message per se - they just happen to coincide in time.
No. That's the documented behaviour for any programming using the ODBC API. If SQLNumResultCols() does not return a value, then the code can not determine how many variables need to be bound to the result set. It's actually nothing to do with the message per se - they just happen to coincide in time.
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.