MS SQLSERVER stored procedure with message causing error

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
ldesilvio
Premium Member
Premium Member
Posts: 32
Joined: Thu Mar 27, 2003 6:38 pm
Location: Sewell, NJ

MS SQLSERVER stored procedure with message causing error

Post by ldesilvio »

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.
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

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?
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
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

kcbland wrote:I'm an idiot, never mind, it's only for Oracle.
While the original version only supported Oracle, the version in 7.5.1A supports Oracle, DB2 and Sybase. So still no SQL-Server but not just Oracle no more. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
kcbland
Participant
Posts: 5208
Joined: Wed Jan 15, 2003 8:56 am
Location: Lutz, FL
Contact:

Post by kcbland »

Missed it by: that much!
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
Post Reply