HEX—Display Hexadecimal Characters

The HEX primary command sets hexadecimal mode, which determines whether data is displayed in hexadecimal format.

Syntax

Read syntax diagramSkip visual syntax diagramHEXONVERTDATAVERTDATAOFF
ON VERT
Displays the hexadecimal representation of the data vertically (two rows per byte) under each character.
ON DATA
Displays the hexadecimal representation of the data as a string of hexadecimal characters (two per byte) under the characters.
OFF
Does not display hexadecimal representation of the data.
Note: The command, HEX OFF, cancels the effect of any previous HX or HXX commands.

Description

The HEX command determines whether the editor displays hexadecimal representation in a vertical or data string format. See Figure 2 and Figure 3 for examples of these two formats.

When the editor is operating in hexadecimal mode, three lines are displayed for each source line. The first line shows the data in standard character form, while the next two lines show the same data in hexadecimal representation. This applies to every line except profile lines (=PROF>), excluded line messages (- - - ), message lines (==MSG>), and informational lines (======).

Besides normal editing on the first of the three lines, you can change any characters by typing over the hexadecimal representations.

You can also use the FIND, CHANGE, and EXCLUDE commands to find, change, or exclude invalid characters or any specific hexadecimal character, regardless of the setting of hexadecimal mode. See the discussion of picture strings and hexadecimal strings under Finding, seeking, changing, and excluding data.

Examples

Suppose you are editing the data set member shown in Figure 1:

Figure 1. Member with hexadecimal mode off
Screen dump.

Pressing Enter causes the hexadecimal value for each character on the panel, including blanks, to be displayed in vertical format, as shown in Figure 2.

Figure 2. Hexadecimal display, vertical representation
Screen dump.

You can enter the HEX DATA command to change the display to data format, as shown in Figure 3.

Figure 3. Hexadecimal display, data representation
Screen dump.