|
On 31/05/2005, at 10:12 PM, Fisher, Don wrote:
I'm actually just trying to determine the status of a specific bit. As I
understand the a.p.i. documentation, this one character field contains bit
data that may look like '01110000' or '01001000' or something else depending
on what the a.p.i. detects. The third bit (bit number 2), may be on or off
and I need to determine which.
Thus: IF ( %BITAND(value : x'20') = x'20' )
although using named constants for the mask values would be better.
The same principle holds for multi-bit masks such as x'55'.
Regards, Simon Coulter. -------------------------------------------------------------------- FlyByNight Software AS/400 Technical Specialists
http://www.flybynight.com.au/ Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ Fax: +61 3 9419 0175 \ / X ASCII Ribbon campaign against HTML E-Mail / \ --------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.