RPG/400 Help


Bit Operations

The bit operations are:

The BITOF and BITON operations allow you to turn off and on specific bits in a field specified in the result field. The specified field must be a one-position character field.

The TESTB operation compares the bits identified in factor 2 with the corresponding bits in the field named as the result field.

In these operations, if factor 2 contains a 1-byte hexadecimal literal, the bits in the factor 2 entry will affect the result field entry in the same way a 1-byte character field would affect it.

Note:
You can also format one or more characters at a time using move operations with hexadecimal literals. See Move Operations for more detail.


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