Hi,
I have a doubt in using the Compare function in Datastage.
This function is used as
If (Compare (Trim(EXSTCRR_TRANS.MW , '0' , 'R') ,'.' ) = 0) Then 0 Else 1
If (Compare (Trim(EXSTCRR_TRANS.MW , '0' , 'R') ,'' ) = 0) Then 0 Else 1
What's the actual output of this function in the scenario mentioned above
Also if we are using If funtion as mentioned below please explain whether is it performing AND r OR operation
If (VCZero = VIZero = VeInZero = 0) Then 0 Else 1
Regards,
Balakrishna
Doubt regarding Datastage String Function
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Try it and find out, and let us know.
My guesses (since I'm not in a position to try) would be indeterminate for the Compare() functions because I don't know what the value of EXSTCRR_TRANS.MW is. Once you've done a Trim() you have a string, so you don't actually need the Compare() function - you're doing a string comparison anyway.
I expect that the operators in your third example will associate pairwise from the left.
My guesses (since I'm not in a position to try) would be indeterminate for the Compare() functions because I don't know what the value of EXSTCRR_TRANS.MW is. Once you've done a Trim() you have a string, so you don't actually need the Compare() function - you're doing a string comparison anyway.
I expect that the operators in your third example will associate pairwise from the left.
Code: Select all
If (((VCZero = VIZero) = VeInZero) = 0) Then 0 Else 1
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.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: