I blogged this recently Easy question – hard answer, how to I convert a hex string to hex byte string in C <https://colinpaice.blog/2023/06/06/easy-question-hard-answer-how-to-i-convert-a-hex-string-to-hex-byte-string-in-c/>. The C sscanf <https://www.ibm.com/docs/en/zos/2.5.0?topic=programs-sscanf-read-format-data> function. The post covers fixed and variable length strings.
On Tue, 13 Jun 2023 at 20:07, Ituriel do Neto < 000003427ec2837d-dmarc-requ...@listserv.ua.edu> wrote: > 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN