In assembler there are 2 instructions for handling Char to Hex and Hex to Char.

TRTO - Translate Two to One
TROT - Translate One to Two

It is the TROT instruction I usually use for producing printable HEX, but I 
think you need the TRTO instruction.
Once you have set up the tables it is the simplest I can find. Certainly far 
easier that the UNPK method of old.

Lennie Dymoke-Bradshaw
https://rsclweb.com 
‘Dance like no one is watching. Encrypt like everyone is.’

-----Original Message-----
From: IBM Mainframe Discussion List <[email protected]> On Behalf Of 
Ituriel do Neto
Sent: Tuesday, June 13, 2023 8:06 PM
To: [email protected]
Subject: Char to Hex

Hi all,

I don't want to reinvent the wheel, so I would be grateful for your advice.
I need to convert C'123AB' to X'0123AB'

Any ideas?


Best Regards

Ituriel do Nascimento Neto
z/OS System Programmer

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to