RPG/400 Help

BITOF (Set Bits Off)

*---------*---------------*-----------------*----------------*---------------*
|   CODE  |    FACTOR 1   |     FACTOR 2    |     RESULT     |  INDICATORS   |
|         |               |                 |      FIELD     |               |
*---------*---------------*-----------------*----------------*---------------*
| BITOF   |               | Bit numbers     | Character      |               |
|         |               |                 | field          |               |
*---------*---------------*-----------------*----------------*---------------*

The BITOF operation causes bits identified in factor 2 to be set off (set to 0) in the result field. Bits not identified in factor 2 remain unchanged. Therefore, when using BITOF to format a character, you should use both BITON and BITOF :  BITON to specify the bits to be set on (=1), and BITOF to specify the bits to be set off (=0). Unless you explicitly set on or off all the bits in the character, you might not get the character you want.

Factor 2 can contain:

In the result field, specify a one-position character field. It can be an array element if each element in the array is a one-position character field.

See Figure "BITON and BITOF Operations" for an example of the BITOF operation.


[ Top of Page | Previous Page | Next Page | Table of Contents ]