Routine getting aborted

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
neena
Participant
Posts: 90
Joined: Mon Mar 31, 2003 4:32 pm

Routine getting aborted

Post by neena »

I tried searching the issue but I wasn't able to come up with any info. If I missed please direct me.

When I am running the Job sequencer which is using a user Defined routine, the job sequencer is getting aborted with the Routine warning.

SQLExecDirect STATUS-Select = -1 SQLSTATE= 00000 dbmscode=-1 Error=SQLError rc = 100

This routing is trying to connect to the DB2 and it has some connection details in the code. I was not able to understand it entirely but wondering if you can help me debug the issue.

Code gets started like this

$INCLUDE UNIVERSE.INCLUDE ODBC.H

DEFFUN DSAttachODBCDriver(HDXBC)

EQU ROUTINE_NAME TO "Routine name"
EQU SUCCESS To 0
EQU ERROR To 'ERROR'

Ans = SUCCESS

I tried testing this routine it worked fine in the different region but not works in the production. Both are in the same windows server.

My hunch for the issues is.

1. I am thinking HDXBC is a driver, but I already checked it and I was not able to find any driver with that name. So could it be this driver issue?
2. When it tries to check the routine name and it wasn't able to find it. Could that be the issue?

Really appreciate if any one can point me to right direction.

Thanks.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Any chance the table it is reading or the selected result set is empty? A quick search turned up this: SQLError: rc = 100 (SQL_NO_DATA_FOUND)
-craig

"You can never have too many knives" -- Logan Nine Fingers
neena
Participant
Posts: 90
Joined: Mon Mar 31, 2003 4:32 pm

Post by neena »

That would not be the case. I have ran the query in rapid SQL and it returned the result. I am having this issue with all the routines which are using the Db2 Connection.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

-1 is SQL.ERROR therefore the code must iteratively call SQLError() to remove error information from the environment, connection or statement handles until they are clean. In the process of doing so you will learn the true reason for the error code.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
neena
Participant
Posts: 90
Joined: Mon Mar 31, 2003 4:32 pm

Post by neena »

Thanks so much, because of your suggestions I started debugging if it could be the CLI function SQLExecDirect error. Finally we find that we are having ODBC Driver issue. In the advanced tab of the driver we found that for Alternate ID there is no default schema mentioned, after correcting that everything is working fine.

Once again thanks so much for your suggestions
Post Reply