Last active
May 29, 2023 15:21
-
-
Save lbdyck/81346879ceece64e446e7b465d9d5199 to your computer and use it in GitHub Desktop.
ISPF Edit Macro to display a record in hex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ---------------------- REXX ----------------------------- * | |
| ISPF Edit Macro to display the requested record in hex in | | |
| an infoline. (Note: no validation is performed) | | |
| | | |
| Syntax: EHEX line | | |
| | | |
| Where EHEX is the macro name (change as you wish) | | |
| line is a record number | | |
| | | |
| Sample: EHEX 4 | | |
* --------------------------------------------------------- */ | |
Address ISREdit | |
'Macro (line)' | |
'(data) = line' line | |
hex = c2x(data) | |
parse value '' with hextop hexbot | |
do i = 1 to length(hex) by 2 | |
hextop = hextop''substr(hex,i,1) | |
hexbot = hexbot''substr(hex,i+1,1) | |
end | |
'line_after' line '= infoline (hexbot)' | |
'line_after' line '= infoline (hextop)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment