8.3.1.3 Z Field Descriptor

The Z field descriptor transfers hexadecimal (base 16) values, and can be used with any data type. It takes the following form:

Zw[.m]

Input Processing

In an input statement, the Z field descriptor transfers w characters from the external field and assigns them as a hexadecimal value to the corresponding I/O list element. The external field can contain only the numerals 0 through 9 and the letters A (a) through F (f). It cannot contain a sign, decimal point, or exponent field.

An all-blank field is treated as a value of zero. If the value of the external field exceeds the range of the corresponding list element, an error occurs.

The following list illustrates valid input processing using the Z field descriptor:

Format    External Field       Internal Hexadecimal Value
Z3        A94                          A94
Z5        A23DEF                     A23DE
Z5        95.AF2               An error; the decimal point is invalid

Output Processing

In an output statement, the Z field descriptor transfers the hexadecimal value of the corresponding I/O list element, right- justified, to an external field that is w characters long. No signs are transmitted. A negative value is transmitted in internal form.

If the value does not fill the field, leading spaces are inserted; if the value is too large for the field, the entire field is filled with asterisks. If m is present, the external field consists of at least m digits and is filled with zeros on the left, if necessary.

If m is zero and the internal representation is zero, the external field is filled with blanks.

The following list illustrates valid output processing using the Z field descriptor (the symbol ^ represents a nonprinting space character):

Format     Internal (Decimal) Value       External Representation
Z4           32767                        7FFF
Z9          -32767                        ^FFFF8001
Z2              16                        10
Z4           -10.5                        ****
Z3.3          2708                        A94
Z6.4          2708                        ^^0A94


Previous Page Next Page Table of Contents