if BITAND(invalue,  '01'x)  =  '01'x

On Tue, 2 Aug 2022 at 12:50, Lionel B. Dyck <lbd...@gmail.com> wrote:

> What is the best way to test if a bit is 1 or 0?
>
>
>
> I'm doing this but was thinking there may/probably is a better way:
>
>
>
> If substr(x2b(c2x(flag1)),6,1)  = 1 then say 'got  it'
>
>
>
>
>
> Lionel B. Dyck <><
>
> Website:  <https://www.lbdsoftware.com> https://www.lbdsoftware.com
>
> Github:  <https://github.com/lbdyck> https://github.com/lbdyck
>
>
>
> "Worry more about your character than your reputation. Character is what
> you
> are, reputation merely what others think you are."   - - - John Wooden
>
>
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to