Page 1 of 1

Does Datastage provide bitwise logical OP?

Posted: Fri May 29, 2015 8:19 am
by olgc
Hi there,

Does Datastage provide bitwise op? Can you get the highest 2 bits of a byte and then 4 bits, then the lowest 2 bits? I.e., a byte data is split to three parts: highest 2 bits, middle 4 bits, lowest 2 bits with Datastage?

Thanks,

Posted: Fri May 29, 2015 8:59 am
by Mike
Always best to check Appendix B of the Parallel Job Developer's Guide for currently available built-in transform functions.

Having said that though, I don't recall any.

If you can afford to use a BASIC transformer in a parallel job or a BASIC routine in a job sequence, I'm pretty sure there are BASIC functions that can test and manipulate bits.

Mike

Posted: Fri May 29, 2015 11:36 am
by qt_ky
They are described in the location Mike indicated, and under the Logical functions section.

BitAnd(), BitCompress(), BitExpand(), BitOr(), BitXOr(), Not(), SetBit()

I would think you need to use the BitAnd() function.

Posted: Fri May 29, 2015 3:14 pm
by olgc
Thanks a lot. So bitwise op can be done with BASIC, but for parallel, we have to use C to manipulate it, even it's hard. I just wonder why bitwise logic op is not provided as a stardard ligocal op. It's easy to do so.

Thanks,

Posted: Fri May 29, 2015 3:18 pm
by Mike
Seems to me that BASIC isn't needed. I would think the parallel transform functions listed by qt_ky should give you what you need.

Mike

Posted: Fri May 29, 2015 3:21 pm
by chulett
Exactly, you seem to have misunderstood the reply - those are the built-in Parallel Logical bit-wise functions he listed.