REXX execute HEXUS REXX execute HEXUS Author: David McRitchie formatted on 1995/04/01 06:54 for assistance contact: D. McRitchie DMcRitchie@hotmail.com -------------------------------------------------------------------------------- CLIST NAME. HEXUS users. Mainly Systems Programmers and Application Programmers type. REXX execute resides in SYS1.TSOCLIST -------------------------------------------------------------------------------- HEXUS HEX to/from Character conversion (conversational) -------------------------------------------------------------------------------- related HEXES, P (Hex calculator clist), HEXSHOW -------------------------------------------------------------------------------- Used like any TSO clist, this REXX execute is used to facilitate con- versions to and from hex. A sample conversation is shown below which was SYSOUT trapped while in PDF edit. Material is added to the end of the member you are in edit on. ===> @STRAPQ HEXUS Trapping lines meant for output is a bit tricky, because you will not see the question, nor the removal of your response. -------------------------------------------------------------------------------- Since square brackets are not available, optional material is enclosed in European brackets <...>. TSO HEXUS -------------------------------------------------------------------------------- Examples COMMAND ===> TSO HEXUS COMMAND INVOKING @STRAPQ CLIST MACRO ===> @STRAPQ hexus HEX to/from Character conversion ------------------- HEXUS written by David McRitchie in REXX For conversion to hex C2X() use X followed by char string Uppercase text to hex C2X() use H followed by char string For conversion to char X2C() use C followed by hex string Use R to clear screen and recall last entry -------- Three Examples Follow and then it's your turn --------- enter C, H, or X conversion, or blank to quit, on next line> C 8481A3857A40F1F261F0F861F9F040F2F07AF3F67AF1F640 > d a t e : 1 2 / 0 8 / 9 0 2 0 : 3 6 : 1 6 = date: 1990/12/08 20:36:16 enter C, H, or X conversion, or blank to quit, on next line> H hex this 90342 --H-- Conversion to uppercase, before conversion to hex > H E X T H I S 9 0 3 4 2 = C8C5E740E3C8C9E240F9F0F3F4F2 enter C, H, or X conversion, or blank to quit, on next line> X hex this 90342 > h e x t h i s 9 0 3 4 2 = 8885A740A38889A240F9F0F3F4F2 enter C, H, or X conversion, or blank to quit, on next line> c fox = ***ERROR*** char(o) in pos. 2 of string is not a hex digit enter C, H, or X conversion, or blank to quit, on next line> c f0f14 = ***ERROR*** even number of digits required enter C, H, or X conversion, or blank to quit, on next line> Internal Aspects Internal aspects describes how the CLIST functions. This information is particularly useful to someone who may need to design a similarly func- tional clist. It may also provide additional insight to the casual user. To examine the actual clist you may enter ===> TSO HEXUS * First line contains a comment containing the word REXX, this is re- quired if stored in a clist library and recommended otherwise. * DO FOREVER used for a loop. * CLS is used to clear the screen. * Conversion from character to hex uses C2X() function, and conversion from hex to character uses X2C(). * TRUNC to truncate to an integer. * Subroutine functions. n HEXUS on