Strovent SystemsSign in
Reference

Show hexadecimal in ISPF Edit and Browse

How to turn on HEX in ISPF Edit and Browse, how to read the two rows under each line, and how to search for a byte value.

ISPF can show the hexadecimal value of every character in a data set member or file. Use it when a record holds a character you cannot see or type, when a field looks right but will not match, or when you want to know which code page the data is in.

Turn it on

Type the command on the command line of Edit or Browse and press Enter:

  • HEX ON: Turns hexadecimal display on, in vertical form.
  • HEX VERT: Vertical form: two rows per byte, directly under each character.
  • HEX DATA: The hexadecimal digits shown as one string, two digits per byte.
  • HEX OFF: Turns it off.

In Browse, ON is the default, and VERT is the default when you leave the form out. In Edit, the form is ON VERT, ON DATA or OFF.

With hex on, every record takes three lines: the data as text, then two lines of hexadecimal. This applies to every line except profile lines, excluded-line messages, message lines and the informational ====== lines. Browse also puts a separator line between the text and the hexadecimal.

How to read it

In vertical form each text character has a hexadecimal pair under it. The upper digit is on the first of the two rows and the lower digit is on the second. For example, the letter A shows C above 1, which is hexadecimal C1.

In HEX DATA form the digits run along two rows, so the string is twice as long as the text, and it is easier to copy than to read.

The values are those of the host's code page. In the US EBCDIC code page 037, space is 40, a is 81, A is C1 and the digit 0 is F0. Other code pages put some characters, such as brackets and the currency symbol, in different places, which is why these characters can look wrong on screen. See EBCDIC and code pages for the reason and the fix.

Edit the hexadecimal

In Edit you can change a character by typing over its hexadecimal digits, not only over the text line.

Find a byte value

FIND, CHANGE and EXCLUDE accept hexadecimal strings, whether or not hex mode is on:

FIND X'C1'

This is the way to locate characters that are invalid in the data and cannot be typed.

In Browse, scrolling with the cursor

In Browse, with the cursor in a record, SCROLL UP places that record as the last complete record on the screen. A complete record is the text line, two hexadecimal lines and the separator.

Sources

Spotted a mistake? Email [email protected].