Fatal Error for Stored Proc stage

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dsuser7
Participant
Posts: 41
Joined: Sat Nov 29, 2008 2:21 am

Fatal Error for Stored Proc stage

Post by dsuser7 »

Hi,

I have a parallel job in V 8.7. The design has a row generator, generating 1 dummy row followed by Stored Procedure stage.

The DB is MSSQL Server
Procedure type - Transform
No parameters are being passed to SP and no values are returned from the SP.
However even when the SP fails, the Datastage job is finishing successfully. The SP uses RAISERROR and returning @Errmsg.

I want the job to fail when SP fails.

Any insight would be helpful.

Thanks.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

A Transform SP usually expects to have input(s) and output.
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 »

Right... in your case it should be set to 'Target'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
dsuser7
Participant
Posts: 41
Joined: Sat Nov 29, 2008 2:21 am

Post by dsuser7 »

Mostly the job does abort when the SP fails due to primary key violation. There haven't been any other errors which made the SP fail and hence the datastage job didn't fail too.

We haven't changed anything in the job.
devo
Premium Member
Premium Member
Posts: 18
Joined: Fri Sep 22, 2006 1:22 pm

Post by devo »

I wanted to add to this because I was struggling with a similar issue and just discovered the answer. For calling a Target SQL Server Stored Procedure, I had to uncheck the General Procedure Call box and use the following syntax:

EXEC ? = <procedure name> ?, ?, ?, ?
Post Reply