DSTransformError, DSLogAbort

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
laiko
Premium Member
Premium Member
Posts: 35
Joined: Sun May 25, 2008 10:55 am

DSTransformError, DSLogAbort

Post by laiko »

I'd like to abort the job when the value of a column is not equal to 'DATA FOUND'. I tried using the transformer's stage variable:

If retval <> 'DATA FOUND' then Call DSTransformError("No Data, "Acct Load")
else 0

This is also not working with DSLogAbort. Is routine necessary or can it be simply done in Stage variable?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Not sure what 'DSLogAbort' would be... did you mean DSLogFatal? What is "not working" about it? Details would be good.
-craig

"You can never have too many knives" -- Logan Nine Fingers
laiko
Premium Member
Premium Member
Posts: 35
Joined: Sun May 25, 2008 10:55 am

Post by laiko »

My bad.. you're right. It is DSLogFatal. When I have this in the Stage variable Derivation area, it does not even compile:

If DSLink89.retval <> 'NO DATA FOUND' then Call DSLogFatal("No Data, "Acct Load") else 0

What I'm up to is to abort the job when the read value is ' NO DATA FOUND'. Is routine necessary? if it is, where should I call it?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Right, I believe you'll need to write a small wrapper routine that (at the very least) simply calls the function with whatever you pass in as the argument. Then you can use it in the stage variable like that. For example:

Code: Select all

If DSLink89.retval <> 'NO DATA FOUND' then CallDSLogFatal("No Data, Acct Load") else 0
Hmmm... I'm assuming the mismatched quotes in what you posted were a typo, that routine only takes a single argument from what I recall. However, for grins try this first and see if that works - I can't test anything at the moment:

Code: Select all

If DSLink89.retval <> 'NO DATA FOUND' then DSLogFatal("No Data, Acct Load") else 0
Note the lack of the 'call'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply