The Z data edit descriptor transfers hexadecimal (base 16) values. It takes the following form:
The value of m (the minimum number of digits in the constant) must not exceed the value of w (the field width). The m has no effect on input, only output.
The specified I/O list item can be of type integer, real, or logical.
On input, the Z data edit descriptor transfers w characters from an external field and assigns their hexadecimal value to the corresponding I/O list item. The external field must contain only hexadecimal digits (0 though 9 and A (a) through F(f)) or blanks.
If the value exceeds the range of the corresponding input list item, an error occurs.
The following shows input using the Z edit descriptor:
Format Input Value
Z3 A94 A94
Z5 A23DEF A23DE
Z5 95.AF2 An error; the decimal point is invalid
On output, the Z data edit descriptor transfers the hexadecimal value of the corresponding I/O list item, right-justified, to an external field that is w characters long.
The field consists of zero or more blanks, followed by an unsigned integer constant (consisting of hexadecimal digits) with no leading zeros. A negative value is transferred in internal form without a leading minus sign.
If m is specified, the unsigned integer constant must have at least m digits. If necessary, it is padded with leading zeros.
If m is zero, and the output list item has the value zero, the external field is filled with blanks.
The following shows output using the Z edit descriptor (the symbol ^ represents a nonprinting blank character):
Format Value Output
Z4 32767 7FFF
Z9 -32767 ^FFFF8001
Z2 16 10
Z4 -10.5 ****
Z3.3 2708 A94
Z6.4 2708 ^^0A94
For More Information: