Page 1 of 1

Zero or Positive

Posted: Tue Apr 09, 2013 9:41 am
by dsquest
There should be some simple method or direct function available for sure, which Iam not able to find it readily. I can always go with If-Then-Else. But wanted to check, for other optimized options.

If there is any negative number, I expect 0.
Any positive can be send to the output directly.

Eg:

-2 --> 0
3 --> 3
0 --> 0

Thanks!

Posted: Tue Apr 09, 2013 9:42 am
by chulett
If-Then-Else.

Posted: Wed Apr 10, 2013 12:54 am
by nikhil_bhasin
You can refer to Parallel Job Developers Guide documentation - Appendix B - Transform functions for searching the functions available in DS :), Its easy to search use Ctrl+F and then search...

Posted: Wed Apr 10, 2013 1:07 am
by ray.wurlod
There's a neat way of solving this with a server function:

Code: Select all

 Oconv(InLink.TheNumber,"R1,99999") + 0
but I'm not aware of an equivalent parallel function, so would recommend If..Then..Else for parallel jobs.

Posted: Wed Apr 10, 2013 7:19 am
by chulett
Neither am I, hence my response.