How to: |
The BITSON function evaluates an individual bit within a character string to determine whether it is on or off. If the bit is on, BITSON returns a value of 1. If the bit is off, it returns a value of 0. This function is useful in interpreting multi-punch data, where each punch conveys an item of information.
BITSON(bitnumber, source_string, output)
where:
Integer
Is the number of the bit to be evaluated, counted from the left-most bit in the character string.
Alphanumeric
Is the character string to be evaluated. The character string is in multiple eight-bit blocks.
Integer
Is the name of the field that contains the result, or the format of the output value enclosed in single quotation marks.
BITSON evaluates the 24th bit of LAST_NAME:
BITSON(24, LAST_NAME, 'I1')
For SMITH, the result is 1.
For CROSS, the result is 9.
WebFOCUS | |
Feedback |