Some values in flag fields can be the sum of several other values that define different characteristics of a particular record.
For example, in the CA VM:Account database, the ARCHFLG field (see the table for VM:Archiver usage) can have a value of X'11'. This can be broken down into two components: X'10' and X'01'. These two components indicate that the archived file is stored online (X'10') and that it was modified at one time by an accounting exit (X'01').
If the ARCHFLG field contained X'C1', it could be broken down into three components: X'80', X'40', and X'01'. As you can see from the bit definitions in the ARCHFLG row, an archived file with X'C1' in the ARCHFLG field:
- Does exist on the CA VM:Archiver STAGE minidisk.
- Was written to a tape volume.
- Was at one time modified by an accounting exit.
Bit Testing
The binary equivalent of X'C1' is 11000001. The X'80', X'40', and X'01' bits are on. This means the characteristics represented by these bits apply to this record. You can use this information to write bit test statements. See the section Bit Test Statement for details.