Previous Topic: Output Files

Next Topic: CA JARS Wizard Exits


Hexadecimal Fields and Bit Testing

CA JARS Wizard can be used to test and set entire hexadecimal fields or, alternatively, to test and set individual bits within a hexadecimal field.

Hexadecimal fields must be defined with the suffix (H), together with another suffix denoting the length of the field. Hexadecimal constants must always consist of an even number of characters.

Example:

COMPUTE HEX FIELD(H)(1) EQ 80

This statement defines a one-byte hexadecimal field and assigns it the hexadecimal value of 80.

Bit testing can be performed only on fields defined as hexadecimal. Individual bits are identified by the precision suffix, (.n) where n is the bit number relative to 1. Allowable values of n are 1 to 8 inclusive, and bit one is the leftmost bit of the field.

Bit references can test for a particular bit to be on or off (=ON/OFF) or have a value of zero or one (=0/1).

Example:

COMPUTE IF HEX FIELD(.3) = ON THEN ----
COMPUTE IF HEX FIELD(.3) = 1 THEN ----

The above statements are identical in operation and both test the setting of bit number three in the hexadecimal field, HEX FIELD.

Note: A test of a hexadecimal field is a character-type comparison, that is, the entire field is compared with a single value. Individual bit testing, however, tests individual bits, ignoring the hexadecimal value of the field and all unreferenced bits.