Page 1 of 1

DSTransformError, DSLogAbort

Posted: Wed Mar 03, 2010 11:09 am
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?

Posted: Wed Mar 03, 2010 12:10 pm
by chulett
Not sure what 'DSLogAbort' would be... did you mean DSLogFatal? What is "not working" about it? Details would be good.

Posted: Wed Mar 03, 2010 12:33 pm
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?

Posted: Wed Mar 03, 2010 12:57 pm
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'.