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
.REJECTEDCODE = 0
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
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.
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.
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:
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 :wink:](./images/smilies/icon_wink.gif)
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]
![Wink :wink:](./images/smilies/icon_wink.gif)
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
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:
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.Code: Select all
Output1.REJECTEDCODE [Output1 row was rejected] Not(Output1.REJECTEDCODE) [Output1 row was successful]