z/OS ISPF Edit and Edit Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


HEX—Set or Query Hexadecimal Mode

z/OS ISPF Edit and Edit Macros
SC19-3621-00

The HEX macro command sets hexadecimal mode, which determines whether data appears in hexadecimal format.

The HEX assignment statement either sets hexadecimal mode or retrieves the current values of hexadecimal mode, and places them in variables.

Syntax

Read syntax diagramSkip visual syntax diagram
Macro command syntax

                       .-VERT-.     
>>-ISREDIT--HEX--+-ON--+------+-+------------------------------><
                 |     '-DATA-' |   
                 +-VERT---------+   
                 +-DATA---------+   
                 '-OFF----------'   

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

>>-ISREDIT--(var1,var2)-- = --HEX------------------------------><

Read syntax diagramSkip visual syntax diagram
                            .-VERT-.     
>>-ISREDIT--HEX-- = --+-ON--+------+-+-------------------------><
                      |     '-DATA-' |   
                      +-VERT---------+   
                      +-DATA---------+   
                      '-OFF----------'   

var1
The name of a variable to contain ON or OFF.
var2
The name of a variable to contain DATA, VERT, or blanks.
ON DATA
Same as macro command syntax.
ON VERT
Same as macro command syntax.
OFF
Same as macro command syntax.

Description

The HEX macro command and assignment statement determines whether the editor displays hexadecimal representation in a vertical or data string format.

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.

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.

Return codes

0
Normal completion
20
Severe error

Examples

To put the value of hexadecimal mode (on or off) in variable &HEXMODE and to process if hexadecimal mode is on:
ISREDIT (HEXMODE) = HEX
IF &HEXMODE = ON THEN -
   ...
To turn hexadecimal mode off:
ISREDIT HEX OFF

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014