Page 1 of 1

.REJECTEDCODE = 0

Posted: Thu Oct 06, 2005 4:00 pm
by bapajju
Hello,

I am modifying an laready built code. In one of the jobs, in the constraint there is a condition specifying

LinkName..REJECTEDCODE = 0
and IsNull(Field1) <>1

Could someone help me understand the meaning of these two statements. I am facing these typr of statements for the firts time.

Thanks in advance
Bapajju

Posted: Thu Oct 06, 2005 4:04 pm
by als110
if it is a constraint on the output of a transformer you only pass a record through if the input field REJECTEDCODE = 0 and if Field1 is not null

Posted: Thu Oct 06, 2005 5:18 pm
by ray.wurlod
What is Field1? Normally input columns are qualified with their link name. But it could be a stage variable, I guess. Anyway, it needs not to be null for the row to be put out along this link.

Posted: Fri Oct 07, 2005 7:59 am
by bapajju
thanks. Let me be more specific.

I have one input link Say Input. I have two Output links say Output1 & Output2.

Now the Contrsaint for Outpu2 is like below:

Output1.REJECTEDCODE = 0 And IsNull(Input.Field1) <>1 . Now I got the point that IsNull(Input.Field1) <>1 means Input.Field1 has to be NULL to pass though this link.

But I am still unable to understand the part Output1.REJECTEDCODE = 0 .
What Does this mean exactly.

Posted: Fri Oct 07, 2005 8:12 am
by chulett
Keep in mind the fact that 0 is the same as 'false' or equivalent to the @FALSE system variable while 1 (actually any non-zero value) is 'true' or equivalent to the @TRUE system variable.

Check the online help for reject row handling as it goes through all this. REJECTEDCODE is non-zero (or @TRUE) when a row went down the attached link and was rejected (pushed back) by the target. This is different from REJECTED which means 'did not go down'.

So, testing for REJECTEDCODE = 0 is checking if the REJECTEDCODE is false - aka, not rejected. I prefer a different syntax when used in constraints, but it all works:

Code: Select all

Output1.REJECTEDCODE         [Output1 row was rejected]
Not(Output1.REJECTEDCODE)    [Output1 row was successful]
Both of these are simple expressions that evaluate to either true or false. Also note - just to complicate things - that the second notation could also mean no row was sent down the link - it can't be rejected if it wasn't sent in the first place. :wink:

Posted: Fri Oct 07, 2005 9:33 am
by bapajju
Thanks Craig. I got the points. Thanks a Ton.
chulett wrote:Keep in mind the fact that 0 is the same as 'false' or equivalent to the @FALSE system variable while 1 (actually any non-zero value) is 'true' or equivalent to the @TRUE system variable.

Check the online help for reject row handling as it goes through all this. REJECTEDCODE is non-zero (or @TRUE) when a row went down the attached link and was rejected (pushed back) by the target. This is different from REJECTED which means 'did not go down'.

So, testing for REJECTEDCODE = 0 is checking if the REJECTEDCODE is false - aka, not rejected. I prefer a different syntax when used in constraints, but it all works:

Code: Select all

Output1.REJECTEDCODE         [Output1 row was rejected]
Not(Output1.REJECTEDCODE)    [Output1 row was successful]
Both of these are simple expressions that evaluate to either true or false. Also note - just to complicate things - that the second notation could also mean no row was sent down the link - it can't be rejected if it wasn't sent in the first place. :wink: